record TCursor

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TCursor = record

Description

A cursor representing some element in the abstract syntax tree for a translation unit.

The cursor abstraction unifies the different kinds of entities in a program–declaration, statements, expressions, references to declarations, etc.–under a single "cursor" abstraction with a common set of operations. Common operation for a cursor include: getting the physical location in a source file where the cursor points, getting the name associated with a cursor, and retrieving cursors for any child nodes of a particular cursor.

Cursors can be produced in two specific ways. ITranslationUnit.Cursor produces a cursor for a translation unit, from which one can use VisitChildren to explore the rest of the translation unit.

ITranslationUnit.GetCursor maps from a physical source location to the entity that resides at that location, allowing one to map from the source code into the AST.

Overview

Methods

class operator Equal(const ALeft, ARight: TCursor): Boolean; inline; static;
class operator NotEqual(const ALeft, ARight: TCursor): Boolean; inline; static;
function Hash: Cardinal; inline;
function GetPlatformAvailability: TPlatformAvailability;
function GetOverriddenCursors: TArray<TCursor>;
function GetSpellingNameRange(const APieceIndex: Integer): TSourceRange;
function IsExternalSymbol(out ALanguage: String; out ADefinedIn: String; out AIsGenerated: Boolean): Boolean;
function GetReferenceNameRange(const AFlags: TNameRefFlags; const APieceIndex: Integer): TSourceRange; inline;
function Evaluate: IEvalResult;

Properties

property Null: TCursor read GetNull;
property Kind: TCursorKind read GetKind;
property IsNull: Boolean read GetIsNull;
property IsDeclaration: Boolean read GetIsDeclaration;
property IsReference: Boolean read GetIsReference;
property IsExpression: Boolean read GetIsExpression;
property IsStatement: Boolean read GetIsStatement;
property IsAttribute: Boolean read GetIsAttribute;
property HasAttributes: Boolean read GetHasAttributes;
property IsInvalid: Boolean read GetIsInvalid;
property IsTranslationUnit: Boolean read GetIsTranslationUnit;
property IsPreprocessing: Boolean read GetIsPreprocessing;
property IsUnexposed: Boolean read GetIsUnexposed;
property Linkage: TLinkageKind read GetLinkage;
property Visibility: TVisibility read GetVisibility;
property Availability: TAvailabilityKind read GetAvailability;
property Language: TLanguageKind read GetLanguage;
property TlsKind: TTlsKind read GetTlsKind;
property SemanticParent: TCursor read GetSemanticParent;
property LexicalParent: TCursor read GetLexicalParent;
property IncludedFile: TFile read GetIncludedFile;
property Location: TSourceLocation read GetLocation;
property Extent: TSourceRange read GetExtent;
property CursorType: TType read GetCursorType;
property TypedefDeclUnderlyingType: TType read GetTypedefDeclUnderlyingType;
property EnumDeclIntegerType: TType read GetEnumDeclIntegerType;
property EnumConstantDeclValue: Int64 read GetEnumConstantDeclValue;
property EnumConstantDeclUnsignedValue: UInt64 read GetEnumConstantDeclUnsignedValue;
property FieldDeclBitWidth: Integer read GetFieldDeclBitWidth;
property ArgumentCount: Integer read GetArgumentCount;
property Arguments[constAIndex:Integer]: TCursor read GetArgument;
property TemplateArgumentCount: Integer read GetTemplateArgumentCount;
property TemplateArgumentKind[constAIndex:Integer]: TTemplateArgumentKind read GetTemplateArgumentKind;
property TemplateArgumentType[constAIndex:Integer]: TType read GetTemplateArgumentType;
property TemplateArgumentValue[constAIndex:Integer]: Int64 read GetTemplateArgumentValue;
property TemplateArgumentUnsignedValue[constAIndex:Integer]: UInt64 read GetTemplateArgumentUnsignedValue;
property IsMacroFunctionLike: Boolean read GetIsMacroFunctionLike;
property IsMacroBuiltin: Boolean read GetIsMacroBuiltin;
property IsFunctionInlined: Boolean read GetIsFunctionInlined;
property DeclObjCTypeEncoding: String read GetDeclObjCTypeEncoding;
property ResultType: TType read GetResultType;
property ExceptionSpecificationType: Integer read GetExceptionSpecificationType;
property OffsetOfField: Int64 read GetOffsetOfField;
property IsAnonymous: Boolean read GetIsAnonymous;
property IsBitField: Boolean read GetIsBitField;
property IsVirtualBase: Boolean read GetIsVirtualBase;
property CxxAccessSpecifier: TCxxAccessSpecifier read GetCxxAccessSpecifier;
property StorageClass: TStorageClass read GetStorageClass;
property OverloadedDeclCount: Integer read GetOverloadedDeclCount;
property OverloadedDecls[constAIndex:Integer]: TCursor read GetOverloadedDecl;
property IBOutletCollectionType: TType read GetIBOutletCollectionType;
property Usr: TUnifiedSymbolResolution read GetUsr;
property Spelling: String read GetSpelling;
property DisplayName: String read GetDisplayName;
property Referenced: TCursor read GetReferenced;
property Definition: TCursor read GetDefinition;
property IsDefinition: Boolean read GetIsDefinition;
property Canonical: TCursor read GetCanonical;
property ObjCSelectorIndex: Integer read GetObjCSelectorIndex;
property IsDynamicCall: Boolean read GetIsDynamicCall;
property ReceiverType: TType read GetReceiverType;
property ObjCPropertyAttributes: TObjCPropertyAttrKinds read GetObjCPropertyAttributes;
property ObjCDeclQualifiers: TObjCDeclQualifierKinds read GetObjCDeclQualifiers;
property IsObjCOptional: Boolean read GetIsObjCOptional;
property IsVariadic: Boolean read GetIsVariadic;
property CommentRange: TSourceRange read GetCommentRange;
property RawComment: String read GetRawComment;
property BriefComment: String read GetBriefComment;
property Mangling: String read GetMangling;
property CxxManglings: TArray<String> read GetCxxManglings;
property ObjCManglings: TArray<String> read GetObjCManglings;
property Module: TModule read GetModule;
property CxxConstructorIsConvertingConstructor: Boolean read GetCxxConstructorIsConvertingConstructor;
property CxxConstructorIsCopyConstructor: Boolean read GetCxxConstructorIsCopyConstructor;
property CxxConstructorIsDefaultConstructor: Boolean read GetCxxConstructorIsDefaultConstructor;
property CxxConstructorIsMoveConstructor: Boolean read GetCxxConstructorIsMoveConstructor;
property CxxFieldIsMutable: Boolean read GetCxxFieldIsMutable;
property CxxMethodIsDefaulted: Boolean read GetCxxMethodIsDefaulted;
property CxxMethodIsPureVirtual: Boolean read GetCxxMethodIsPureVirtual;
property CxxMethodIsStatic: Boolean read GetCxxMethodIsStatic;
property CxxMethodIsVirtual: Boolean read GetCxxMethodIsVirtual;
property CxxRecordIsAbstract: Boolean read GetCxxRecordIsAbstract;
property EnumDeclIsScoped: Boolean read GetEnumDeclIsScoped;
property CxxMethodIsConst: Boolean read GetCxxMethodIsConst;
property TemplateCursorKind: TCursorKind read GetTemplateCursorKind;
property SpecializedCursorTemplate: TCursor read GetSpecializedCursorTemplate;
property CompletionString: TCompletionString read GetCompletionString;
property ParsedComment: TComment read GetParsedComment;
property Handle: TCXCursor read FHandle;

Description

Methods

class operator Equal(const ALeft, ARight: TCursor): Boolean; inline; static;

Determine whether two cursors are equivalent.

class operator NotEqual(const ALeft, ARight: TCursor): Boolean; inline; static;
 
function Hash: Cardinal; inline;

Compute a hash value for the given cursor.

function GetPlatformAvailability: TPlatformAvailability;

Determine the availability of the entity that this cursor refers to on any platforms for which availability information is known.

Returns

Global and platform-specific availibility

function GetOverriddenCursors: TArray<TCursor>;

Determine the set of methods that are overridden by the given method.

In both Objective-C and C++, a method (aka virtual member function, in C++) can override a virtual method in a base class. For Objective-C, a method is said to override any method in the class's base class, its protocols, or its categories' protocols, that has the same selector and is of the same kind (class or instance). If no such method exists, the search continues to the class's superclass, its protocols, and its categories, and so on. A method from an Objective-C implementation is considered to override the same methods as its corresponding method in the interface.

For C++, a virtual member function overrides any virtual member function with the same signature that occurs in its base classes. With multiple inheritance, a virtual member function can override several virtual member functions coming from different base classes.

In all cases, this function determines the immediate overridden method, rather than all of the overridden methods. For example, if a method is originally declared in a class A, then overridden in B (which in inherits from A) and also in C (which inherited from B), then the only overridden method returned from this function when invoked on C's method will be B's method. The client may then invoke this function again, given the previously-found overridden methods, to map out the complete method-override set.

Returns

List of cursors, representing the set of overridden methods, or nil if there are no overridden methods.

function GetSpellingNameRange(const APieceIndex: Integer): TSourceRange;

Retrieve a range for a piece that forms the cursors spelling name.

Most of the times there is only one range for the complete spelling but for Objective-C methods and Objective-C message expressions, there are multiple pieces for each selector identifier.

Parameters
APieceIndex
the index of the spelling name piece.
Returns

The source range. If APieceIndex is greater than the actual number of pieces, it will return a NullL (invalid) range.

function IsExternalSymbol(out ALanguage: String; out ADefinedIn: String; out AIsGenerated: Boolean): Boolean;

Returns True if the cursor points to a symbol marked with external_source_symbol attribute.

Parameters
ALanguage
if the attribute is present, will be set to the 'language' string from the attribute.
ADefinedIn
if the attribute is present, will be set to the 'definedIn' string from the attribute.
AIsGenerated
if the attribute is present, will be set to True if the 'generated_declaration' is set in the attribute.
Returns

True if the cursor points to a symbol marked with external_source_symbol attribute.

function GetReferenceNameRange(const AFlags: TNameRefFlags; const APieceIndex: Integer): TSourceRange; inline;

Given a cursor that references something else, return the source range covering that reference.

Parameters
AFlags
configuration flags.
APieceIndex
for contiguous names or when passing the flag WantSinglePiece, only one piece with index 0 is available. When the WantSinglePiece flag is not passed for a non-contiguous names, this index can be used to retrieve the individual pieces of the name.
Returns

The piece of the name pointed to by the given cursor. If there is no name, or if APieceIndex is out-of-range, a Null-cursor will be returned.

function Evaluate: IEvalResult;

If cursor is a statement declaration tries to evaluate the statement and if its variable, tries to evaluate its initializer, into its corresponding type.

Properties

property Null: TCursor read GetNull;

The Null cursor, which represents no entity.

property Kind: TCursorKind read GetKind;

The kind of the cursor.

property IsNull: Boolean read GetIsNull;

True if this is a Null cursor.

property IsDeclaration: Boolean read GetIsDeclaration;

Whether the cursor represents a declaration.

property IsReference: Boolean read GetIsReference;

Whether the cursor represents a simple reference.

Note that other kinds of cursors (such as expressions) can also refer to other cursors. Use CursorReferenced to determine whether a particular cursor refers to another entity.

property IsExpression: Boolean read GetIsExpression;

Whether the cursor represents an expression.

property IsStatement: Boolean read GetIsStatement;

Whether the cursor represents a statement.

property IsAttribute: Boolean read GetIsAttribute;

Whether the cursor represents an attribute.

property HasAttributes: Boolean read GetHasAttributes;

Whether the cursor has any attributes.

property IsInvalid: Boolean read GetIsInvalid;

Whether the cursor represents an invalid cursor.

property IsTranslationUnit: Boolean read GetIsTranslationUnit;

Whether the cursor represents a translation unit.

property IsPreprocessing: Boolean read GetIsPreprocessing;

Whether the cursor represents a preprocessing element, such as a preprocessor directive or macro instantiation.

property IsUnexposed: Boolean read GetIsUnexposed;

Determine whether the cursor represents a currently unexposed piece of the AST (e.g., TCursorKind.UnexposedStmt).

property Linkage: TLinkageKind read GetLinkage;

The linkage of the entity referred to by the cursor.

property Visibility: TVisibility read GetVisibility;

The visibility of the entity referred to by a cursor.

This returns the default visibility if not explicitly specified by a visibility attribute. The default visibility may be changed by commandline arguments.

property Availability: TAvailabilityKind read GetAvailability;

The availability of the entity that this cursor refers to, taking the current target platform into account.

property Language: TLanguageKind read GetLanguage;

The "language" of the entity referred to by the cursor.

property TlsKind: TTlsKind read GetTlsKind;

The "thread-local storage (TLS) kind" of the declaration referred to by the cursor.

property SemanticParent: TCursor read GetSemanticParent;

The semantic parent of the given cursor.

The semantic parent of a cursor is the cursor that semantically contains the given cursor. For many declarations, the lexical and semantic parents are equivalent (the lexical parent is returned by LexicalParent). They diverge when declarations or definitions are provided out-of-line. For example:

        class C {
         void f();
        };
        void C::f() { }
      

In the out-of-line definition of C::f, the semantic parent is the class C, of which this function is a member. The lexical parent is the place where the declaration actually occurs in the source code; in this case, the definition occurs in the translation unit. In general, the lexical parent for a given entity can change without affecting the semantics of the program, and the lexical parent of different declarations of the same entity may be different. Changing the semantic parent of a declaration, on the other hand, can have a major impact on semantics, and redeclarations of a particular entity should all have the same semantic context.

In the example above, both declarations of C::f have C as their semantic context, while the lexical context of the first C::f is C and the lexical context of the second C::f is the translation unit.

For global declarations, the semantic parent is the translation unit.

property LexicalParent: TCursor read GetLexicalParent;

The lexical parent of the given cursor.

The lexical parent of a cursor is the cursor in which the given cursor was actually written. For many declarations, the lexical and semantic parents are equivalent (the semantic parent is returned by SemanticParent). They diverge when declarations or definitions are provided out-of-line. For example:

        class C {
         void f();
        };

        void C::f() { }
      

In the out-of-line definition of C::f, the semantic parent is the class C, of which this function is a member. The lexical parent is the place where the declaration actually occurs in the source code; in this case, the definition occurs in the translation unit. In general, the lexical parent for a given entity can change without affecting the semantics of the program, and the lexical parent of different declarations of the same entity may be different. Changing the semantic parent of a declaration, on the other hand, can have a major impact on semantics, and redeclarations of a particular entity should all have the same semantic context.

In the example above, both declarations of C::f have C as their semantic context, while the lexical context of the first C::f is C and the lexical context of the second C::f is the translation unit.

For declarations written in the global scope, the lexical parent is the translation unit.

property IncludedFile: TFile read GetIncludedFile;

The file that is included by the given inclusion directive cursor.

property Location: TSourceLocation read GetLocation;

The physical location of the source constructor referenced by the cursor.

The location of a declaration is typically the location of the name of that declaration, where the name of that declaration would occur if it is unnamed, or some keyword that introduces that particular declaration. The location of a reference is where that reference occurs within the source code.

property Extent: TSourceRange read GetExtent;

The physical extent of the source construct referenced by the cursor.

The extent of a cursor starts with the file/line/column pointing at the first character within the source construct that the cursor refers to and ends with the last character within that source construct. For a declaration, the extent covers the declaration itself. For a reference, the extent covers the location of the reference (e.g., where the referenced entity was actually used).

property CursorType: TType read GetCursorType;

The type of the Cursor (if any).

property TypedefDeclUnderlyingType: TType read GetTypedefDeclUnderlyingType;

The underlying type of a typedef declaration.

If the cursor does not reference a typedef declaration, an invalid type is returned.

property EnumDeclIntegerType: TType read GetEnumDeclIntegerType;

The integer type of an enum declaration.

If the cursor does not reference an enum declaration, an invalid type is returned.

property EnumConstantDeclValue: Int64 read GetEnumConstantDeclValue;

The integer value of an enum constant declaration as a signed Int64.

If the cursor does not reference an enum constant declaration, Int64.MinValue is returned. Since this is also potentially a valid constant value, the kind of the cursor must be verified before calling this function.

property EnumConstantDeclUnsignedValue: UInt64 read GetEnumConstantDeclUnsignedValue;

The integer value of an enum constant declaration as an UInt64.

If the cursor does not reference an enum constant declaration, UInt64.MaxValue is returned. Since this is also potentially a valid constant value, the kind of the cursor must be verified before calling this function.

property FieldDeclBitWidth: Integer read GetFieldDeclBitWidth;

The bit width of a bit field declaration as an integer. If a cursor that is not a bit field declaration is passed in, -1 is returned.

property ArgumentCount: Integer read GetArgumentCount;

The number of non-variadic arguments associated with the cursor.

The number of arguments can be determined for calls as well as for declarations of functions or methods. For other cursors -1 is returned.

property Arguments[constAIndex:Integer]: TCursor read GetArgument;

The argument cursor of a function or method.

The argument cursor can be determined for calls as well as for declarations of functions or methods. For other cursors and for invalid indices, an invalid cursor is returned.

property TemplateArgumentCount: Integer read GetTemplateArgumentCount;

The number of template args of a function decl representing a template specialization.

If the argument cursor cannot be converted into a template function declaration, -1 is returned.

For example, for the following declaration and specialization:

        template <typename T, int kInt, bool kBool>
        void foo() { ... }

        template <>
        void foo<float, -7, true>();
      

The value 3 would be returned from this property.

property TemplateArgumentKind[constAIndex:Integer]: TTemplateArgumentKind read GetTemplateArgumentKind;

The kind of the I'th template argument of the cursor.

If the argument cursor does not represent a FunctionDecl, an invalid template argument kind is returned.

For example, for the following declaration and specialization:

        template <typename T, int kInt, bool kBool>
        void foo() { ... }

        template <>
        void foo<float, -7, true>();
      

For I = 0, 1, and 2, Type, Integral, and Integral will be returned, respectively.

property TemplateArgumentType[constAIndex:Integer]: TType read GetTemplateArgumentType;

The type of a TemplateArgument of a function decl representing a template specialization.

If the argument cursor does not represent a FunctionDecl whose I'th template argument has a kind of CXTemplateArgKind_Integral, an invalid type is returned.

For example, for the following declaration and specialization:

        template <typename T, int kInt, bool kBool>
        void foo() { ... }

        template <>
        void foo<float, -7, true>();
      

If called with I = 0, "float", will be returned. Invalid types will be returned for I = 1 or 2.

property TemplateArgumentValue[constAIndex:Integer]: Int64 read GetTemplateArgumentValue;

The value of an Integral TemplateArgument (of a function decl representing a template specialization) as a signed Int64.

It is undefined to call this function on a cursor that does not represent a FunctionDecl or whose I'th template argument is not an integral value.

For example, for the following declaration and specialization:

        template <typename T, int kInt, bool kBool>
        void foo() { ... }

        template <>
        void foo<float, -7, true>();
      

If called with I = 1 or 2, -7 or true will be returned, respectively. For I = 0, this function's behavior is undefined.

property TemplateArgumentUnsignedValue[constAIndex:Integer]: UInt64 read GetTemplateArgumentUnsignedValue;

The value of an Integral TemplateArgument (of a function decl representing a template specialization) as an UInt64.

It is undefined to call this function on a cursor that does not represent a FunctionDecl or whose I'th template argument is not an integral value.

For example, for the following declaration and specialization:

        template <typename T, int kInt, bool kBool>
        void foo() { ... }

        template <>
        void foo<float, 2147483649, true>();
      

If called with I = 1 or 2, 2147483649 or true will be returned, respectively. For I = 0, this function's behavior is undefined.

property IsMacroFunctionLike: Boolean read GetIsMacroFunctionLike;

Whether the cursor that is a macro, is function like.

property IsMacroBuiltin: Boolean read GetIsMacroBuiltin;

Whether the cursor that is a macro, is a builtin one.

property IsFunctionInlined: Boolean read GetIsFunctionInlined;

Whether the cursor that is a function declaration, is an inline declaration.

property DeclObjCTypeEncoding: String read GetDeclObjCTypeEncoding;

The Objective-C type encoding for the specified declaration.

property ResultType: TType read GetResultType;

The return type associated with a given cursor.

This only returns a valid type if the cursor refers to a function or method.

property ExceptionSpecificationType: Integer read GetExceptionSpecificationType;

The exception specification type associated with a given cursor.

This only returns a valid result if the cursor refers to a function or method.

property OffsetOfField: Int64 read GetOffsetOfField;

The offset of the field represented by the Cursor.

property IsAnonymous: Boolean read GetIsAnonymous;

Whether the cursor represents an anonymous record declaration.

property IsBitField: Boolean read GetIsBitField;

Whether the cursor specifies a Record member that is a bitfield.

property IsVirtualBase: Boolean read GetIsVirtualBase;

Whether the base class specified by the cursor with kind CXXBaseSpecifier is virtual.

property CxxAccessSpecifier: TCxxAccessSpecifier read GetCxxAccessSpecifier;

The access control level for the referenced object.

If the cursor refers to a C++ declaration, its access control level within its parent scope is returned. Otherwise, if the cursor refers to a base specifier or access specifier, the specifier itself is returned.

property StorageClass: TStorageClass read GetStorageClass;

The storage class for a function or variable declaration.

If the cursor is not a function or variable declaration, Invalid is returned else the storage class.

property OverloadedDeclCount: Integer read GetOverloadedDeclCount;

The number of overloaded declarations referenced by a OverloadedDeclRef cursor. If it is not a OverloadedDeclRef cursor, returns 0.

property OverloadedDecls[constAIndex:Integer]: TCursor read GetOverloadedDecl;

Retrieve a cursor for one of the overloaded declarations referenced by a OverloadedDeclRef cursor.

If the cursor does not have an associated set of overloaded declarations, or if the index is out of bounds, TCursor.Null.

property IBOutletCollectionType: TType read GetIBOutletCollectionType;

For cursors representing an iboutletcollection attribute, this property returns the collection element type.

property Usr: TUnifiedSymbolResolution read GetUsr;

The Unified Symbol Resolution (USR) for the entity referenced by the given cursor.

A Unified Symbol Resolution (USR) is a string that identifies a particular entity (function, class, variable, etc.) within a program. USRs can be compared across translation units to determine, e.g., when references in one translation refer to an entity defined in another translation unit.

property Spelling: String read GetSpelling;

The name for the entity referenced by this cursor.

property DisplayName: String read GetDisplayName;

The display name for the entity referenced by this cursor.

The display name contains extra information that helps identify the cursor, such as the parameters of a function or template or the arguments of a class template specialization.

property Referenced: TCursor read GetReferenced;

For a cursor that is a reference, retrieve a cursor representing the entity that it references.

Reference cursors refer to other entities in the AST. For example, an Objective-C superclass reference cursor refers to an Objective-C class. This function produces the cursor for the Objective-C class from the cursor for the superclass reference. If the input cursor is a declaration or definition, it returns that declaration or definition unchanged. Otherwise, returns the Null cursor.

property Definition: TCursor read GetDefinition;

For a cursor that is either a reference to or a declaration of some entity, retrieve a cursor that describes the definition of that entity.

Some entities can be declared multiple times within a translation unit, but only one of those declarations can also be a definition. For example, given:

        int f(int, int);
        int g(int x, int y) { return f(x, y); }
        int f(int a, int b) { return a + b; }
        int f(int, int);
      

there are three declarations of the function "f", but only the second one is a definition. The Definition property will take any cursor pointing to a declaration of "f" (the first or fourth lines of the example) or a cursor referenced that uses "f" (the call to "f' inside "g") and will return a declaration cursor pointing to the definition (the second "f" declaration).

If given a cursor for which there is no corresponding definition, e.g., because there is no definition of that entity within this translation unit, returns a Null cursor.

property IsDefinition: Boolean read GetIsDefinition;

Whether the declaration pointed to by this cursor is also a definition of that entity.

property Canonical: TCursor read GetCanonical;

The canonical cursor corresponding to the given cursor.

In the C family of languages, many kinds of entities can be declared several times within a single translation unit. For example, a structure type can be forward-declared (possibly multiple times) and later defined:

        struct X;
        struct X;
        struct X {
          int member;
        };
      

The declarations and the definition of X are represented by three different cursors, all of which are declarations of the same underlying entity. One of these cursor is considered the "canonical" cursor, which is effectively the representative for the underlying entity. One can determine if two cursors are declarations of the same underlying entity by comparing their canonical cursors.

property ObjCSelectorIndex: Integer read GetObjCSelectorIndex;

If the cursor points to a selector identifier in an Objective-C method or message expression, this returns the selector index, otherwise it returns -1.

After getting a curso, this can be called to determine if the location points to a selector identifier.

property IsDynamicCall: Boolean read GetIsDynamicCall;

Given a cursor pointing to a C++ method call or an Objective-C message, returns True if the method/message is "dynamic", meaning:

For a C++ method: the call is virtual. For an Objective-C message: the receiver is an object instance, not 'super' or a specific class.

If the method/message is "static" or the cursor does not point to a method/message, it will return False.

property ReceiverType: TType read GetReceiverType;

Given a cursor pointing to an Objective-C message or property reference, or C++ method call, returns the TType of the receiver.

property ObjCPropertyAttributes: TObjCPropertyAttrKinds read GetObjCPropertyAttributes;

Given a cursor that represents a property declaration, return the associated property attributes.

property ObjCDeclQualifiers: TObjCDeclQualifierKinds read GetObjCDeclQualifiers;

Given a cursor that represents an Objective-C method or parameter declaration, return the associated Objective-C qualifiers for the return type or the parameter respectively.

property IsObjCOptional: Boolean read GetIsObjCOptional;

Given a cursor that represents an Objective-C method or property declaration, return True if the declaration was affected by "@optional". Returns False if the cursor is not such a declaration or it is "@required".

property IsVariadic: Boolean read GetIsVariadic;

True if the cursor is a variadic function or method.

property CommentRange: TSourceRange read GetCommentRange;

Given a cursor that represents a declaration, return the associated comment's source range. The range may include multiple consecutive comments with whitespace in between.

property RawComment: String read GetRawComment;

Given a cursor that represents a declaration, return the associated comment text, including comment markers.

property BriefComment: String read GetBriefComment;

Given a cursor that represents a documentable entity (e.g., declaration), return the associated "brief" paragraph; otherwise return the first paragraph.

property Mangling: String read GetMangling;

The mangled name of the cursor.

property CxxManglings: TArray<String> read GetCxxManglings;

The mangled symbols of the C++ constructor or destructor at the cursor.

property ObjCManglings: TArray<String> read GetObjCManglings;

The mangled symbols of the ObjC class interface or implementation at the cursor.

property Module: TModule read GetModule;

Given a ModuleImportDecl cursor, return the associated module.

property CxxConstructorIsConvertingConstructor: Boolean read GetCxxConstructorIsConvertingConstructor;

Whether a C++ constructor is a converting constructor.

property CxxConstructorIsCopyConstructor: Boolean read GetCxxConstructorIsCopyConstructor;

Whether a C++ constructor is a copy constructor.

property CxxConstructorIsDefaultConstructor: Boolean read GetCxxConstructorIsDefaultConstructor;

Whether a C++ constructor is the default constructor.

property CxxConstructorIsMoveConstructor: Boolean read GetCxxConstructorIsMoveConstructor;

Whether a C++ constructor is a move constructor.

property CxxFieldIsMutable: Boolean read GetCxxFieldIsMutable;

Whether a C++ field is declared 'mutable'.

property CxxMethodIsDefaulted: Boolean read GetCxxMethodIsDefaulted;

Whether a C++ method is declared '= default'.

property CxxMethodIsPureVirtual: Boolean read GetCxxMethodIsPureVirtual;

Whether a C++ member function or member function template is pure virtual.

property CxxMethodIsStatic: Boolean read GetCxxMethodIsStatic;

Whether a C++ member function or member function template is declared 'static'.

property CxxMethodIsVirtual: Boolean read GetCxxMethodIsVirtual;

Whether a C++ member function or member function template is explicitly declared 'virtual' or if it overrides a virtual method from one of the base classes.

property CxxRecordIsAbstract: Boolean read GetCxxRecordIsAbstract;

Whether a C++ record is abstract, i.e. whether a class or struct has a pure virtual member function.

property EnumDeclIsScoped: Boolean read GetEnumDeclIsScoped;

Whether an enum declaration refers to a scoped enum.

property CxxMethodIsConst: Boolean read GetCxxMethodIsConst;

Whether a C++ member function or member function template is declared 'const'.

property TemplateCursorKind: TCursorKind read GetTemplateCursorKind;

Given a cursor that represents a template, determine the cursor kind of the specializations would be generated by instantiating the template.

This property can be used to determine what flavor of function template, class template, or class template partial specialization is stored in the cursor. For example, it can describe whether a class template cursor is declared with "struct", "class" or "union".

If the cursor is not a template, returns NoDeclFound.

property SpecializedCursorTemplate: TCursor read GetSpecializedCursorTemplate;

Given a cursor that may represent a specialization or instantiation of a template, retrieve the cursor that represents the template that it specializes or from which it was instantiated.

This routine determines the template involved both for explicit specializations of templates and for implicit instantiations of the template, both of which are referred to as "specializations". For a class template specialization (e.g., std::vector<bool>), this routine will return either the primary template (std::vector) or, if the specialization was instantiated from a class template partial specialization, the class template partial specialization. For a class template partial specialization and a function template specialization (including instantiations), this this routine will return the specialized template.

For members of a class template (e.g., member functions, member classes, or static data members), returns the specialized or instantiated member. Although not strictly "templates" in the C++ language, members of class templates have the same notions of specializations and instantiations that templates do, so this routine treats them similarly.

If the cursor is NOT a specialization or instantiation of a template or a member thereof, returns a Null cursor.

property CompletionString: TCompletionString read GetCompletionString;

A non-context-sensitive completion string for declaration and macro definition cursors, or a Null string for other kinds of cursors.

property ParsedComment: TComment read GetParsedComment;

Given a cursor that represents a documentable entity (e.g., declaration), return the associated parsed comment as aFullComment AST node.

property Handle: TCXCursor read FHandle;

Internal handle to C API


Generated by PasDocEx, based on PasDoc 0.14.0.