Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

GCS::GElementID Class Reference

Provides unique identification for elements. More...

#include <GElementID.h>

Collaboration diagram for GCS::GElementID:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 GElementID (unsigned long ID)
 GElementID (const GElementID &original)
unsigned long getID () const
bool operator== (const GElementID &id) const
bool operator!= (const GElementID &id) const

Static Public Member Functions

GElementID getNextFreeID ()
void initFreeIDs (unsigned long low, unsigned long high)

Private Member Functions

 GElementID ()

Private Attributes

unsigned long ID

Static Private Attributes

IDRange FreeIDs

Friends

class QValueListNode< GElementID >

Detailed Description

Provides unique identification for elements.

Author:
Raphael Langerhorst
Do NOT use ID 0 for elements, it represents "no ID".


Constructor & Destructor Documentation

GCS::GElementID::GElementID  )  [inline, private]
 

For some reason QValueListNode requires a default constructor. to avoid instantiation without a value everywhere else this constructor is private.

Todo:
This is a workaround and should be removed as soon as Qt

does not depend on such a constructor for QValueList anymore.

GCS::GElementID::GElementID unsigned long  ID  )  [inline]
 

Public constructor initializes to given ID.

GCS::GElementID::GElementID const GElementID original  )  [inline]
 

Copy constructor.


Member Function Documentation

unsigned long GCS::GElementID::getID  )  const [inline]
 

Returns:
copy of the ID.

bool GCS::GElementID::operator!= const GElementID id  )  const [inline]
 

This enables comparing of element IDs.

Returns:
true when both GElementID objects have different IDs.

bool GCS::GElementID::operator== const GElementID id  )  const [inline]
 

This enables comparing of element IDs.

Returns:
true when both GElementID objects have the same ID.


Friends And Related Function Documentation

friend class QValueListNode< GElementID > [friend]
 

Gives QValueListNode access to the private default constructor - see GElementID() for details.


Member Data Documentation

IDRange GCS::GElementID::FreeIDs [static, private]
 

The Range of free IDs

Todo:
as soon as the server side is split up in more processes then this must be a pointer list with many ranges as the GWE needs to add ranges.

unsigned long GCS::GElementID::ID [private]
 

The ID is represented by an unsigned long integer.


The documentation for this class was generated from the following files:
Generated on Thu Oct 21 21:18:21 2004 for G System by doxygen 1.3.6