Skip to content

Class ILLIXR::gen_guid

ClassList > 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 sub_namespace=0, std::size_t sub_sub_namespace=0)
Generate a number, unique from other calls to the same namespace/sub-namespace/sub-sub-namespace.

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/sub-namespace/sub-sub-namespace.

inline std::size_t ILLIXR::gen_guid::get (
    std::size_t namespace_=0,
    std::size_t sub_namespace=0,
    std::size_t sub_sub_namespace=0
) 



The documentation for this class was generated from the following file /home/friedel/devel/ILLIXR/include/illixr/record_logger.hpp