Public Member Functions | List of all members

#include <tjindex.h>

Inherits UniqueIndexBase.

Public Member Functions

unsigned int get_index () const

Detailed Description

template<class T>
class UniqueIndex< T >

This template class provides a unique index, i.e. an unique unsigned integer number for all instances of the (derived) class. A new index for the object is created whenever a call to 'get_index()' is issued the first time. The assigned index is removed from the list of assigned indices if the object is destroyed. Please note that the index of temporary objects is deleted from the list of indices, even it is assigned to another object. The class T must have two static member functions, 'get_typename()' and 'get_max_instances()' to return a unique label and the maximum number of instances per class, respectively.

Definition at line 94 of file tjindex.h.

Member Function Documentation

§ get_index()

template<class T >
unsigned int UniqueIndex< T >::get_index ( ) const

Returns a unique index for this object.

Definition at line 109 of file tjindex.h.

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