29 lines
881 B
C++
29 lines
881 B
C++
//----------------------------------------------------------------------------
|
|
// EgalTech 2013-2013
|
|
//----------------------------------------------------------------------------
|
|
// File : IdManager.h Data : 02.12.13 Versione : 1.4a3
|
|
// Contenuto : Dichiarazione e implementazione della classe IdManager.
|
|
//
|
|
//
|
|
//
|
|
// Modifiche : 02.12.13 DS Creazione modulo.
|
|
//
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
#pragma once
|
|
|
|
|
|
//----------------------------------------------------------------------------
|
|
class IdManager
|
|
{
|
|
public :
|
|
IdManager( void) { m_nMaxId = 0 ; }
|
|
int GetNewId( void) { return ++ m_nMaxId ; }
|
|
int GetMaxId( void) const { return m_nMaxId ; }
|
|
void UpdateMaxId( int nId) { if ( nId > m_nMaxId) m_nMaxId = nId ; }
|
|
|
|
private :
|
|
int m_nMaxId ;
|
|
} ;
|