14#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_DOC_REPRESENTATION_H
15#define LLVM_CLANG_TOOLS_EXTRA_CLANG_DOC_REPRESENTATION_H
17#include "clang/AST/Type.h"
18#include "clang/Basic/Specifiers.h"
19#include "clang/Tooling/StandaloneExecution.h"
20#include "llvm/ADT/APSInt.h"
21#include "llvm/ADT/SmallVector.h"
22#include "llvm/ADT/StringExtras.h"
77 llvm::SmallVector<SmallString<16>, 4>
79 llvm::SmallVector<SmallString<16>, 4>
81 llvm::SmallVector<SmallString<16>, 4>
83 std::vector<std::unique_ptr<CommentInfo>>
97 StringRef
Path = StringRef())
232 AccessSpecifier
Access = AccessSpecifier::AS_public;
265 StringRef
Name = StringRef(), StringRef
Path = StringRef())
277 llvm::SmallVector<Reference, 4>
298 StringRef
Path = StringRef());
308 StringRef
Name = StringRef(), StringRef
Path = StringRef())
314 llvm::SmallVector<Location, 2>
Loc;
328 llvm::SmallVector<FieldTypeInfo, 4>
Params;
333 AccessSpecifier
Access = AccessSpecifier::AS_public;
348 StringRef
Path = StringRef());
353 TagTypeKind
TagType = TagTypeKind::TTK_Struct;
368 llvm::SmallVector<MemberTypeInfo, 4>
373 llvm::SmallVector<Reference, 4>
376 std::vector<BaseRecordInfo>
408 AccessSpecifier
Access = AccessSpecifier::AS_public;
415 StringRef
Value = StringRef(
"0"),
477llvm::Expected<std::unique_ptr<Info>>
478mergeInfos(std::vector<std::unique_ptr<Info>> &Values);
487 tooling::ExecutionContext *
ECtx;
std::vector< HeaderHandle > Path
llvm::Expected< std::unique_ptr< Info > > mergeInfos(std::vector< std::unique_ptr< Info > > &Values)
std::array< uint8_t, 20 > SymbolID
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
std::optional< std::string > RepositoryUrl
ClangDocContext()=default
std::vector< std::string > UserStylesheets
std::vector< std::string > JsScripts
tooling::ExecutionContext * ECtx
std::vector< std::string > FilesToCopy
llvm::SmallVector< EnumValueInfo, 4 > Members
std::optional< TypeInfo > BaseType
bool operator==(const EnumValueInfo &Other) const
SmallString< 16 > ValueExpr
EnumValueInfo(StringRef Name=StringRef(), StringRef Value=StringRef("0"), StringRef ValueExpr=StringRef())
FieldTypeInfo(const TypeInfo &TI, StringRef Name=StringRef(), StringRef DefaultValue=StringRef())
bool operator==(const FieldTypeInfo &Other) const
SmallString< 16 > DefaultValue
FunctionInfo(SymbolID USR=SymbolID())
SmallString< 16 > FullName
llvm::SmallVector< FieldTypeInfo, 4 > Params
void merge(FunctionInfo &&I)
std::optional< TemplateInfo > Template
Index(StringRef Name, StringRef JumpToSection)
std::optional< SmallString< 16 > > JumpToSection
std::vector< Index > Children
bool operator<(const Index &Other) const
bool operator==(const SymbolID &Other) const
Index(SymbolID USR, StringRef Name, InfoType IT, StringRef Path)
Info(InfoType IT=InfoType::IT_default, SymbolID USR=SymbolID(), StringRef Name=StringRef(), StringRef Path=StringRef())
bool mergeable(const Info &Other)
llvm::SmallString< 16 > getFileBaseName() const
Returns the basename that should be used for this Info.
std::vector< CommentInfo > Description
llvm::SmallString< 128 > Path
llvm::SmallString< 16 > extractName() const
llvm::SmallString< 64 > getRelativeFilePath(const StringRef &CurrentPath) const
Returns the file path for this Info relative to CurrentPath.
Info(Info &&Other)=default
Info(const Info &Other)=delete
llvm::SmallVector< Reference, 4 > Namespace
bool operator==(const Location &Other) const
Location(int LineNumber=0, StringRef Filename=StringRef(), bool IsFileInRootDir=false)
SmallString< 32 > Filename
bool operator<(const Location &Other) const
MemberTypeInfo(const TypeInfo &TI, StringRef Name, AccessSpecifier Access)
std::vector< CommentInfo > Description
bool operator==(const MemberTypeInfo &Other) const
void merge(NamespaceInfo &&I)
llvm::SmallVector< MemberTypeInfo, 4 > Members
std::optional< TemplateInfo > Template
SmallString< 16 > FullName
llvm::SmallVector< Reference, 4 > VirtualParents
llvm::SmallVector< Reference, 4 > Parents
void merge(RecordInfo &&I)
std::vector< BaseRecordInfo > Bases
void merge(Reference &&I)
Reference(SymbolID USR, StringRef Name, InfoType IT, StringRef QualName, StringRef Path=StringRef())
Reference(SymbolID USR=SymbolID(), StringRef Name=StringRef(), InfoType IT=InfoType::IT_default)
bool mergeable(const Reference &Other)
SmallString< 16 > QualName
llvm::SmallString< 128 > Path
llvm::SmallString< 64 > getRelativeFilePath(const StringRef &CurrentPath) const
Returns the path for this Reference relative to CurrentPath.
llvm::SmallString< 16 > getFileBaseName() const
Returns the basename that should be used for this Reference.
bool operator==(const Reference &Other) const
std::vector< Reference > Records
std::vector< TypedefInfo > Typedefs
std::vector< FunctionInfo > Functions
std::vector< Reference > Namespaces
std::vector< EnumInfo > Enums
SymbolInfo(InfoType IT, SymbolID USR=SymbolID(), StringRef Name=StringRef(), StringRef Path=StringRef())
llvm::SmallVector< Location, 2 > Loc
std::optional< Location > DefLoc
void merge(SymbolInfo &&I)
std::vector< TemplateParamInfo > Params
std::optional< TemplateSpecializationInfo > Specialization
SmallString< 16 > Contents
TemplateParamInfo()=default
TemplateParamInfo(StringRef Contents)
SymbolID SpecializationOf
std::vector< TemplateParamInfo > Params
TypeInfo(StringRef Name, StringRef Path=StringRef())
TypeInfo(const Reference &R)
bool operator==(const TypeInfo &Other) const
void merge(TypedefInfo &&I)
TypedefInfo(SymbolID USR=SymbolID())