clang API Documentation

Public Types | Public Member Functions | Static Public Member Functions | Friends
clang::ObjCImplementationDecl Class Reference

#include <DeclObjC.h>

Inheritance diagram for clang::ObjCImplementationDecl:
Inheritance graph
[legend]
Collaboration diagram for clang::ObjCImplementationDecl:
Collaboration graph
[legend]

List of all members.

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)
IdentifierInfogetIdentifier () const
StringRef getName () const
std::string getNameAsString () const
 Get the name of the class associated with this interface.
StringRef getObjCRuntimeNameAsString () const
const ObjCInterfaceDeclgetSuperClass () const
ObjCInterfaceDeclgetSuperClass ()
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 ObjCImplementationDeclCreate (ASTContext &C, DeclContext *DC, ObjCInterfaceDecl *classInterface, ObjCInterfaceDecl *superDecl, SourceLocation nameLoc, SourceLocation atStartLoc, SourceLocation superLoc=SourceLocation(), SourceLocation IvarLBraceLoc=SourceLocation(), SourceLocation IvarRBraceLoc=SourceLocation())
static ObjCImplementationDeclCreateDeserialized (ASTContext &C, unsigned ID)
static bool classof (const Decl *D)
static bool classofKind (Kind K)

Friends

class ASTDeclReader
class ASTDeclWriter

Detailed Description

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.


Member Typedef Documentation

init_const_iterator - Iterates through the ivar initializer list.

Definition at line 2043 of file DeclObjC.h.

Definition at line 2046 of file DeclObjC.h.

init_iterator - Iterates through the ivar initializer list.

Definition at line 2040 of file DeclObjC.h.

Definition at line 2045 of file DeclObjC.h.

Definition at line 2127 of file DeclObjC.h.

Definition at line 2128 of file DeclObjC.h.


Member Function Documentation

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 1806 of file DeclObjC.cpp.

References AttributeLangSupport::C.

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().

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().

getNumArgs - Number of ivars which must be initialized.

Definition at line 2067 of file DeclObjC.h.

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().

Definition at line 2117 of file DeclObjC.h.

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().

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_begin() - Retrieve an iterator to the first initializer.

Definition at line 2054 of file DeclObjC.h.

Referenced by AllTrivialInitializers(), and inits().

begin() - Retrieve an iterator to the first initializer.

Definition at line 2056 of file DeclObjC.h.

init_end() - Retrieve an iterator past the last initializer.

Definition at line 2059 of file DeclObjC.h.

Referenced by AllTrivialInitializers(), and inits().

end() - Retrieve an iterator past the last initializer.

Definition at line 2063 of file DeclObjC.h.

Definition at line 2048 of file DeclObjC.h.

References init_begin(), and init_end().

Referenced by clang::CodeGen::CodeGenFunction::GenerateObjCCtorDtorMethod().

Definition at line 2049 of file DeclObjC.h.

References init_begin(), and init_end().

Definition at line 2131 of file DeclObjC.h.

References clang::DeclContext::decls_begin().

Referenced by ivar_empty(), ivar_size(), and ivars().

Definition at line 2140 of file DeclObjC.h.

References ivar_begin(), and ivar_end().

Definition at line 2134 of file DeclObjC.h.

References clang::DeclContext::decls_end().

Referenced by ivar_empty(), ivar_size(), and ivars().

Definition at line 2137 of file DeclObjC.h.

References ivar_begin(), and ivar_end().

Definition at line 2130 of file DeclObjC.h.

References ivar_begin(), and ivar_end().

Definition at line 2087 of file DeclObjC.h.

Referenced by clang::ASTDeclReader::VisitObjCImplementationDecl().

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().

Definition at line 2122 of file DeclObjC.h.

Referenced by clang::ASTDeclReader::VisitObjCImplementationDecl().

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.

Definition at line 2120 of file DeclObjC.h.

Referenced by clang::ASTDeclReader::VisitObjCImplementationDecl().


Friends And Related Function Documentation

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.


The documentation for this class was generated from the following files: