clang 19.0.0git
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
clang::extractapi::APIRecord Struct Referenceabstract

The base representation of an API record. Holds common symbol information. More...

#include "clang/ExtractAPI/API.h"

Inheritance diagram for clang::extractapi::APIRecord:
Inheritance graph
[legend]

Public Types

enum  RecordKind {
  RK_Unknown , RK_FirstRecordContext , RK_Namespace , RK_Enum ,
  RK_Struct , RK_Union , RK_ObjCInterface , RK_ObjCCategory ,
  RK_ObjCProtocol , RK_CXXClass , RK_ClassTemplate , RK_ClassTemplateSpecialization ,
  RK_ClassTemplatePartialSpecialization , RK_StructField , RK_UnionField , RK_CXXField ,
  RK_StaticField , RK_CXXFieldTemplate , RK_GlobalVariable , RK_GlobalVariableTemplate ,
  RK_GlobalVariableTemplateSpecialization , RK_GlobalVariableTemplatePartialSpecialization , RK_LastRecordContext , RK_GlobalFunction ,
  RK_GlobalFunctionTemplate , RK_GlobalFunctionTemplateSpecialization , RK_EnumConstant , RK_Concept ,
  RK_CXXStaticMethod , RK_CXXInstanceMethod , RK_CXXConstructorMethod , RK_CXXDestructorMethod ,
  RK_CXXMethodTemplate , RK_CXXMethodTemplateSpecialization , RK_ObjCInstanceProperty , RK_ObjCClassProperty ,
  RK_ObjCIvar , RK_ObjCClassMethod , RK_ObjCInstanceMethod , RK_MacroDefinition ,
  RK_Typedef
}
 Discriminator for LLVM-style RTTI (dyn_cast<> et al.) More...
 

Public Member Functions

APIRecordgetNextInContext () const
 
RecordKind getKind () const
 
 APIRecord ()=delete
 
 APIRecord (RecordKind Kind, StringRef USR, StringRef Name, SymbolReference Parent, PresumedLoc Location, AvailabilityInfo Availability, LinkageInfo Linkage, const DocComment &Comment, DeclarationFragments Declaration, DeclarationFragments SubHeading, bool IsFromSystemHeader, AccessControl Access=AccessControl())
 
 APIRecord (RecordKind Kind, StringRef USR, StringRef Name)
 
virtual ~APIRecord ()=0
 

Static Public Member Functions

static APIRecordcastFromRecordContext (const RecordContext *Ctx)
 
static RecordContextcastToRecordContext (const APIRecord *Record)
 
static bool classof (const APIRecord *Record)
 
static bool classofKind (RecordKind K)
 
static bool classof (const RecordContext *Ctx)
 

Public Attributes

StringRef USR
 
StringRef Name
 
SymbolReference Parent
 
PresumedLoc Location
 
AvailabilityInfo Availability
 
LinkageInfo Linkage
 
DocComment Comment
 Documentation comment lines attached to this symbol declaration.
 
DeclarationFragments Declaration
 Declaration fragments of this symbol declaration.
 
DeclarationFragments SubHeading
 SubHeading provides a more detailed representation than the plain declaration name.
 
bool IsFromSystemHeader
 Whether the symbol was defined in a system header.
 
AccessControl Access
 

Friends

class RecordContext
 

Detailed Description

The base representation of an API record. Holds common symbol information.

Definition at line 192 of file API.h.

Member Enumeration Documentation

◆ RecordKind

Discriminator for LLVM-style RTTI (dyn_cast<> et al.)

Enumerator
RK_Unknown 
RK_FirstRecordContext 
RK_Namespace 
RK_Enum 
RK_Struct 
RK_Union 
RK_ObjCInterface 
RK_ObjCCategory 
RK_ObjCProtocol 
RK_CXXClass 
RK_ClassTemplate 
RK_ClassTemplateSpecialization 
RK_ClassTemplatePartialSpecialization 
RK_StructField 
RK_UnionField 
RK_CXXField 
RK_StaticField 
RK_CXXFieldTemplate 
RK_GlobalVariable 
RK_GlobalVariableTemplate 
RK_GlobalVariableTemplateSpecialization 
RK_GlobalVariableTemplatePartialSpecialization 
RK_LastRecordContext 
RK_GlobalFunction 
RK_GlobalFunctionTemplate 
RK_GlobalFunctionTemplateSpecialization 
RK_EnumConstant 
RK_Concept 
RK_CXXStaticMethod 
RK_CXXInstanceMethod 
RK_CXXConstructorMethod 
RK_CXXDestructorMethod 
RK_CXXMethodTemplate 
RK_CXXMethodTemplateSpecialization 
RK_ObjCInstanceProperty 
RK_ObjCClassProperty 
RK_ObjCIvar 
RK_ObjCClassMethod 
RK_ObjCInstanceMethod 
RK_MacroDefinition 
RK_Typedef 

Definition at line 194 of file API.h.

Constructor & Destructor Documentation

◆ APIRecord() [1/3]

clang::extractapi::APIRecord::APIRecord ( )
delete

◆ APIRecord() [2/3]

clang::extractapi::APIRecord::APIRecord ( RecordKind  Kind,
StringRef  USR,
StringRef  Name,
SymbolReference  Parent,
PresumedLoc  Location,
AvailabilityInfo  Availability,
LinkageInfo  Linkage,
const DocComment Comment,
DeclarationFragments  Declaration,
DeclarationFragments  SubHeading,
bool  IsFromSystemHeader,
AccessControl  Access = AccessControl() 
)
inline

Definition at line 286 of file API.h.

◆ APIRecord() [3/3]

clang::extractapi::APIRecord::APIRecord ( RecordKind  Kind,
StringRef  USR,
StringRef  Name 
)
inline

Definition at line 298 of file API.h.

◆ ~APIRecord()

APIRecord::~APIRecord ( )
pure virtual

Definition at line 118 of file API.cpp.

Member Function Documentation

◆ castFromRecordContext()

APIRecord * APIRecord::castFromRecordContext ( const RecordContext Ctx)
static

◆ castToRecordContext()

RecordContext * APIRecord::castToRecordContext ( const APIRecord Record)
static

◆ classof() [1/2]

static bool clang::extractapi::APIRecord::classof ( const APIRecord Record)
inlinestatic

Definition at line 303 of file API.h.

◆ classof() [2/2]

static bool clang::extractapi::APIRecord::classof ( const RecordContext Ctx)
inlinestatic

Definition at line 305 of file API.h.

◆ classofKind()

static bool clang::extractapi::APIRecord::classofKind ( RecordKind  K)
inlinestatic

Definition at line 304 of file API.h.

◆ getKind()

RecordKind clang::extractapi::APIRecord::getKind ( ) const
inline

Definition at line 279 of file API.h.

◆ getNextInContext()

APIRecord * clang::extractapi::APIRecord::getNextInContext ( ) const
inline

Definition at line 277 of file API.h.

Friends And Related Function Documentation

◆ RecordContext

friend class RecordContext
friend

Definition at line 271 of file API.h.

Member Data Documentation

◆ Access

AccessControl clang::extractapi::APIRecord::Access

◆ Availability

AvailabilityInfo clang::extractapi::APIRecord::Availability

Definition at line 247 of file API.h.

◆ Comment

DocComment clang::extractapi::APIRecord::Comment

Documentation comment lines attached to this symbol declaration.

Definition at line 251 of file API.h.

◆ Declaration

DeclarationFragments clang::extractapi::APIRecord::Declaration

Declaration fragments of this symbol declaration.

Definition at line 254 of file API.h.

◆ IsFromSystemHeader

bool clang::extractapi::APIRecord::IsFromSystemHeader

Whether the symbol was defined in a system header.

Definition at line 265 of file API.h.

Referenced by clang::extractapi::SymbolGraphSerializer::serializeSingleSymbolSGF().

◆ Linkage

LinkageInfo clang::extractapi::APIRecord::Linkage

Definition at line 248 of file API.h.

◆ Location

PresumedLoc clang::extractapi::APIRecord::Location

◆ Name

StringRef clang::extractapi::APIRecord::Name

Definition at line 242 of file API.h.

Referenced by clang::extractapi::RecordRecord::isAnonymousWithNoTypedef().

◆ Parent

SymbolReference clang::extractapi::APIRecord::Parent

Definition at line 244 of file API.h.

◆ SubHeading

DeclarationFragments clang::extractapi::APIRecord::SubHeading

SubHeading provides a more detailed representation than the plain declaration name.

SubHeading is an array of declaration fragments of tagged declaration name, with potentially more tokens (for example the +/- symbol for Objective-C class/instance methods).

Definition at line 262 of file API.h.

◆ USR

StringRef clang::extractapi::APIRecord::USR

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