Lumiera
0.pre.03
»edit your freedom«
|
#include "lib/idi/entry-id.hpp"
typed symbolic and hash ID for asset-like position accounting.
Allows for creating an entry with symbolic id and distinct type, combined with an derived hash value, without the overhead in storage and instance management imposed by using a full-fledged Asset.
Similar to an Asset, an identification tuple is available (generated on the fly), as is an unique LUID and total ordering. The type information is attached as template parameter, but included into the hash calculation. All instantiations of the EntryID template share a common baseclass, usable for type erased common registration.
Definition at line 135 of file entry-id.hpp.
Public Member Functions | |
EntryID () | |
case-1: auto generated symbolic ID | |
EntryID (string const &symbolID) | |
case-2: explicitly specify a symbolic ID to use. More... | |
EntryID (const char *symbolID) | |
EntryID (Symbol const &internalSymbol) | |
case-2b: rely on an internal, already sanitised symbol. More... | |
operator string () const | |
Public Member Functions inherited from BareEntryID | |
LuidH const & | getHash () const |
string const & | getSym () const |
bool | isValid () const |
operator string () const | |
template<typename TAR > | |
EntryID< TAR > const & | recast () const |
try to upcast this BareEntryID to a fully typed EntryID. More... | |
Static Public Member Functions | |
static bool | canRecast (BareEntryID const &bID) |
static EntryID const & | recast (BareEntryID const &bID) |
Friends | |
bool | operator< (EntryID const &i1, EntryID const &i2) |
Additional Inherited Members | |
Protected Member Functions inherited from BareEntryID | |
BareEntryID (string const &symbolID, HashVal seed) | |
Not to be created stand-alone. More... | |
BareEntryID (string const &symbolID) | |
store the symbol but use a random hash part | |
|
inlineexplicit |
case-2: explicitly specify a symbolic ID to use.
The type information TY will be included automatically into the generated hash-ID. This hash is reproducible.
Definition at line 243 of file entry-id.hpp.
case-2b: rely on an internal, already sanitised symbol.
The symbol string will be passed through as-is, while the type information from TY will be hashed in.
Definition at line 256 of file entry-id.hpp.
|
inlinestatic |
Definition at line 267 of file entry-id.hpp.