clang 19.0.0git
Classes | Public Types | Public Member Functions | Public Attributes | 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]

Classes

struct  HierarchyInformation
 Stores information about the context of the declaration of this API. More...
 

Public Types

enum  RecordKind {
  RK_Unknown , RK_Namespace , RK_GlobalFunction , RK_GlobalFunctionTemplate ,
  RK_GlobalFunctionTemplateSpecialization , RK_GlobalVariable , RK_GlobalVariableTemplate , RK_GlobalVariableTemplateSpecialization ,
  RK_GlobalVariableTemplatePartialSpecialization , RK_EnumConstant , RK_Enum , RK_StructField ,
  RK_Struct , RK_UnionField , RK_Union , RK_StaticField ,
  RK_CXXField , RK_CXXFieldTemplate , RK_CXXClass , RK_ClassTemplate ,
  RK_ClassTemplateSpecialization , RK_ClassTemplatePartialSpecialization , 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_ObjCInterface , RK_ObjCCategory ,
  RK_ObjCCategoryModule , RK_ObjCProtocol , RK_MacroDefinition , RK_Typedef
}
 Discriminator for LLVM-style RTTI (dyn_cast<> et al.) More...
 

Public Member Functions

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

Public Attributes

StringRef USR
 
StringRef Name
 
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.
 
HierarchyInformation ParentInformation
 Information about the parent record of this record.
 
bool IsFromSystemHeader
 Whether the symbol was defined in a system header.
 

Detailed Description

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

Definition at line 156 of file API.h.

Member Enumeration Documentation

◆ RecordKind

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

Enumerator
RK_Unknown 
RK_Namespace 
RK_GlobalFunction 
RK_GlobalFunctionTemplate 
RK_GlobalFunctionTemplateSpecialization 
RK_GlobalVariable 
RK_GlobalVariableTemplate 
RK_GlobalVariableTemplateSpecialization 
RK_GlobalVariableTemplatePartialSpecialization 
RK_EnumConstant 
RK_Enum 
RK_StructField 
RK_Struct 
RK_UnionField 
RK_Union 
RK_StaticField 
RK_CXXField 
RK_CXXFieldTemplate 
RK_CXXClass 
RK_ClassTemplate 
RK_ClassTemplateSpecialization 
RK_ClassTemplatePartialSpecialization 
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_ObjCInterface 
RK_ObjCCategory 
RK_ObjCCategoryModule 
RK_ObjCProtocol 
RK_MacroDefinition 
RK_Typedef 

Definition at line 158 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,
PresumedLoc  Location,
AvailabilityInfo  Availability,
LinkageInfo  Linkage,
const DocComment Comment,
DeclarationFragments  Declaration,
DeclarationFragments  SubHeading,
bool  IsFromSystemHeader 
)
inline

Definition at line 259 of file API.h.

◆ APIRecord() [3/3]

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

Definition at line 269 of file API.h.

◆ ~APIRecord()

APIRecord::~APIRecord ( )
pure virtual

Definition at line 539 of file API.cpp.

Member Function Documentation

◆ getKind()

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

Member Data Documentation

◆ Availability

AvailabilityInfo clang::extractapi::APIRecord::Availability

Definition at line 228 of file API.h.

◆ Comment

DocComment clang::extractapi::APIRecord::Comment

Documentation comment lines attached to this symbol declaration.

Definition at line 232 of file API.h.

◆ Declaration

DeclarationFragments clang::extractapi::APIRecord::Declaration

Declaration fragments of this symbol declaration.

Definition at line 235 of file API.h.

◆ IsFromSystemHeader

bool clang::extractapi::APIRecord::IsFromSystemHeader

Whether the symbol was defined in a system header.

Definition at line 249 of file API.h.

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

◆ Linkage

LinkageInfo clang::extractapi::APIRecord::Linkage

Definition at line 229 of file API.h.

◆ Location

PresumedLoc clang::extractapi::APIRecord::Location

◆ Name

StringRef clang::extractapi::APIRecord::Name

◆ ParentInformation

HierarchyInformation clang::extractapi::APIRecord::ParentInformation

Information about the parent record of this record.

Definition at line 246 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 243 of file API.h.

◆ USR

StringRef clang::extractapi::APIRecord::USR

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