![]() |
VR-Forces Development_Version Class Documentation
|
Generator for unique names with a specified prefix. More...
Public Member Functions | |
| DtUniqueNameGenerator (const DtUnicode &prefix) | |
| CTOR. | |
| virtual | ~DtUniqueNameGenerator () |
| DTOR. | |
| virtual DtUnicode | generateName () |
| Allocate and return a new unique name. | |
| virtual void | releaseName (const DtUnicode &name) |
| Release a name so that it can be reused. | |
| virtual void | takeName (const DtUnicode &name) |
| Register a name to not use for generateName() | |
Protected Types | |
| typedef std::set< unsigned int > | PostfixList |
Protected Attributes | |
| DtUnicode | myPrefix |
| PostfixList | myAllocatedPostfixes |
| unsigned int | myNextPostfix |
Generator for unique names with a specified prefix.
For example, "sensor_0", "sensor_1", "sensor_2", and so on.
|
protected |
| makVrv::DtUniqueNameGenerator::DtUniqueNameGenerator | ( | const DtUnicode & | prefix | ) |
CTOR.
Constructs a name generator that will build names starting with the specified prefix
|
virtual |
DTOR.
|
virtual |
Allocate and return a new unique name.
To allow the name to be reused, call release() on it
|
virtual |
Release a name so that it can be reused.
|
virtual |
Register a name to not use for generateName()
For example, if an object already exists with the name "sensor_2", calling takeName("sensor_2") means that generateName() will generate the sequence "sensor_1", "sensor_3", "sensor_4", and so on.
|
protected |
|
protected |
|
protected |