#include <UniqueIdentifier.h>
Inheritance diagram for Track::UniqueIdentifier:
Public Member Functions | |
UniqueIdentifier () | |
Create an object with a name unique to objects of the same class. | |
unsigned long int | get_name () const |
Get the assigned name. | |
Private Attributes | |
unsigned long int | my_name |
name assigned to this object |
It is used instead of pointers so that an object may be moved, copied, freed and reallocated and the names should act intelligently, for example in undo / redo names are preserved, but in copy / paste they are not.
When you copy-construct or assign a UniqueIdentifier instance, the source object's name is kept. This is useful for operations such as undo and redo, where a copy of a previously deleted object can be put back with the same name. However, sometimes a new name is wanted (for example when copy / paste is used, or you are creating a new object similar to a previous one and you want to keep using both copys.) In this case, make sure to use the default constuctor instead of the copy constructor (you may need a special constuctor).
Definition at line 32 of file UniqueIdentifier.h.
Track::UniqueIdentifier::UniqueIdentifier | ( | ) | [inline] |
Create an object with a name unique to objects of the same class.
Definition at line 36 of file UniqueIdentifier.h.
unsigned long int Track::UniqueIdentifier::get_name | ( | ) | const [inline] |
unsigned long int Track::UniqueIdentifier::my_name [private] |
Generated at Mon Sep 6 00:41:19 2010 by Doxygen version 1.4.7 for Racer version svn335.