Go to the documentation of this file.
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/Optional.h"
21 #include "llvm/ADT/SmallVector.h"
22 #include "llvm/ADT/StringExtras.h"
64 llvm::deref<std::equal_to<>>{});
79 if (FirstCI < SecondCI)
82 if (FirstCI == SecondCI) {
83 return std::lexicographical_compare(
85 Other.
Children.end(), llvm::deref<std::less<>>());
105 llvm::SmallVector<SmallString<16>, 4>
107 llvm::SmallVector<SmallString<16>, 4>
109 llvm::SmallVector<SmallString<16>, 4>
111 std::vector<std::unique_ptr<CommentInfo>>
176 llvm::StringRef
Name)
212 AccessSpecifier
Access = AccessSpecifier::AS_public;
254 virtual ~Info() =
default;
260 llvm::SmallVector<Reference, 4>
314 llvm::SmallVector<Location, 2>
Loc;
328 llvm::SmallVector<FieldTypeInfo, 4>
Params;
333 AccessSpecifier
Access = AccessSpecifier::AS_public;
349 TagTypeKind
TagType = TagTypeKind::TTK_Struct;
353 llvm::SmallVector<MemberTypeInfo, 4>
358 llvm::SmallVector<Reference, 4>
361 std::vector<BaseRecordInfo>
384 AccessSpecifier
Access = AccessSpecifier::AS_public;
398 llvm::SmallVector<SmallString<16>, 4>
Members;
423 llvm::Expected<std::unique_ptr<Info>>
424 mergeInfos(std::vector<std::unique_ptr<Info>> &Values);
433 tooling::ExecutionContext *
ECtx;
455 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_DOC_REPRESENTATION_H
Index(StringRef Name, StringRef JumpToSection)
bool operator==(const Reference &Other) const
std::vector< CommentInfo > Description
void merge(Reference &&I)
std::vector< EnumInfo > ChildEnums
llvm::SmallString< 16 > getFileBaseName() const
Returns the basename that should be used for this Reference.
std::vector< FunctionInfo > ChildFunctions
Info(InfoType IT, SymbolID USR)
llvm::SmallString< 128 > Path
std::vector< Reference > ChildNamespaces
llvm::Optional< std::string > RepositoryUrl
Info(InfoType IT, SymbolID USR, StringRef Name)
SymbolInfo(InfoType IT, SymbolID USR)
bool operator==(const FieldTypeInfo &Other) const
llvm::SmallVector< Reference, 4 > VirtualParents
llvm::Expected< Reference > getEnclosingScope()
llvm::SmallVector< MemberTypeInfo, 4 > Members
TypeInfo(SymbolID Type, StringRef Field, InfoType IT)
std::vector< BaseRecordInfo > Bases
bool mergeable(const Reference &Other)
llvm::SmallString< 128 > Path
std::vector< std::string > UserStylesheets
llvm::SmallString< 16 > extractName() const
bool operator<(const Location &Other) const
bool operator==(const Location &Other) const
TypeInfo(SymbolID Type, StringRef Field, InfoType IT, StringRef Path)
NamespaceInfo(SymbolID USR, StringRef Name, StringRef Path)
FunctionInfo(SymbolID USR)
std::vector< std::string > JsScripts
Reference(llvm::StringRef Name, StringRef Path)
llvm::SmallVector< SmallString< 16 >, 4 > Members
TypeInfo(llvm::StringRef RefName, StringRef Path)
Location(int LineNumber, SmallString< 16 > Filename)
ClangDocContext()=default
llvm::SmallVector< Location, 2 > Loc
Reference(llvm::StringRef Name)
void merge(SymbolInfo &&I)
llvm::Optional< SmallString< 16 > > JumpToSection
llvm::SmallVector< Reference, 4 > Parents
llvm::SmallString< 64 > getRelativeFilePath(const StringRef &CurrentPath) const
Returns the path for this Reference relative to CurrentPath.
FieldTypeInfo(llvm::StringRef RefName, llvm::StringRef Name)
llvm::SmallVector< FieldTypeInfo, 4 > Params
Index(SymbolID USR, StringRef Name, InfoType IT, StringRef Path)
std::array< uint8_t, 20 > SymbolID
NamespaceInfo(SymbolID USR, StringRef Name)
TypeInfo(llvm::StringRef RefName)
SymbolInfo(InfoType IT, SymbolID USR, StringRef Name, StringRef Path)
std::vector< Reference > ChildRecords
MemberTypeInfo(llvm::StringRef RefName, StringRef Path, llvm::StringRef Name, AccessSpecifier Access)
MemberTypeInfo(SymbolID Type, StringRef Field, InfoType IT, StringRef Path, llvm::StringRef Name, AccessSpecifier Access)
bool operator<(const Index &Other) const
SymbolInfo(InfoType IT, SymbolID USR, StringRef Name)
void merge(NamespaceInfo &&I)
FieldTypeInfo(SymbolID Type, StringRef Field, InfoType IT, StringRef Path, llvm::StringRef Name)
std::vector< FunctionInfo > ChildFunctions
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
std::vector< Reference > ChildRecords
static bool empty(SourceRange Range)
MemberTypeInfo(llvm::StringRef RefName, llvm::StringRef Name, AccessSpecifier Access)
void merge(FunctionInfo &&I)
void merge(RecordInfo &&I)
SmallString< 32 > Filename
Reference(SymbolID USR, StringRef Name, InfoType IT)
Info(InfoType IT, SymbolID USR, StringRef Name, StringRef Path)
RecordInfo(SymbolID USR, StringRef Name, StringRef Path)
RecordInfo(SymbolID USR, StringRef Name)
NamespaceInfo(SymbolID USR)
Location(int LineNumber, SmallString< 16 > Filename, bool IsFileInRootDir)
tooling::ExecutionContext * ECtx
std::vector< std::string > FilesToCopy
bool mergeable(const Info &Other)
std::vector< EnumInfo > ChildEnums
bool operator==(const MemberTypeInfo &Other) const
llvm::Expected< std::unique_ptr< Info > > mergeInfos(std::vector< std::unique_ptr< Info >> &Values)
llvm::Optional< Location > DefLoc
Reference(SymbolID USR, StringRef Name, InfoType IT, StringRef Path)
bool operator==(const TypeInfo &Other) const
llvm::SmallVector< Reference, 4 > Namespace
llvm::SmallString< 64 > getRelativeFilePath(const StringRef &CurrentPath) const
Returns the file path for this Info relative to CurrentPath.
bool operator==(const SymbolID &Other) const
std::vector< HeaderHandle > Path
llvm::SmallString< 16 > getFileBaseName() const
Returns the basename that should be used for this Info.
BaseRecordInfo(SymbolID USR, StringRef Name, StringRef Path, bool IsVirtual, AccessSpecifier Access, bool IsParent)
std::vector< Index > Children
FieldTypeInfo(llvm::StringRef RefName, StringRef Path, llvm::StringRef Name)