clang-tools  16.0.0git
Public Member Functions | Public Attributes | List of all members
clang::doc::Reference Struct Reference

#include <Representation.h>

Inheritance diagram for clang::doc::Reference:
Inheritance graph
[legend]
Collaboration diagram for clang::doc::Reference:
Collaboration graph
[legend]

Public Member Functions

 Reference (SymbolID USR=SymbolID(), StringRef Name=StringRef(), InfoType IT=InfoType::IT_default, StringRef Path=StringRef())
 
bool operator== (const Reference &Other) const
 
bool mergeable (const Reference &Other)
 
void merge (Reference &&I)
 
llvm::SmallString< 64 > getRelativeFilePath (const StringRef &CurrentPath) const
 Returns the path for this Reference relative to CurrentPath. More...
 
llvm::SmallString< 16 > getFileBaseName () const
 Returns the basename that should be used for this Reference. More...
 

Public Attributes

SymbolID USR = SymbolID()
 
SmallString< 16 > Name
 
InfoType RefType = InfoType::IT_default
 
llvm::SmallString< 128 > Path
 

Detailed Description

Definition at line 116 of file Representation.h.

Constructor & Destructor Documentation

◆ Reference()

clang::doc::Reference::Reference ( SymbolID  USR = SymbolID(),
StringRef  Name = StringRef(),
InfoType  IT = InfoType::IT_default,
StringRef  Path = StringRef() 
)
inline

Definition at line 117 of file Representation.h.

Member Function Documentation

◆ getFileBaseName()

llvm::SmallString< 16 > clang::doc::Reference::getFileBaseName ( ) const

Returns the basename that should be used for this Reference.

Definition at line 144 of file Representation.cpp.

References clang::doc::IT_namespace, Name, and RefType.

Referenced by clang::doc::writeNameLink().

◆ getRelativeFilePath()

llvm::SmallString< 64 > clang::doc::Reference::getRelativeFilePath ( const StringRef &  CurrentPath) const

Returns the path for this Reference relative to CurrentPath.

Definition at line 140 of file Representation.cpp.

References clang::doc::calculateRelativeFilePath(), Name, Path, and RefType.

Referenced by clang::doc::writeNameLink().

◆ merge()

void clang::doc::Reference::merge ( Reference &&  I)

Definition at line 167 of file Representation.cpp.

References mergeable(), Name, and Path.

◆ mergeable()

bool clang::doc::Reference::mergeable ( const Reference Other)

Definition at line 163 of file Representation.cpp.

References RefType, and USR.

Referenced by merge().

◆ operator==()

bool clang::doc::Reference::operator== ( const Reference Other) const
inline

Definition at line 121 of file Representation.h.

References Name, RefType, and USR.

Member Data Documentation

◆ Name

SmallString<16> clang::doc::Reference::Name

◆ Path

llvm::SmallString<128> clang::doc::Reference::Path

◆ RefType

InfoType clang::doc::Reference::RefType = InfoType::IT_default

◆ USR

SymbolID clang::doc::Reference::USR = SymbolID()

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