forked from qt-creator/qt-creator
Cleanup
This commit is contained in:
@@ -697,6 +697,36 @@ ObjCClass::ObjCClass(TranslationUnit *translationUnit, unsigned sourceLocation,
|
|||||||
ObjCClass::~ObjCClass()
|
ObjCClass::~ObjCClass()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
bool ObjCClass::isInterface() const
|
||||||
|
{ return _isInterface; }
|
||||||
|
|
||||||
|
void ObjCClass::setInterface(bool isInterface)
|
||||||
|
{ _isInterface = isInterface; }
|
||||||
|
|
||||||
|
bool ObjCClass::isCategory() const
|
||||||
|
{ return _categoryName != 0; }
|
||||||
|
|
||||||
|
const Name *ObjCClass::categoryName() const
|
||||||
|
{ return _categoryName; }
|
||||||
|
|
||||||
|
void ObjCClass::setCategoryName(const Name *categoryName)
|
||||||
|
{ _categoryName = categoryName; }
|
||||||
|
|
||||||
|
ObjCBaseClass *ObjCClass::baseClass() const
|
||||||
|
{ return _baseClass; }
|
||||||
|
|
||||||
|
void ObjCClass::setBaseClass(ObjCBaseClass *baseClass)
|
||||||
|
{ _baseClass = baseClass; }
|
||||||
|
|
||||||
|
unsigned ObjCClass::protocolCount() const
|
||||||
|
{ return _protocols.size(); }
|
||||||
|
|
||||||
|
ObjCBaseProtocol *ObjCClass::protocolAt(unsigned index) const
|
||||||
|
{ return _protocols.at(index); }
|
||||||
|
|
||||||
|
void ObjCClass::addProtocol(ObjCBaseProtocol *protocol)
|
||||||
|
{ _protocols.push_back(protocol); }
|
||||||
|
|
||||||
FullySpecifiedType ObjCClass::type() const
|
FullySpecifiedType ObjCClass::type() const
|
||||||
{ return FullySpecifiedType(const_cast<ObjCClass *>(this)); }
|
{ return FullySpecifiedType(const_cast<ObjCClass *>(this)); }
|
||||||
|
|
||||||
@@ -747,6 +777,15 @@ ObjCProtocol::ObjCProtocol(TranslationUnit *translationUnit, unsigned sourceLoca
|
|||||||
ObjCProtocol::~ObjCProtocol()
|
ObjCProtocol::~ObjCProtocol()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
unsigned ObjCProtocol::protocolCount() const
|
||||||
|
{ return _protocols.size(); }
|
||||||
|
|
||||||
|
ObjCBaseProtocol *ObjCProtocol::protocolAt(unsigned index) const
|
||||||
|
{ return _protocols.at(index); }
|
||||||
|
|
||||||
|
void ObjCProtocol::addProtocol(ObjCBaseProtocol *protocol)
|
||||||
|
{ _protocols.push_back(protocol); }
|
||||||
|
|
||||||
FullySpecifiedType ObjCProtocol::type() const
|
FullySpecifiedType ObjCProtocol::type() const
|
||||||
{ return FullySpecifiedType(const_cast<ObjCProtocol *>(this)); }
|
{ return FullySpecifiedType(const_cast<ObjCProtocol *>(this)); }
|
||||||
|
|
||||||
@@ -973,6 +1012,33 @@ ObjCPropertyDeclaration::ObjCPropertyDeclaration(TranslationUnit *translationUni
|
|||||||
ObjCPropertyDeclaration::~ObjCPropertyDeclaration()
|
ObjCPropertyDeclaration::~ObjCPropertyDeclaration()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
bool ObjCPropertyDeclaration::hasAttribute(int attribute) const
|
||||||
|
{ return _propertyAttributes & attribute; }
|
||||||
|
|
||||||
|
void ObjCPropertyDeclaration::setAttributes(int attributes)
|
||||||
|
{ _propertyAttributes = attributes; }
|
||||||
|
|
||||||
|
bool ObjCPropertyDeclaration::hasGetter() const
|
||||||
|
{ return hasAttribute(Getter); }
|
||||||
|
|
||||||
|
bool ObjCPropertyDeclaration::hasSetter() const
|
||||||
|
{ return hasAttribute(Setter); }
|
||||||
|
|
||||||
|
const Name *ObjCPropertyDeclaration::getterName() const
|
||||||
|
{ return _getterName; }
|
||||||
|
|
||||||
|
void ObjCPropertyDeclaration::setGetterName(const Name *getterName)
|
||||||
|
{ _getterName = getterName; }
|
||||||
|
|
||||||
|
const Name *ObjCPropertyDeclaration::setterName() const
|
||||||
|
{ return _setterName; }
|
||||||
|
|
||||||
|
void ObjCPropertyDeclaration::setSetterName(const Name *setterName)
|
||||||
|
{ _setterName = setterName; }
|
||||||
|
|
||||||
|
void ObjCPropertyDeclaration::setType(const FullySpecifiedType &type)
|
||||||
|
{ _type = type; }
|
||||||
|
|
||||||
FullySpecifiedType ObjCPropertyDeclaration::type() const
|
FullySpecifiedType ObjCPropertyDeclaration::type() const
|
||||||
{ return _type; }
|
{ return _type; }
|
||||||
|
|
||||||
|
|||||||
@@ -581,8 +581,6 @@ protected:
|
|||||||
virtual void visitSymbol0(SymbolVisitor *visitor);
|
virtual void visitSymbol0(SymbolVisitor *visitor);
|
||||||
virtual void accept0(TypeVisitor *visitor);
|
virtual void accept0(TypeVisitor *visitor);
|
||||||
virtual bool matchType0(const Type *otherType, TypeMatcher *matcher) const;
|
virtual bool matchType0(const Type *otherType, TypeMatcher *matcher) const;
|
||||||
|
|
||||||
private:
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class CPLUSPLUS_EXPORT ObjCProtocol: public ScopedSymbol, public Type
|
class CPLUSPLUS_EXPORT ObjCProtocol: public ScopedSymbol, public Type
|
||||||
@@ -591,14 +589,9 @@ public:
|
|||||||
ObjCProtocol(TranslationUnit *translationUnit, unsigned sourceLocation, const Name *name);
|
ObjCProtocol(TranslationUnit *translationUnit, unsigned sourceLocation, const Name *name);
|
||||||
virtual ~ObjCProtocol();
|
virtual ~ObjCProtocol();
|
||||||
|
|
||||||
unsigned protocolCount() const
|
unsigned protocolCount() const;
|
||||||
{ return _protocols.size(); }
|
ObjCBaseProtocol *protocolAt(unsigned index) const;
|
||||||
|
void addProtocol(ObjCBaseProtocol *protocol);
|
||||||
ObjCBaseProtocol *protocolAt(unsigned index) const
|
|
||||||
{ return _protocols.at(index); }
|
|
||||||
|
|
||||||
void addProtocol(ObjCBaseProtocol *protocol)
|
|
||||||
{ _protocols.push_back(protocol); }
|
|
||||||
|
|
||||||
// Symbol's interface
|
// Symbol's interface
|
||||||
virtual FullySpecifiedType type() const;
|
virtual FullySpecifiedType type() const;
|
||||||
@@ -663,26 +656,19 @@ public:
|
|||||||
ObjCClass(TranslationUnit *translationUnit, unsigned sourceLocation, const Name *name);
|
ObjCClass(TranslationUnit *translationUnit, unsigned sourceLocation, const Name *name);
|
||||||
virtual ~ObjCClass();
|
virtual ~ObjCClass();
|
||||||
|
|
||||||
bool isInterface() const { return _isInterface; }
|
bool isInterface() const;
|
||||||
void setInterface(bool isInterface) { _isInterface = isInterface; }
|
void setInterface(bool isInterface);
|
||||||
|
|
||||||
bool isCategory() const { return _categoryName != 0; }
|
bool isCategory() const;
|
||||||
const Name *categoryName() const { return _categoryName; }
|
const Name *categoryName() const;
|
||||||
void setCategoryName(const Name *categoryName) { _categoryName = categoryName; }
|
void setCategoryName(const Name *categoryName);
|
||||||
|
|
||||||
ObjCBaseClass *baseClass() const
|
ObjCBaseClass *baseClass() const;
|
||||||
{ return _baseClass; }
|
void setBaseClass(ObjCBaseClass *baseClass);
|
||||||
void setBaseClass(ObjCBaseClass *baseClass)
|
|
||||||
{ _baseClass = baseClass; }
|
|
||||||
|
|
||||||
unsigned protocolCount() const
|
unsigned protocolCount() const;
|
||||||
{ return _protocols.size(); }
|
ObjCBaseProtocol *protocolAt(unsigned index) const;
|
||||||
|
void addProtocol(ObjCBaseProtocol *protocol);
|
||||||
ObjCBaseProtocol *protocolAt(unsigned index) const
|
|
||||||
{ return _protocols.at(index); }
|
|
||||||
|
|
||||||
void addProtocol(ObjCBaseProtocol *protocol)
|
|
||||||
{ _protocols.push_back(protocol); }
|
|
||||||
|
|
||||||
// Symbol's interface
|
// Symbol's interface
|
||||||
virtual FullySpecifiedType type() const;
|
virtual FullySpecifiedType type() const;
|
||||||
@@ -795,32 +781,20 @@ public:
|
|||||||
const Name *name);
|
const Name *name);
|
||||||
virtual ~ObjCPropertyDeclaration();
|
virtual ~ObjCPropertyDeclaration();
|
||||||
|
|
||||||
bool hasAttribute(int attribute) const
|
bool hasAttribute(int attribute) const;
|
||||||
{ return _propertyAttributes & attribute; }
|
void setAttributes(int attributes);
|
||||||
|
|
||||||
void setAttributes(int attributes)
|
bool hasGetter() const;
|
||||||
{ _propertyAttributes = attributes; }
|
bool hasSetter() const;
|
||||||
|
|
||||||
bool hasGetter() const
|
const Name *getterName() const;
|
||||||
{ return hasAttribute(Getter); }
|
|
||||||
|
|
||||||
bool hasSetter() const
|
void setGetterName(const Name *getterName);
|
||||||
{ return hasAttribute(Setter); }
|
|
||||||
|
|
||||||
const Name *getterName() const
|
const Name *setterName() const;
|
||||||
{ return _getterName; }
|
void setSetterName(const Name *setterName);
|
||||||
|
|
||||||
void setGetterName(const Name *getterName)
|
void setType(const FullySpecifiedType &type);
|
||||||
{ _getterName = getterName; }
|
|
||||||
|
|
||||||
const Name *setterName() const
|
|
||||||
{ return _setterName; }
|
|
||||||
|
|
||||||
void setSetterName(const Name *setterName)
|
|
||||||
{ _setterName = setterName; }
|
|
||||||
|
|
||||||
void setType(const FullySpecifiedType &type)
|
|
||||||
{ _type = type; }
|
|
||||||
|
|
||||||
// Symbol's interface
|
// Symbol's interface
|
||||||
virtual FullySpecifiedType type() const;
|
virtual FullySpecifiedType type() const;
|
||||||
|
|||||||
Reference in New Issue
Block a user