siplasplas
A library for C++ reflection and introspection
|
Stores source information of an entity. More...
#include <siplasplas/reflection/static/sourceinfo.hpp>
Public Types | |
using | Entity = Entity_ |
Returns the entity (Or a type representation of the entity) | |
Static Public Member Functions | |
static constexpr static_reflection::Kind | kind () |
Returns the kind (category) of the entity. More... | |
static constexpr const cpp::constexp::String< FullName::size+1 > & | fullName () |
Returns the full qualified name of an entity. More... | |
static constexpr const cpp::constexp::String< Spelling::size+1 > & | spelling () |
Returns the name of the entity See clang_getCursorSpelling() . More... | |
static constexpr const char * | displayName () |
Returns the display name of the entity. More... | |
static constexpr const char * | file () |
Returns the full path to the file where the entity is declared. More... | |
static constexpr std::size_t | line () |
Returns the line number where the entity is declared. | |
Stores source information of an entity.
SourceInfo class stores information about the declaration of an entity (class, function, etc) in the context of the sourcecode where the entity is declared. This information includes the file where the entity is declared, the line, the name of the entity, etc.
|
inlinestatic |
Returns the display name of the entity.
The display name contains extra information that helps identify the entity, such as the parameters of a function or template or the arguments of a class template specialization.
See clang_getCursorDisplayName()
constexpr
C string with the display name. If the source info is a default empty source info (Such as from an entity without reflection metadata available) returns an empty string.
|
inlinestatic |
Returns the full path to the file where the entity is declared.
The path returned is the full path to the declaration file of the entity as read when the file was processed by DRLParser. This full path may change if the user sources are deployed to a different path/machine, so user code should not rely in this full path. However, depending on the structure of the user project, a relative path to the user source tree or include tree may be get from this path
constexpr
C string with the full path. If the source info is a default empty source info (Such as from an entity without reflection metadata available) returns an empty string.
|
inlinestatic |
Returns the full qualified name of an entity.
|
inlinestatic |
Returns the kind (category) of the entity.
|
inlinestatic |
Returns the name of the entity See clang_getCursorSpelling()
.