omegalib  13.1
omicron::NameGenerator Class Reference

#include <NameGenerator.h>

Public Member Functions

 NameGenerator (const NameGenerator &rhs)
 
 NameGenerator (const String &prefix)
 
String generate ()
 Generate a new name. More...
 
void reset ()
 Reset the internal counter. More...
 
void setNext (unsigned long long int val)
 Manually set the internal counter (use caution) More...
 
unsigned long long int getNext () const
 Get the internal counter. More...
 

Protected Attributes

std::string mPrefix
 
unsigned long long int mNext
 
Lock mMutex
 

Constructor & Destructor Documentation

omicron::NameGenerator::NameGenerator ( const NameGenerator rhs)
inline
omicron::NameGenerator::NameGenerator ( const String prefix)
inline

Member Function Documentation

String omicron::NameGenerator::generate ( )
inline

Generate a new name.

unsigned long long int omicron::NameGenerator::getNext ( ) const
inline

Get the internal counter.

void omicron::NameGenerator::reset ( )
inline

Reset the internal counter.

void omicron::NameGenerator::setNext ( unsigned long long int  val)
inline

Manually set the internal counter (use caution)

Member Data Documentation

Lock omicron::NameGenerator::mMutex
protected
unsigned long long int omicron::NameGenerator::mNext
protected
std::string omicron::NameGenerator::mPrefix
protected

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