UniqueID Class Reference

#include <Util.h>

Collaboration diagram for UniqueID:

Collaboration graph
[legend]

Public Member Functions

 UniqueID ()
int getID ()

Detailed Description

Definition at line 176 of file Util.h.


Constructor & Destructor Documentation

UniqueID::UniqueID (  )  [inline]

Definition at line 181 of file Util.h.

References Mutex::init().

00181 { startID = 1; mutex.init(); }

Here is the call graph for this function:


Member Function Documentation

int UniqueID::getID (  )  [inline]

Definition at line 182 of file Util.h.

References Mutex::getLock(), and Mutex::releaseLock().

Referenced by SqlLogStatement::prepare().

00183    {
00184       //TODO::change mutex to atomic increment instruction
00185       if (mutex.getLock(-1, false) != 0) return 0;
00186       startID++;
00187       mutex.releaseLock(-1, false); 
00188       return startID;
00189    }

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following file:
Generated on Mon Jun 9 22:55:18 2008 for csql by  doxygen 1.4.7