clang API Documentation
#include <DeclObjC.h>
Public Types | |
typedef CXXCtorInitializer ** | init_iterator |
init_iterator - Iterates through the ivar initializer list. | |
typedef CXXCtorInitializer *const * | init_const_iterator |
init_const_iterator - Iterates through the ivar initializer list. | |
typedef llvm::iterator_range < init_iterator > | init_range |
typedef llvm::iterator_range < init_const_iterator > | init_const_range |
typedef specific_decl_iterator < ObjCIvarDecl > | ivar_iterator |
typedef llvm::iterator_range < specific_decl_iterator < ObjCIvarDecl > > | ivar_range |
Public Member Functions | |
init_range | inits () |
init_const_range | inits () const |
init_iterator | init_begin () |
init_begin() - Retrieve an iterator to the first initializer. | |
init_const_iterator | init_begin () const |
begin() - Retrieve an iterator to the first initializer. | |
init_iterator | init_end () |
init_end() - Retrieve an iterator past the last initializer. | |
init_const_iterator | init_end () const |
end() - Retrieve an iterator past the last initializer. | |
unsigned | getNumIvarInitializers () const |
getNumArgs - Number of ivars which must be initialized. | |
void | setNumIvarInitializers (unsigned numNumIvarInitializers) |
void | setIvarInitializers (ASTContext &C, CXXCtorInitializer **initializers, unsigned numInitializers) |
bool | hasNonZeroConstructors () const |
void | setHasNonZeroConstructors (bool val) |
bool | hasDestructors () const |
void | setHasDestructors (bool val) |
IdentifierInfo * | getIdentifier () const |
StringRef | getName () const |
std::string | getNameAsString () const |
Get the name of the class associated with this interface. | |
StringRef | getObjCRuntimeNameAsString () const |
const ObjCInterfaceDecl * | getSuperClass () const |
ObjCInterfaceDecl * | getSuperClass () |
SourceLocation | getSuperClassLoc () const |
void | setSuperClass (ObjCInterfaceDecl *superCls) |
void | setIvarLBraceLoc (SourceLocation Loc) |
SourceLocation | getIvarLBraceLoc () const |
void | setIvarRBraceLoc (SourceLocation Loc) |
SourceLocation | getIvarRBraceLoc () const |
ivar_range | ivars () const |
ivar_iterator | ivar_begin () const |
ivar_iterator | ivar_end () const |
unsigned | ivar_size () const |
bool | ivar_empty () const |
Static Public Member Functions | |
static ObjCImplementationDecl * | Create (ASTContext &C, DeclContext *DC, ObjCInterfaceDecl *classInterface, ObjCInterfaceDecl *superDecl, SourceLocation nameLoc, SourceLocation atStartLoc, SourceLocation superLoc=SourceLocation(), SourceLocation IvarLBraceLoc=SourceLocation(), SourceLocation IvarRBraceLoc=SourceLocation()) |
static ObjCImplementationDecl * | CreateDeserialized (ASTContext &C, unsigned ID) |
static bool | classof (const Decl *D) |
static bool | classofKind (Kind K) |
Friends | |
class | ASTDeclReader |
class | ASTDeclWriter |
ObjCImplementationDecl - Represents a class definition - this is where method definitions are specified. For example:
\@implementation MyClass - (void)myMethod { /* do something */ } \@end
In a non-fragile runtime, instance variables can appear in the class interface, class extensions (nameless categories), and in the implementation itself, as well as being synthesized as backing storage for properties.
In a fragile runtime, instance variables are specified in the class interface, not in the implementation. Nevertheless (for legacy reasons), we allow instance variables to be specified in the implementation. When specified, they need to be identical to the interface.
Definition at line 1993 of file DeclObjC.h.
typedef CXXCtorInitializer* const* clang::ObjCImplementationDecl::init_const_iterator |
init_const_iterator - Iterates through the ivar initializer list.
Definition at line 2043 of file DeclObjC.h.
typedef llvm::iterator_range<init_const_iterator> clang::ObjCImplementationDecl::init_const_range |
Definition at line 2046 of file DeclObjC.h.
init_iterator - Iterates through the ivar initializer list.
Definition at line 2040 of file DeclObjC.h.
typedef llvm::iterator_range<init_iterator> clang::ObjCImplementationDecl::init_range |
Definition at line 2045 of file DeclObjC.h.
Definition at line 2127 of file DeclObjC.h.
typedef llvm::iterator_range<specific_decl_iterator<ObjCIvarDecl> > clang::ObjCImplementationDecl::ivar_range |
Definition at line 2128 of file DeclObjC.h.
static bool clang::ObjCImplementationDecl::classof | ( | const Decl * | D | ) | [inline, static] |
Reimplemented from clang::ObjCImplDecl.
Definition at line 2144 of file DeclObjC.h.
References classofKind(), and clang::Decl::getKind().
static bool clang::ObjCImplementationDecl::classofKind | ( | Kind | K | ) | [inline, static] |
Reimplemented from clang::ObjCImplDecl.
Definition at line 2145 of file DeclObjC.h.
Referenced by classof().
ObjCImplementationDecl * ObjCImplementationDecl::Create | ( | ASTContext & | C, |
DeclContext * | DC, | ||
ObjCInterfaceDecl * | classInterface, | ||
ObjCInterfaceDecl * | superDecl, | ||
SourceLocation | nameLoc, | ||
SourceLocation | atStartLoc, | ||
SourceLocation | superLoc = SourceLocation() , |
||
SourceLocation | IvarLBraceLoc = SourceLocation() , |
||
SourceLocation | IvarRBraceLoc = SourceLocation() |
||
) | [static] |
Definition at line 1790 of file DeclObjC.cpp.
References AttributeLangSupport::C, clang::ObjCInterfaceDecl::getDefinition(), and clang::ObjCInterfaceDecl::hasDefinition().
Referenced by clang::Sema::ActOnStartClassImplementation(), and clang::ASTNodeImporter::VisitObjCImplementationDecl().
ObjCImplementationDecl * ObjCImplementationDecl::CreateDeserialized | ( | ASTContext & | C, |
unsigned | ID | ||
) | [static] |
Definition at line 1806 of file DeclObjC.cpp.
References AttributeLangSupport::C.
IdentifierInfo* clang::ObjCImplementationDecl::getIdentifier | ( | ) | const [inline] |
getIdentifier - Get the identifier that names the class interface associated with this implementation.
Reimplemented from clang::NamedDecl.
Definition at line 2091 of file DeclObjC.h.
References clang::ObjCImplDecl::getClassInterface(), and clang::NamedDecl::getIdentifier().
Referenced by getName().
SourceLocation clang::ObjCImplementationDecl::getIvarLBraceLoc | ( | ) | const [inline] |
Definition at line 2123 of file DeclObjC.h.
Referenced by clang::ASTDeclWriter::VisitObjCImplementationDecl(), and clang::ASTNodeImporter::VisitObjCImplementationDecl().
SourceLocation clang::ObjCImplementationDecl::getIvarRBraceLoc | ( | ) | const [inline] |
Definition at line 2125 of file DeclObjC.h.
Referenced by clang::ASTDeclWriter::VisitObjCImplementationDecl(), and clang::ASTNodeImporter::VisitObjCImplementationDecl().
StringRef clang::ObjCImplementationDecl::getName | ( | ) | const [inline] |
getName - Get the name of identifier for the class interface associated with this implementation as a StringRef.
Reimplemented from clang::NamedDecl.
Definition at line 2100 of file DeclObjC.h.
References getIdentifier(), and clang::IdentifierInfo::getName().
Referenced by getNameAsString(), getObjCRuntimeNameAsString(), and clang::operator<<().
std::string clang::ObjCImplementationDecl::getNameAsString | ( | ) | const [inline] |
Get the name of the class associated with this interface.
Reimplemented from clang::NamedDecl.
Definition at line 2108 of file DeclObjC.h.
References getName().
unsigned clang::ObjCImplementationDecl::getNumIvarInitializers | ( | ) | const [inline] |
getNumArgs - Number of ivars which must be initialized.
Definition at line 2067 of file DeclObjC.h.
StringRef ObjCImplementationDecl::getObjCRuntimeNameAsString | ( | ) | const |
Produce a name to be used for class's metadata. It comes either via class's objc_runtime_name attribute or class name.
Definition at line 1226 of file DeclObjC.cpp.
References clang::ObjCImplDecl::getClassInterface(), and getName().
const ObjCInterfaceDecl* clang::ObjCImplementationDecl::getSuperClass | ( | ) | const [inline] |
Definition at line 2116 of file DeclObjC.h.
Referenced by clang::Sema::CheckImplementationIvars(), clang::ASTDeclWriter::VisitObjCImplementationDecl(), and clang::ASTNodeImporter::VisitObjCImplementationDecl().
Definition at line 2117 of file DeclObjC.h.
SourceLocation clang::ObjCImplementationDecl::getSuperClassLoc | ( | ) | const [inline] |
Definition at line 2118 of file DeclObjC.h.
Referenced by clang::ASTDeclWriter::VisitObjCImplementationDecl(), and clang::ASTNodeImporter::VisitObjCImplementationDecl().
bool clang::ObjCImplementationDecl::hasDestructors | ( | ) | const [inline] |
Do any of the ivars of this class (not counting its base classes) require non-trivial destruction?
Definition at line 2086 of file DeclObjC.h.
Referenced by clang::ASTDeclWriter::VisitObjCImplementationDecl().
bool clang::ObjCImplementationDecl::hasNonZeroConstructors | ( | ) | const [inline] |
Do any of the ivars of this class (not counting its base classes) require construction other than zero-initialization?
Definition at line 2081 of file DeclObjC.h.
Referenced by clang::ASTDeclWriter::VisitObjCImplementationDecl().
init_iterator clang::ObjCImplementationDecl::init_begin | ( | ) | [inline] |
init_begin() - Retrieve an iterator to the first initializer.
Definition at line 2054 of file DeclObjC.h.
Referenced by AllTrivialInitializers(), and inits().
init_const_iterator clang::ObjCImplementationDecl::init_begin | ( | ) | const [inline] |
begin() - Retrieve an iterator to the first initializer.
Definition at line 2056 of file DeclObjC.h.
init_iterator clang::ObjCImplementationDecl::init_end | ( | ) | [inline] |
init_end() - Retrieve an iterator past the last initializer.
Definition at line 2059 of file DeclObjC.h.
Referenced by AllTrivialInitializers(), and inits().
init_const_iterator clang::ObjCImplementationDecl::init_end | ( | ) | const [inline] |
end() - Retrieve an iterator past the last initializer.
Definition at line 2063 of file DeclObjC.h.
init_range clang::ObjCImplementationDecl::inits | ( | ) | [inline] |
Definition at line 2048 of file DeclObjC.h.
References init_begin(), and init_end().
Referenced by clang::CodeGen::CodeGenFunction::GenerateObjCCtorDtorMethod().
init_const_range clang::ObjCImplementationDecl::inits | ( | ) | const [inline] |
Definition at line 2049 of file DeclObjC.h.
References init_begin(), and init_end().
ivar_iterator clang::ObjCImplementationDecl::ivar_begin | ( | ) | const [inline] |
Definition at line 2131 of file DeclObjC.h.
References clang::DeclContext::decls_begin().
Referenced by ivar_empty(), ivar_size(), and ivars().
bool clang::ObjCImplementationDecl::ivar_empty | ( | ) | const [inline] |
Definition at line 2140 of file DeclObjC.h.
References ivar_begin(), and ivar_end().
ivar_iterator clang::ObjCImplementationDecl::ivar_end | ( | ) | const [inline] |
Definition at line 2134 of file DeclObjC.h.
References clang::DeclContext::decls_end().
Referenced by ivar_empty(), ivar_size(), and ivars().
unsigned clang::ObjCImplementationDecl::ivar_size | ( | ) | const [inline] |
Definition at line 2137 of file DeclObjC.h.
References ivar_begin(), and ivar_end().
ivar_range clang::ObjCImplementationDecl::ivars | ( | ) | const [inline] |
Definition at line 2130 of file DeclObjC.h.
References ivar_begin(), and ivar_end().
void clang::ObjCImplementationDecl::setHasDestructors | ( | bool | val | ) | [inline] |
Definition at line 2087 of file DeclObjC.h.
Referenced by clang::ASTDeclReader::VisitObjCImplementationDecl().
void clang::ObjCImplementationDecl::setHasNonZeroConstructors | ( | bool | val | ) | [inline] |
Definition at line 2082 of file DeclObjC.h.
Referenced by clang::ASTDeclReader::VisitObjCImplementationDecl().
void ObjCImplementationDecl::setIvarInitializers | ( | ASTContext & | C, |
CXXCtorInitializer ** | initializers, | ||
unsigned | numInitializers | ||
) |
Definition at line 1811 of file DeclObjC.cpp.
References AttributeLangSupport::C.
Referenced by clang::Sema::SetIvarInitializers().
void clang::ObjCImplementationDecl::setIvarLBraceLoc | ( | SourceLocation | Loc | ) | [inline] |
Definition at line 2122 of file DeclObjC.h.
Referenced by clang::ASTDeclReader::VisitObjCImplementationDecl().
void clang::ObjCImplementationDecl::setIvarRBraceLoc | ( | SourceLocation | Loc | ) | [inline] |
Definition at line 2124 of file DeclObjC.h.
Referenced by clang::ASTDeclReader::VisitObjCImplementationDecl().
void clang::ObjCImplementationDecl::setNumIvarInitializers | ( | unsigned | numNumIvarInitializers | ) | [inline] |
Definition at line 2071 of file DeclObjC.h.
void clang::ObjCImplementationDecl::setSuperClass | ( | ObjCInterfaceDecl * | superCls | ) | [inline] |
Definition at line 2120 of file DeclObjC.h.
Referenced by clang::ASTDeclReader::VisitObjCImplementationDecl().
friend class ASTDeclReader [friend] |
Reimplemented from clang::DeclContext.
Definition at line 2147 of file DeclObjC.h.
friend class ASTDeclWriter [friend] |
Reimplemented from clang::Decl.
Definition at line 2148 of file DeclObjC.h.