Lumiera
0.pre.03
»edit your freedom«
|
Go to the source code of this file.
Generic functions to build identification schemes.
These template functions are meant as common extension point. The purpose is to streamline and disentangle the various identification schemes in use at various places within Lumiera. We strive to cover all the common basic usage situations through these functions
better unit test coverage
improve implementation of typeFullID
Definition in file genfunc.hpp.
#include "lib/hash-value.h"
#include "lib/symbol.hpp"
#include "lib/typed-counter.hpp"
#include <typeinfo>
#include <string>
Functions | |
template<typename TY > | |
string | categoryFolder () |
string | demangleCxx (Literal rawName) |
Fallback type-ID: More... | |
template<class TY > | |
string | generateExtendedID (string prefix="") |
build a long type based identifier, with running counter and custom prefix. More... | |
template<class TY > | |
string | generateSymbolicID () |
build a per-type identifier, with type prefix and running counter. More... | |
template<typename TY > | |
HashVal | getTypeHash () |
string | humanReadableTypeID (lib::Literal) |
pretty-print an internal C++ type representation More... | |
string | instance_format (string const &prefix, size_t instanceNr) |
string | instance_hex_format (string const &prefix, size_t instanceNr) |
template<typename TY > | |
string | instanceTypeID (const TY *const obj) |
designation of an distinct object instance More... | |
template<typename TY > | |
string | namePrefix () |
string | primaryTypeComponent (lib::Literal) |
extract core name component from a raw type spec More... | |
string | sanitisedFullTypeName (lib::Literal) |
build a sanitised ID from full type name | |
TypedCounter & | sharedInstanceCounter () |
template<typename TY > | |
string | typeFullID () |
Complete unique type identifier. More... | |
template<typename TY > | |
string | typeSymbol () |
Short readable type identifier, not necessarily unique or complete. More... | |
Namespaces | |
lib | |
Implementation namespace for support and library code. | |
lib::idi | |
Identification Schemes. | |
std::string demangleCxx | ( | Literal | rawName | ) |
Fallback type-ID:
reverse the effect of C++ name mangling.
Definition at line 159 of file format-obj.cpp.
References lib::meta::demangleCxx().
Referenced by lib::meta::demangleCxx(), lib::meta::humanReadableTypeID(), and lib::meta::primaryTypeComponent().
std::string humanReadableTypeID | ( | Literal | rawType | ) |
pretty-print an internal C++ type representation
const
, &
or *
, however, the typical usage from within util::typeStr() is arranged in a way to absorb these adornments by the way the template signatures are definedstd::regex_replace
Definition at line 190 of file format-obj.cpp.
References lib::meta::demangleCxx(), and lib::meta::humanReadableTypeID().
Referenced by lib::meta::humanReadableTypeID(), and lib::meta::sanitisedFullTypeName().
std::string primaryTypeComponent | ( | Literal | rawType | ) |
extract core name component from a raw type spec
::
Definition at line 268 of file format-obj.cpp.
References lib::meta::demangleCxx(), lib::meta::primaryTypeComponent(), and lib::meta::typeStr().
Referenced by lib::meta::primaryTypeComponent().