Public Member Functions | |
| ObjectWithInstanceID () | |
| Empty ctor will assign ID at construction time. | |
| int | id () const |
| Return this object's ID number. | |
Static Private Member Functions | |
| static int & | nextID () |
| Generate the next ID in the sequence. | |
Private Attributes | |
| int | id_ |
Subclasses will inherit the id() method, and instances of those subclasses will be given a unique ID at construction time.
By templating on the derived type, we can give each derived type its own sequence of ID numbers.
Definition at line 51 of file SundanceObjectWithInstanceID.hpp.
| Sundance::ObjectWithInstanceID< T >::ObjectWithInstanceID | ( | ) | [inline] |
Empty ctor will assign ID at construction time.
Definition at line 55 of file SundanceObjectWithInstanceID.hpp.
| int Sundance::ObjectWithInstanceID< T >::id | ( | ) | const [inline] |
| static int& Sundance::ObjectWithInstanceID< T >::nextID | ( | ) | [inline, static, private] |
Generate the next ID in the sequence.
Definition at line 62 of file SundanceObjectWithInstanceID.hpp.
int Sundance::ObjectWithInstanceID< T >::id_ [private] |
Definition at line 65 of file SundanceObjectWithInstanceID.hpp.
Referenced by Sundance::ObjectWithInstanceID< MeshBase >::id().