class MSPropertyDecl
Declaration
class MSPropertyDecl : public DeclaratorDecl { /* full declaration omitted */ };
Description
An instance of this class represents the declaration of a property member. This is a Microsoft extension to C++, first introduced in Visual Studio .NET 2003 as a parallel to similar features in C# and Managed C++. A property must always be a non-static class member. A property member superficially resembles a non-static data member, except preceded by a property attribute: __declspec(property(get=GetX, put=PutX)) int x; Either (but not both) of the 'get' and 'put' names may be omitted. A reference to a property is always an lvalue. If the lvalue undergoes lvalue-to-rvalue conversion, then a getter name is required, and that member is called with no arguments. If the lvalue is assigned into, then a setter name is required, and that member is called with one argument, the value assigned. Both operations are potentially overloaded. Compound assignments are permitted, as are the increment and decrement operators. The getter and putter methods are permitted to be overloaded, although their return and parameter types are subject to certain restrictions according to the type of the property. A property declared using an incomplete array type may additionally be subscripted, adding extra parameters to the getter and putter methods.
Declared at: clang/include/clang/AST/DeclCXX.h:4120
Inherits from: DeclaratorDecl
Member Variables
- private clang::IdentifierInfo* GetterId
- private clang::IdentifierInfo* SetterId
Inherited from Decl:
- protected NextInContextAndBits
- protected Access
- protected FromASTFile
- protected IdentifierNamespace
- protected CacheValidAndLinkage
Method Overview
- public static clang::MSPropertyDecl * Create(clang::ASTContext & C, clang::DeclContext * DC, clang::SourceLocation L, clang::DeclarationName N, clang::QualType T, clang::TypeSourceInfo * TInfo, clang::SourceLocation StartL, clang::IdentifierInfo * Getter, clang::IdentifierInfo * Setter)
- public static clang::MSPropertyDecl * CreateDeserialized(clang::ASTContext & C, unsigned int ID)
- private MSPropertyDecl(clang::DeclContext * DC, clang::SourceLocation L, clang::DeclarationName N, clang::QualType T, clang::TypeSourceInfo * TInfo, clang::SourceLocation StartL, clang::IdentifierInfo * Getter, clang::IdentifierInfo * Setter)
- private void anchor()
- public static bool classof(const clang::Decl * D)
- public clang::IdentifierInfo * getGetterId() const
- public clang::IdentifierInfo * getSetterId() const
- public bool hasGetter() const
- public bool hasSetter() const
Inherited from DeclaratorDecl:
- public classof
- public classofKind
- public getBeginLoc
- public getInnerLocStart
- public getNumTemplateParameterLists
- public getOuterLocStart
- public getQualifier
- public getQualifierLoc
- public getSourceRange
- public getTemplateParameterList
- public getTrailingRequiresClause
- public getTrailingRequiresClause
- public getTypeSourceInfo
- public getTypeSpecEndLoc
- public getTypeSpecStartLoc
- public setInnerLocStart
- public setQualifierInfo
- public setTemplateParameterListsInfo
- public setTrailingRequiresClause
- public setTypeSourceInfo
Inherited from ValueDecl:
Inherited from NamedDecl:
- public classof
- public classofKind
- public declarationReplaces
- public getDeclName
- public getExplicitVisibility
- public getFormalLinkage
- public getIdentifier
- public getLinkageAndVisibility
- public getLinkageInternal
- public getMostRecentDecl
- public getMostRecentDecl
- public getName
- public getNameAsString
- public getNameForDiagnostic
- public getObjCFStringFormattingFamily
- public getQualifiedNameAsString
- public getUnderlyingDecl
- public getUnderlyingDecl
- public getVisibility
- public hasExternalFormalLinkage
- public hasLinkage
- public hasLinkageBeenComputed
- public isCXXClassMember
- public isCXXInstanceMember
- public isExternallyDeclarable
- public isExternallyVisible
- public isLinkageValid
- public isReserved
- public printName
- public printNestedNameSpecifier
- public printNestedNameSpecifier
- public printQualifiedName
- public printQualifiedName
- public setDeclName
Inherited from Decl:
- public EnableStatistics
- public PrintStats
- public add
- public addAttr
- public attr_begin
- public attr_end
- public attrs
- public canBeWeakImported
- public castFromDeclContext
- public castToDeclContext
- public classofKind
- public dropAttr
- public dropAttrs
- public dump
- public dump
- public dumpColor
- public getASTContext
- protected getASTMutationListener
- public getAccess
- public getAccessUnsafe
- public getAsFunction
- public getAsFunction
- public getAttr
- public getAttrs
- public getAttrs
- public getAvailability
- public getBeginLoc
- public getBody
- public getBodyRBrace
- protected getCachedLinkage
- public getCanonicalDecl
- public getCanonicalDecl
- public getDeclContext
- public getDeclContext
- public getDeclKindName
- public getDefiningAttr
- public getDescribedTemplate
- public getDescribedTemplateParams
- public getEndLoc
- public getExternalSourceSymbolAttr
- public getFriendObjectKind
- public getFunctionType
- public getGlobalID
- public getID
- public getIdentifierNamespace
- public getIdentifierNamespaceForKind
- public getImportedOwningModule
- public getKind
- public getLangOpts
- public getLexicalDeclContext
- public getLexicalDeclContext
- public getLocalOwningModule
- public getLocation
- public getMaxAlignment
- public getModuleOwnershipKind
- public getMostRecentDecl
- public getMostRecentDecl
- protected getMostRecentDeclImpl
- public getNextDeclInContext
- public getNextDeclInContext
- protected getNextRedeclarationImpl
- public getNonClosureContext
- public getNonClosureContext
- public getOwningModule
- public getOwningModuleForLinkage
- public getOwningModuleID
- public getParentFunctionOrMethod
- public getParentFunctionOrMethod
- public getPreviousDecl
- public getPreviousDecl
- protected getPreviousDeclImpl
- public getSourceRange
- public getTemplateDepth
- public getTranslationUnitDecl
- public getTranslationUnitDecl
- public getVersionIntroduced
- public hasAttr
- public hasAttrs
- public hasBody
- protected hasCachedLinkage
- public hasDefiningAttr
- protected hasLocalOwningModuleStorage
- public hasOwningModule
- public hasTagIdentifierNamespace
- public isCanonicalDecl
- public isDefinedOutsideFunctionOrMethod
- public isDeprecated
- public isDiscardedInGlobalModuleFragment
- public isFirstDecl
- public isFromASTFile
- public isFunctionOrFunctionTemplate
- public isImplicit
- public isInAnonymousNamespace
- public isInExportDeclContext
- public isInIdentifierNamespace
- public isInLocalScopeForInstantiation
- public isInStdNamespace
- public isInvalidDecl
- public isInvisibleOutsideTheOwningModule
- public isLocalExternDecl
- public isModulePrivate
- public isOutOfLine
- public isParameterPack
- public isReachable
- public isReferenced
- public isTagIdentifierNamespace
- public isTemplateDecl
- public isTemplateParameter
- public isTemplateParameterPack
- public isTemplated
- public isThisDeclarationReferenced
- public isTopLevelDeclInObjCContainer
- public isUnavailable
- public isUnconditionallyVisible
- public isUsed
- public isWeakImported
- public markUsed
- public print
- public print
- public printGroup
- public redecls
- public redecls_begin
- public redecls_end
- public setAccess
- public setAttrs
- protected setCachedLinkage
- public setDeclContext
- public setFromASTFile
- public setImplicit
- public setInvalidDecl
- public setIsUsed
- public setLexicalDeclContext
- public setLocalExternDecl
- public setLocalOwningModule
- public setLocation
- public setModuleOwnershipKind
- protected setModulePrivate
- public setNonMemberOperator
- public setObjectOfFriendDecl
- public setOwningModuleID
- public setReferenced
- public setTopLevelDeclInObjCContainer
- public setVisibleDespiteOwningModule
- public specific_attr_begin
- public specific_attr_end
- public specific_attrs
- protected updateOutOfDate
Methods
¶static clang::MSPropertyDecl* Create(
clang::ASTContext& C,
clang::DeclContext* DC,
clang::SourceLocation L,
clang::DeclarationName N,
clang::QualType T,
clang::TypeSourceInfo* TInfo,
clang::SourceLocation StartL,
clang::IdentifierInfo* Getter,
clang::IdentifierInfo* Setter)
static clang::MSPropertyDecl* Create(
clang::ASTContext& C,
clang::DeclContext* DC,
clang::SourceLocation L,
clang::DeclarationName N,
clang::QualType T,
clang::TypeSourceInfo* TInfo,
clang::SourceLocation StartL,
clang::IdentifierInfo* Getter,
clang::IdentifierInfo* Setter)
Declared at: clang/include/clang/AST/DeclCXX.h:4133
Parameters
- clang::ASTContext& C
- clang::DeclContext* DC
- clang::SourceLocation L
- clang::DeclarationName N
- clang::QualType T
- clang::TypeSourceInfo* TInfo
- clang::SourceLocation StartL
- clang::IdentifierInfo* Getter
- clang::IdentifierInfo* Setter
¶static clang::MSPropertyDecl* CreateDeserialized(
clang::ASTContext& C,
unsigned int ID)
static clang::MSPropertyDecl* CreateDeserialized(
clang::ASTContext& C,
unsigned int ID)
Declared at: clang/include/clang/AST/DeclCXX.h:4137
Parameters
- clang::ASTContext& C
- unsigned int ID
¶MSPropertyDecl(clang::DeclContext* DC,
clang::SourceLocation L,
clang::DeclarationName N,
clang::QualType T,
clang::TypeSourceInfo* TInfo,
clang::SourceLocation StartL,
clang::IdentifierInfo* Getter,
clang::IdentifierInfo* Setter)
MSPropertyDecl(clang::DeclContext* DC,
clang::SourceLocation L,
clang::DeclarationName N,
clang::QualType T,
clang::TypeSourceInfo* TInfo,
clang::SourceLocation StartL,
clang::IdentifierInfo* Getter,
clang::IdentifierInfo* Setter)
Declared at: clang/include/clang/AST/DeclCXX.h:4123
Parameters
- clang::DeclContext* DC
- clang::SourceLocation L
- clang::DeclarationName N
- clang::QualType T
- clang::TypeSourceInfo* TInfo
- clang::SourceLocation StartL
- clang::IdentifierInfo* Getter
- clang::IdentifierInfo* Setter
¶void anchor()
void anchor()
Declared at: clang/include/clang/AST/DeclCXX.h:4129
¶static bool classof(const clang::Decl* D)
static bool classof(const clang::Decl* D)
Declared at: clang/include/clang/AST/DeclCXX.h:4139
Parameters
- const clang::Decl* D
¶clang::IdentifierInfo* getGetterId() const
clang::IdentifierInfo* getGetterId() const
Declared at: clang/include/clang/AST/DeclCXX.h:4142
¶clang::IdentifierInfo* getSetterId() const
clang::IdentifierInfo* getSetterId() const
Declared at: clang/include/clang/AST/DeclCXX.h:4144
¶bool hasGetter() const
bool hasGetter() const
Declared at: clang/include/clang/AST/DeclCXX.h:4141
¶bool hasSetter() const
bool hasSetter() const
Declared at: clang/include/clang/AST/DeclCXX.h:4143