clang API Documentation

Public Types | Public Member Functions | Static Public Member Functions
clang::ObjCContainerDecl Class Reference

#include <DeclObjC.h>

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

List of all members.

Public Types

typedef specific_decl_iterator
< ObjCPropertyDecl
prop_iterator
typedef llvm::iterator_range
< specific_decl_iterator
< ObjCPropertyDecl > > 
prop_range
typedef specific_decl_iterator
< ObjCMethodDecl
method_iterator
typedef llvm::iterator_range
< specific_decl_iterator
< ObjCMethodDecl > > 
method_range
typedef filtered_decl_iterator
< ObjCMethodDecl,&ObjCMethodDecl::isInstanceMethod
instmeth_iterator
typedef llvm::iterator_range
< instmeth_iterator
instmeth_range
typedef filtered_decl_iterator
< ObjCMethodDecl,&ObjCMethodDecl::isClassMethod
classmeth_iterator
typedef llvm::iterator_range
< classmeth_iterator
classmeth_range
typedef llvm::DenseMap
< IdentifierInfo
*, ObjCPropertyDecl * > 
PropertyMap
typedef llvm::DenseMap< const
ObjCProtocolDecl
*, ObjCPropertyDecl * > 
ProtocolPropertyMap
typedef llvm::SmallVector
< ObjCPropertyDecl *, 8 > 
PropertyDeclOrder

Public Member Functions

 ObjCContainerDecl (Kind DK, DeclContext *DC, IdentifierInfo *Id, SourceLocation nameLoc, SourceLocation atStartLoc)
prop_range properties () const
prop_iterator prop_begin () const
prop_iterator prop_end () const
method_range methods () const
method_iterator meth_begin () const
method_iterator meth_end () const
instmeth_range instance_methods () const
instmeth_iterator instmeth_begin () const
instmeth_iterator instmeth_end () const
classmeth_range class_methods () const
classmeth_iterator classmeth_begin () const
classmeth_iterator classmeth_end () const
ObjCMethodDeclgetMethod (Selector Sel, bool isInstance, bool AllowHidden=false) const
ObjCMethodDeclgetInstanceMethod (Selector Sel, bool AllowHidden=false) const
ObjCMethodDeclgetClassMethod (Selector Sel, bool AllowHidden=false) const
bool HasUserDeclaredSetterMethod (const ObjCPropertyDecl *P) const
ObjCIvarDeclgetIvarDecl (IdentifierInfo *Id) const
ObjCPropertyDeclFindPropertyDeclaration (IdentifierInfo *PropertyId) const
virtual void collectPropertiesToImplement (PropertyMap &PM, PropertyDeclOrder &PO) const
SourceLocation getAtStartLoc () const
void setAtStartLoc (SourceLocation Loc)
SourceRange getAtEndRange () const
void setAtEndRange (SourceRange atEnd)
SourceRange getSourceRange () const override LLVM_READONLY
 Source range that this declaration covers.

Static Public Member Functions

static bool classof (const Decl *D)
static bool classofKind (Kind K)
static DeclContextcastToDeclContext (const ObjCContainerDecl *D)
static ObjCContainerDeclcastFromDeclContext (const DeclContext *DC)

Detailed Description

ObjCContainerDecl - Represents a container for method declarations. Current sub-classes are ObjCInterfaceDecl, ObjCCategoryDecl, ObjCProtocolDecl, and ObjCImplDecl.

Definition at line 508 of file DeclObjC.h.


Member Typedef Documentation

Definition at line 568 of file DeclObjC.h.

Definition at line 569 of file DeclObjC.h.

Definition at line 553 of file DeclObjC.h.

Definition at line 554 of file DeclObjC.h.

Definition at line 537 of file DeclObjC.h.

Definition at line 539 of file DeclObjC.h.

Definition at line 524 of file DeclObjC.h.

Definition at line 526 of file DeclObjC.h.

Definition at line 601 of file DeclObjC.h.

Definition at line 596 of file DeclObjC.h.

Definition at line 599 of file DeclObjC.h.


Constructor & Destructor Documentation

clang::ObjCContainerDecl::ObjCContainerDecl ( Kind  DK,
DeclContext DC,
IdentifierInfo Id,
SourceLocation  nameLoc,
SourceLocation  atStartLoc 
) [inline]

Definition at line 518 of file DeclObjC.h.


Member Function Documentation

Reimplemented from clang::Decl.

Definition at line 634 of file DeclObjC.h.

Definition at line 631 of file DeclObjC.h.

Definition at line 574 of file DeclObjC.h.

References clang::DeclContext::decls_begin().

Referenced by class_methods().

Definition at line 577 of file DeclObjC.h.

References clang::DeclContext::decls_end().

Referenced by class_methods().

static bool clang::ObjCContainerDecl::classof ( const Decl D) [inline, static]
static bool clang::ObjCContainerDecl::classofKind ( Kind  K) [inline, static]
virtual void clang::ObjCContainerDecl::collectPropertiesToImplement ( PropertyMap PM,
PropertyDeclOrder PO 
) const [inline, virtual]

This routine collects list of properties to be implemented in the class. This includes, class's and its conforming protocols' properties. Note, the superclass's properties are not included in the list.

Reimplemented in clang::ObjCProtocolDecl, and clang::ObjCInterfaceDecl.

Definition at line 606 of file DeclObjC.h.

Definition at line 613 of file DeclObjC.h.

Referenced by getSourceRange(), and clang::ASTDeclWriter::VisitObjCContainerDecl().

ObjCMethodDecl* clang::ObjCContainerDecl::getClassMethod ( Selector  Sel,
bool  AllowHidden = false 
) const [inline]
ObjCMethodDecl* clang::ObjCContainerDecl::getInstanceMethod ( Selector  Sel,
bool  AllowHidden = false 
) const [inline]

getIvarDecl - This method looks up an ivar in this ContextDecl.

Definition at line 56 of file DeclObjC.cpp.

References clang::DeclContext::lookup().

Referenced by clang::Sema::ActOnFields(), clang::Sema::CheckImplementationIvars(), and clang::ObjCInterfaceDecl::lookupInstanceVariable().

ObjCMethodDecl * ObjCContainerDecl::getMethod ( Selector  Sel,
bool  isInstance,
bool  AllowHidden = false 
) const
SourceRange clang::ObjCContainerDecl::getSourceRange ( ) const [inline, override, virtual]

Source range that this declaration covers.

Reimplemented from clang::Decl.

Reimplemented in clang::ObjCProtocolDecl, and clang::ObjCInterfaceDecl.

Definition at line 620 of file DeclObjC.h.

References getAtEndRange().

HasUserDeclaredSetterMethod - This routine returns 'true' if a user declared setter method was found in the class, its protocols, its super classes or categories. It also returns 'true' if one of its categories has declared a 'readwrite' property. This is because, user must provide a setter method for the category's 'readwrite' property.

Definition at line 102 of file DeclObjC.cpp.

References clang::NamedDecl::getIdentifier(), clang::ObjCPropertyDecl::getSetterName(), clang::ObjCInterfaceDecl::getSuperClass(), HasUserDeclaredSetterMethod(), clang::Decl::isImplicit(), clang::ObjCMethodDecl::isInstanceMethod(), clang::DeclContext::lookup(), clang::ObjCPropertyDecl::OBJC_PR_readwrite, and P.

Referenced by clang::Sema::DefaultSynthesizeProperties(), and HasUserDeclaredSetterMethod().

Definition at line 559 of file DeclObjC.h.

References clang::DeclContext::decls_begin().

Referenced by instance_methods().

Definition at line 562 of file DeclObjC.h.

References clang::DeclContext::decls_end().

Referenced by instance_methods().

Definition at line 544 of file DeclObjC.h.

References clang::DeclContext::decls_begin().

Referenced by methods().

Definition at line 547 of file DeclObjC.h.

References clang::DeclContext::decls_end().

Referenced by methods().

Definition at line 529 of file DeclObjC.h.

References clang::DeclContext::decls_begin().

Referenced by properties().

Definition at line 532 of file DeclObjC.h.

References clang::DeclContext::decls_end().

Referenced by properties().

Definition at line 610 of file DeclObjC.h.

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


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