#include <utility_identifier.h>
List of all members.
Detailed Description
Identifier Class. This is an utility class that is supposed to make it easier to create new objects with unique identifiers. The idea is to simply inherit the new object class from the identifier class.
At construction-time the class tries to generate a new unique identifier. Hereafter it is the users responsibility not to mess up the id-name string. However, end-users can always be sure that the index value provided by the identifier class is unique.
Constructor & Destructor Documentation
OpenTissue::utility::Identifier::Identifier |
( |
|
) |
[inline] |
virtual OpenTissue::utility::Identifier::~Identifier |
( |
|
) |
[inline, virtual] |
OpenTissue::utility::Identifier::Identifier |
( |
Identifier const & |
id |
) |
[inline] |
Member Function Documentation
void OpenTissue::utility::Identifier::generate_new_index |
( |
|
) |
[inline, protected] |
Static Member Not Initialized in Header Trick (smnih)
This way we avoid having a
static size_t m_next_idx
member variable which must be initialized in a source file.
std::string const& OpenTissue::utility::Identifier::get_id |
( |
|
) |
const [inline] |
size_t OpenTissue::utility::Identifier::get_index |
( |
|
) |
const [inline] |
bool OpenTissue::utility::Identifier::operator!= |
( |
Identifier const & |
id |
) |
const [inline] |
bool OpenTissue::utility::Identifier::operator== |
( |
Identifier const & |
id |
) |
const [inline] |
void OpenTissue::utility::Identifier::set_id |
( |
std::string const & |
id |
) |
[inline] |
Member Data Documentation
The documentation for this class was generated from the following file:
- /home/hauberg/Dokumenter/Capture/humim-tracker-0.1/src/OpenTissue/OpenTissue/utility/utility_identifier.h