clang API Documentation

Public Member Functions | Static Public Member Functions | Friends
clang::MSPropertyDecl Class Reference

#include <DeclCXX.h>

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

List of all members.

Public Member Functions

bool hasGetter () const
IdentifierInfogetGetterId () const
bool hasSetter () const
IdentifierInfogetSetterId () const

Static Public Member Functions

static MSPropertyDeclCreate (ASTContext &C, DeclContext *DC, SourceLocation L, DeclarationName N, QualType T, TypeSourceInfo *TInfo, SourceLocation StartL, IdentifierInfo *Getter, IdentifierInfo *Setter)
static MSPropertyDeclCreateDeserialized (ASTContext &C, unsigned ID)
static bool classof (const Decl *D)

Friends

class ASTDeclReader

Detailed 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.

Definition at line 3218 of file DeclCXX.h.


Member Function Documentation

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

Reimplemented from clang::DeclaratorDecl.

Definition at line 3234 of file DeclCXX.h.

References clang::Decl::getKind().

MSPropertyDecl * MSPropertyDecl::Create ( ASTContext C,
DeclContext DC,
SourceLocation  L,
DeclarationName  N,
QualType  T,
TypeSourceInfo TInfo,
SourceLocation  StartL,
IdentifierInfo Getter,
IdentifierInfo Setter 
) [static]

Definition at line 2169 of file DeclCXX.cpp.

References AttributeLangSupport::C.

Referenced by clang::Sema::HandleMSProperty().

Definition at line 2178 of file DeclCXX.cpp.

References AttributeLangSupport::C.

Definition at line 3237 of file DeclCXX.h.

Referenced by clang::ASTDeclWriter::VisitMSPropertyDecl().

Definition at line 3239 of file DeclCXX.h.

Referenced by clang::ASTDeclWriter::VisitMSPropertyDecl().

Definition at line 3236 of file DeclCXX.h.

Definition at line 3238 of file DeclCXX.h.


Friends And Related Function Documentation

friend class ASTDeclReader [friend]

Reimplemented from clang::DeclaratorDecl.

Definition at line 3241 of file DeclCXX.h.


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