Jafar
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Private Attributes
jafar::kernel::IdFactory< T, IdCollector > Class Template Reference

This class allows to create an unique id. More...


Detailed Description

template<typename T = unsigned, template< typename > class IdCollector = IdCollectorNone>
class jafar::kernel::IdFactory< T, IdCollector >

This class allows to create an unique id.

Parameters:
Tthe id storage type
IdCollectorthe id collector type

Definition at line 101 of file IdFactory.hpp.

#include <IdFactory.hpp>

List of all members.

Public Types

typedef T storage_t

Public Member Functions

getId ()
 Call this to get an unique id, starting from 1, 0 means overflow.
bool releaseId (T id)
 Call this when you want to stop using an id.
void reset ()
 Call this when you want to reset the factory without destroying it.
countUsed ()
 Call this to get the number of ids currently used.
countCollected ()
 Call this to get the number of ids currently collected.

Private Attributes

m_lastId
IdCollector< T > freed

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Wed Oct 15 2014 00:37:40 for Jafar by doxygen 1.7.6.1
LAAS-CNRS