Constant expression id for types Simply, retrieve from given type it's name as a string, and integral id.
More...
#include <AMCETypeID.h>
|
| static constexpr const char * | name () |
| | Name of class. More...
|
| |
| static constexpr int | nameLength () |
| | Name length Zero at end is included. More...
|
| |
| static constexpr uint64_t | hash_code () |
| | Hash code 64-bit size. More...
|
| |
| static constexpr uint32_t | hash_code32 () |
| | Hash code 32-bit size. More...
|
| |
| static constexpr uint64_t | id () |
| | id Practically, id is some index in range in 0 to N. Main purpose is optimize switch statement, there compiler is able to make jump table, instead of comparing with many values. To ensure this functionality, program must be compiled with macro COLLECTING_DATA defined. Without it, this function returns 64-bit hash, so, can be used in cases of switch statement. More...
|
| |
| static constexpr uint32_t | id32 () |
| | lowest 32 bit of id() More...
|
| |
template<typename T>
class AMCore::AMCETypeID< T >
Constant expression id for types Simply, retrieve from given type it's name as a string, and integral id.
◆ hash_code()
Hash code 64-bit size.
- Returns
- hash
◆ hash_code32()
Hash code 32-bit size.
- Returns
- hash
◆ id()
id Practically, id is some index in range in 0 to N. Main purpose is optimize switch statement, there compiler is able to make jump table, instead of comparing with many values. To ensure this functionality, program must be compiled with macro COLLECTING_DATA defined. Without it, this function returns 64-bit hash, so, can be used in cases of switch statement.
id is not constexpr if COLLECTING_DATA if defined. If you need constexpr, you may use hash_code function.
- Returns
- id 64-bit
◆ id32()
lowest 32 bit of id()
- Returns
- 32-bit sized id
◆ name()
Name of class.
- Returns
- Zero ended string
◆ nameLength()
Name length Zero at end is included.
- Returns
- length
The documentation for this class was generated from the following file: