class ObjCIvarDecl

Declaration

class ObjCIvarDecl : public FieldDecl { /* full declaration omitted */ };

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++). }

Declared at: clang/include/clang/AST/DeclObjC.h:1923

Inherits from: FieldDecl

Member Variables

private clang::ObjCIvarDecl* NextIvar = nullptr
NextIvar - Next Ivar in the list of ivars declared in class; class's extensions and class's implementation
private unsigned int DeclAccess
private unsigned int Synthesized

Inherited from Decl:

protected NextInContextAndBits
protected Access
protected FromASTFile
protected IdentifierNamespace
protected CacheValidAndLinkage

Method Overview

  • public static clang::ObjCIvarDecl * Create(clang::ASTContext & C, clang::ObjCContainerDecl * DC, clang::SourceLocation StartLoc, clang::SourceLocation IdLoc, clang::IdentifierInfo * Id, clang::QualType T, clang::TypeSourceInfo * TInfo, clang::ObjCIvarDecl::AccessControl ac, clang::Expr * BW = nullptr, bool synthesized = false)
  • public static clang::ObjCIvarDecl * CreateDeserialized(clang::ASTContext & C, unsigned int ID)
  • private ObjCIvarDecl(clang::ObjCContainerDecl * DC, clang::SourceLocation StartLoc, clang::SourceLocation IdLoc, clang::IdentifierInfo * Id, clang::QualType T, clang::TypeSourceInfo * TInfo, clang::ObjCIvarDecl::AccessControl ac, clang::Expr * BW, bool synthesized)
  • private void anchor()
  • public static bool classof(const clang::Decl * D)
  • public static bool classofKind(clang::Decl::Kind K)
  • public clang::ObjCIvarDecl::AccessControl getAccessControl() const
  • public clang::ObjCIvarDecl::AccessControl getCanonicalAccessControl() const
  • public clang::ObjCIvarDecl * getCanonicalDecl()
  • public const clang::ObjCIvarDecl * getCanonicalDecl() const
  • public const clang::ObjCInterfaceDecl * getContainingInterface() const
  • public clang::ObjCInterfaceDecl * getContainingInterface()
  • public clang::ObjCIvarDecl * getNextIvar()
  • public const clang::ObjCIvarDecl * getNextIvar() const
  • public bool getSynthesize() const
  • public clang::QualType getUsageType(clang::QualType objectType) const
  • public void setAccessControl(clang::ObjCIvarDecl::AccessControl ac)
  • public void setNextIvar(clang::ObjCIvarDecl * ivar)
  • public void setSynthesize(bool synth)

Inherited from FieldDecl:

Inherited from DeclaratorDecl:

Inherited from ValueDecl:

Inherited from NamedDecl:

Inherited from Decl:

Methods

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

Declared at: clang/include/clang/AST/DeclObjC.h:1941

Parameters

clang::ASTContext& C
clang::ObjCContainerDecl* DC
clang::SourceLocation StartLoc
clang::SourceLocation IdLoc
clang::IdentifierInfo* Id
clang::QualType T
clang::TypeSourceInfo* TInfo
clang::ObjCIvarDecl::AccessControl ac
clang::Expr* BW = nullptr
bool synthesized = false

static clang::ObjCIvarDecl* CreateDeserialized(
    clang::ASTContext& C,
    unsigned int ID)

Declared at: clang/include/clang/AST/DeclObjC.h:1948

Parameters

clang::ASTContext& C
unsigned int ID

ObjCIvarDecl(
    clang::ObjCContainerDecl* DC,
    clang::SourceLocation StartLoc,
    clang::SourceLocation IdLoc,
    clang::IdentifierInfo* Id,
    clang::QualType T,
    clang::TypeSourceInfo* TInfo,
    clang::ObjCIvarDecl::AccessControl ac,
    clang::Expr* BW,
    bool synthesized)

Declared at: clang/include/clang/AST/DeclObjC.h:1932

Parameters

clang::ObjCContainerDecl* DC
clang::SourceLocation StartLoc
clang::SourceLocation IdLoc
clang::IdentifierInfo* Id
clang::QualType T
clang::TypeSourceInfo* TInfo
clang::ObjCIvarDecl::AccessControl ac
clang::Expr* BW
bool synthesized

void anchor()

Declared at: clang/include/clang/AST/DeclObjC.h:1924

static bool classof(const clang::Decl* D)

Declared at: clang/include/clang/AST/DeclObjC.h:1986

Parameters

const clang::Decl* D

static bool classofKind(clang::Decl::Kind K)

Declared at: clang/include/clang/AST/DeclObjC.h:1987

Parameters

clang::Decl::Kind K

clang::ObjCIvarDecl::AccessControl
getAccessControl() const

Declared at: clang/include/clang/AST/DeclObjC.h:1972

clang::ObjCIvarDecl::AccessControl
getCanonicalAccessControl() const

Declared at: clang/include/clang/AST/DeclObjC.h:1974

clang::ObjCIvarDecl* getCanonicalDecl()

Description

Retrieves the canonical declaration of this field.

Declared at: clang/include/clang/AST/DeclObjC.h:1963

const clang::ObjCIvarDecl* getCanonicalDecl()
    const

Declared at: clang/include/clang/AST/DeclObjC.h:1966

const clang::ObjCInterfaceDecl*
getContainingInterface() const

Declared at: clang/include/clang/AST/DeclObjC.h:1955

clang::ObjCInterfaceDecl* getContainingInterface()

Description

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.

Declared at: clang/include/clang/AST/DeclObjC.h:1954

clang::ObjCIvarDecl* getNextIvar()

Declared at: clang/include/clang/AST/DeclObjC.h:1959

const clang::ObjCIvarDecl* getNextIvar() const

Declared at: clang/include/clang/AST/DeclObjC.h:1960

bool getSynthesize() const

Declared at: clang/include/clang/AST/DeclObjC.h:1979

clang::QualType getUsageType(
    clang::QualType objectType) const

Description

Retrieve the type of this instance variable when viewed as a member of a specific object type.

Declared at: clang/include/clang/AST/DeclObjC.h:1983

Parameters

clang::QualType objectType

void setAccessControl(
    clang::ObjCIvarDecl::AccessControl ac)

Declared at: clang/include/clang/AST/DeclObjC.h:1970

Parameters

clang::ObjCIvarDecl::AccessControl ac

void setNextIvar(clang::ObjCIvarDecl* ivar)

Declared at: clang/include/clang/AST/DeclObjC.h:1961

Parameters

clang::ObjCIvarDecl* ivar

void setSynthesize(bool synth)

Declared at: clang/include/clang/AST/DeclObjC.h:1978

Parameters

bool synth