UGDK  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ugdk::util::IDGenerator Class Reference

#include <ugdk/util/idgenerator.h>

Inheritance diagram for ugdk::util::IDGenerator:
Collaboration diagram for ugdk::util::IDGenerator:

Public Member Functions

 IDGenerator (int min_id, int max_id, int error_value)
 
 ~IDGenerator ()
 
int GenerateID ()
 Generate a new id. More...
 
int ReleaseID (int id)
 Release an id. More...
 
int error_value () const
 The error value for this generator. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ugdk::util::Uncopyable
 Uncopyable ()
 
 ~Uncopyable ()
 

Constructor & Destructor Documentation

ugdk::util::IDGenerator::IDGenerator ( int  min_id,
int  max_id,
int  error_value 
)
ugdk::util::IDGenerator::~IDGenerator ( )
inline

Member Function Documentation

int ugdk::util::IDGenerator::error_value ( ) const
inline

The error value for this generator.

int ugdk::util::IDGenerator::GenerateID ( )

Generate a new id.

Returns
The new unique id.
int ugdk::util::IDGenerator::ReleaseID ( int  id)

Release an id.

Returns
An error value or the recieved id.

The documentation for this class was generated from the following file: