class ObjCPropertyDecl

Declaration

class ObjCPropertyDecl : public NamedDecl { /* full declaration omitted */ };

Description

Represents one property declaration in an Objective-C interface. For example:

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

Inherits from: NamedDecl

Member Variables

private clang::SourceLocation AtLoc
private clang::SourceLocation LParenLoc
private clang::QualType DeclType
private clang::TypeSourceInfo* DeclTypeSourceInfo
private unsigned int PropertyAttributes
private unsigned int PropertyAttributesAsWritten
private unsigned int PropertyImplementation
private clang::Selector GetterName
private clang::Selector SetterName
private clang::SourceLocation GetterNameLoc
private clang::SourceLocation SetterNameLoc
private clang::ObjCMethodDecl* GetterMethodDecl = nullptr
private clang::ObjCMethodDecl* SetterMethodDecl = nullptr
private clang::ObjCIvarDecl* PropertyIvarDecl = nullptr

Inherited from Decl:

protected NextInContextAndBits
protected Access
protected FromASTFile
protected IdentifierNamespace
protected CacheValidAndLinkage

Method Overview

Inherited from NamedDecl:

Inherited from Decl:

Methods

static clang::ObjCPropertyDecl* Create(
    clang::ASTContext& C,
    clang::DeclContext* DC,
    clang::SourceLocation L,
    clang::IdentifierInfo* Id,
    clang::SourceLocation AtLocation,
    clang::SourceLocation LParenLocation,
    clang::QualType T,
    clang::TypeSourceInfo* TSI,
    clang::ObjCPropertyDecl::PropertyControl
        propControl = None)

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

Parameters

clang::ASTContext& C
clang::DeclContext* DC
clang::SourceLocation L
clang::IdentifierInfo* Id
clang::SourceLocation AtLocation
clang::SourceLocation LParenLocation
clang::QualType T
clang::TypeSourceInfo* TSI
clang::ObjCPropertyDecl::PropertyControl propControl = None

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

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

Parameters

clang::ASTContext& C
unsigned int ID

ObjCPropertyDecl(
    clang::DeclContext* DC,
    clang::SourceLocation L,
    clang::IdentifierInfo* Id,
    clang::SourceLocation AtLocation,
    clang::SourceLocation LParenLocation,
    clang::QualType T,
    clang::TypeSourceInfo* TSI,
    clang::ObjCPropertyDecl::PropertyControl
        propControl)

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

Parameters

clang::DeclContext* DC
clang::SourceLocation L
clang::IdentifierInfo* Id
clang::SourceLocation AtLocation
clang::SourceLocation LParenLocation
clang::QualType T
clang::TypeSourceInfo* TSI
clang::ObjCPropertyDecl::PropertyControl propControl

void anchor()

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

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

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

Parameters

const clang::Decl* D

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

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

Parameters

clang::Decl::Kind K

static clang::ObjCPropertyDecl* findPropertyDecl(
    const clang::DeclContext* DC,
    const clang::IdentifierInfo* propertyID,
    clang::ObjCPropertyQueryKind queryKind)

Description

Lookup a property by name in the specified DeclContext.

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

Parameters

const clang::DeclContext* DC
const clang::IdentifierInfo* propertyID
clang::ObjCPropertyQueryKind queryKind

clang::SourceLocation getAtLoc() const

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

clang::IdentifierInfo* getDefaultSynthIvarName(
    clang::ASTContext& Ctx) const

Description

Get the default name of the synthesized ivar.

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

Parameters

clang::ASTContext& Ctx

clang::ObjCMethodDecl* getGetterMethodDecl() const

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

clang::Selector getGetterName() const

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

clang::SourceLocation getGetterNameLoc() const

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

clang::SourceLocation getLParenLoc() const

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

ObjCPropertyAttribute::Kind
getPropertyAttributes() const

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

ObjCPropertyAttribute::Kind
getPropertyAttributesAsWritten() const

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

clang::ObjCPropertyDecl::PropertyControl
getPropertyImplementation() const

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

clang::ObjCIvarDecl* getPropertyIvarDecl() const

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

static clang::ObjCPropertyQueryKind getQueryKind(
    bool isClassProperty)

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

Parameters

bool isClassProperty

clang::ObjCPropertyQueryKind getQueryKind() const

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

clang::ObjCPropertyDecl::SetterKind
getSetterKind() const

Description

getSetterKind - Return the method used for doing assignment in the property setter. This is only valid if the property has been defined to have a setter.

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

clang::ObjCMethodDecl* getSetterMethodDecl() const

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

clang::Selector getSetterName() const

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

clang::SourceLocation getSetterNameLoc() const

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

clang::SourceRange getSourceRange() const

Description

Source range that this declaration covers.

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

clang::QualType getType() const

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

clang::TypeSourceInfo* getTypeSourceInfo() const

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

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

Description

Retrieve the type when this property is used with a specific base object type.

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

Parameters

clang::QualType objectType

bool isAtomic() const

Description

isAtomic - Return true if the property is atomic.

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

bool isClassProperty() const

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

bool isDirectProperty() const

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

bool isInstanceProperty() const

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

bool isOptional() const

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

bool isReadOnly() const

Description

isReadOnly - Return true iff the property has a setter.

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

bool isRetaining() const

Description

isRetaining - Return true if the property retains its value.

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

void overwritePropertyAttributes(
    unsigned int PRVal)

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

Parameters

unsigned int PRVal

void setAtLoc(clang::SourceLocation L)

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

Parameters

clang::SourceLocation L

void setGetterMethodDecl(
    clang::ObjCMethodDecl* gDecl)

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

Parameters

clang::ObjCMethodDecl* gDecl

void setGetterName(clang::Selector Sel,
                   clang::SourceLocation Loc =
                       clang::SourceLocation())

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

Parameters

clang::Selector Sel
clang::SourceLocation Loc = clang::SourceLocation()

void setLParenLoc(clang::SourceLocation L)

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

Parameters

clang::SourceLocation L

void setPropertyAttributes(
    ObjCPropertyAttribute::Kind PRVal)

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

Parameters

ObjCPropertyAttribute::Kind PRVal

void setPropertyAttributesAsWritten(
    ObjCPropertyAttribute::Kind PRVal)

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

Parameters

ObjCPropertyAttribute::Kind PRVal

void setPropertyImplementation(
    clang::ObjCPropertyDecl::PropertyControl pc)

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

Parameters

clang::ObjCPropertyDecl::PropertyControl pc

void setPropertyIvarDecl(
    clang::ObjCIvarDecl* Ivar)

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

Parameters

clang::ObjCIvarDecl* Ivar

void setSetterMethodDecl(
    clang::ObjCMethodDecl* gDecl)

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

Parameters

clang::ObjCMethodDecl* gDecl

void setSetterName(clang::Selector Sel,
                   clang::SourceLocation Loc =
                       clang::SourceLocation())

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

Parameters

clang::Selector Sel
clang::SourceLocation Loc = clang::SourceLocation()

void setType(clang::QualType T,
             clang::TypeSourceInfo* TSI)

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

Parameters

clang::QualType T
clang::TypeSourceInfo* TSI