clang API Documentation

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

#include <DeclObjC.h>

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

List of all members.

Public Types

enum  AccessControl {
  None, Private, Protected, Public,
  Package
}

Public Member Functions

const ObjCInterfaceDeclgetContainingInterface () const
 Return the class interface that this ivar is logically contained in; this is either the interface where the ivar was declared, or the interface the ivar is conceptually a part of in the case of synthesized ivars.
ObjCIvarDeclgetNextIvar ()
const ObjCIvarDeclgetNextIvar () const
void setNextIvar (ObjCIvarDecl *ivar)
void setAccessControl (AccessControl ac)
AccessControl getAccessControl () const
AccessControl getCanonicalAccessControl () const
void setSynthesize (bool synth)
bool getSynthesize () const

Static Public Member Functions

static ObjCIvarDeclCreate (ASTContext &C, ObjCContainerDecl *DC, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, QualType T, TypeSourceInfo *TInfo, AccessControl ac, Expr *BW=nullptr, bool synthesized=false)
static ObjCIvarDeclCreateDeserialized (ASTContext &C, unsigned ID)
static bool classof (const Decl *D)
static bool classofKind (Kind K)

Detailed Description

ObjCIvarDecl - Represents an ObjC instance variable. In general, ObjC instance variables are identical to C. The only exception is Objective-C supports C++ style access control. For example:

@interface IvarExample : NSObject { id defaultToProtected; @public: id canBePublic; // same as C++. @protected: id canBeProtected; // same as C++. @package: id canBePackage; // framework visibility (not available in C++). }

Definition at line 1392 of file DeclObjC.h.


Member Enumeration Documentation

Enumerator:
None 
Private 
Protected 
Public 
Package 

Definition at line 1396 of file DeclObjC.h.


Member Function Documentation

static bool clang::ObjCIvarDecl::classof ( const Decl D) [inline, static]

Reimplemented from clang::FieldDecl.

Definition at line 1441 of file DeclObjC.h.

References classofKind(), and clang::Decl::getKind().

static bool clang::ObjCIvarDecl::classofKind ( Kind  K) [inline, static]

Reimplemented from clang::FieldDecl.

Definition at line 1442 of file DeclObjC.h.

Referenced by classof(), and clang::ASTDeclWriter::VisitFieldDecl().

ObjCIvarDecl * ObjCIvarDecl::Create ( ASTContext C,
ObjCContainerDecl DC,
SourceLocation  StartLoc,
SourceLocation  IdLoc,
IdentifierInfo Id,
QualType  T,
TypeSourceInfo TInfo,
AccessControl  ac,
Expr BW = nullptr,
bool  synthesized = false 
) [static]

Reimplemented from clang::FieldDecl.

Definition at line 1466 of file DeclObjC.cpp.

References AttributeLangSupport::C, and None.

Definition at line 1433 of file DeclObjC.h.

References None, and Protected.

Return the class interface that this ivar is logically contained in; this is either the interface where the ivar was declared, or the interface the ivar is conceptually a part of in the case of synthesized ivars.

Definition at line 1472 of file DeclObjC.cpp.

References clang::ObjCCategoryDecl::getClassInterface(), clang::Decl::getDeclContext(), clang::Decl::getKind(), and clang::ObjCCategoryDecl::IsClassExtension().

Referenced by createObjCPropertyGetter(), and LookupFieldBitOffset().

Definition at line 1426 of file DeclObjC.h.

Definition at line 1429 of file DeclObjC.h.

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

void clang::ObjCIvarDecl::setSynthesize ( bool  synth) [inline]

Definition at line 1437 of file DeclObjC.h.

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


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