Class ILLIXR::gen_guid
This class generates unique IDs. More...
#include <record_logger.hpp>
Inherits the following classes: ILLIXR::phonebook::service
Public Functions
Type | Name |
---|---|
std::size_t | get (std::size_t namespace_=0, std::size_t subnamespace=0, std::size_t subsubnamespace=0) Generate a number, unique from other calls to the same namespace/subnamespace/subsubnamepsace. |
Public Functions inherited from ILLIXR::phonebook::service
See ILLIXR::phonebook::service
Type | Name |
---|---|
virtual | ~service () = default |
Detailed Description
If you need unique IDs (e.g. for each component), have each component call this class through Phonebook. It returns unique IDs.
You can use namespaces to express logical containment. The return value will be unique between other get
calls to the same namespace. This is useful for components and sub-components. For example, If component with ID 0 has 3 subcomponents, one might call get(0) to name each of them. Then, suppose component with ID 1 has 2 subcomponents, one might call get(1) twice to name those. The subcomponent IDs could be reused (non-unique), but tuple (component ID, subcomponent ID) will still be unique. You can also just use the global namespace for everything, if you do not care about generating small integers for the IDs.
Public Functions Documentation
function get
Generate a number, unique from other calls to the same namespace/subnamespace/subsubnamepsace.
inline std::size_t ILLIXR::gen_guid::get (
std::size_t namespace_=0,
std::size_t subnamespace=0,
std::size_t subsubnamespace=0
)
The documentation for this class was generated from the following file include/illixr/record_logger.hpp