HouseOver.THARM.UniquelyIdentifiable Class Reference

An abstract class used for assigning unique ID's to inherieted objects. The class contains a private static integer variable which represents the ID next to be assigned. More...

Inheritance diagram for HouseOver.THARM.UniquelyIdentifiable:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 UniquelyIdentifiable (int id)
 When inherited from, this abstract class represents an unique ID.
 UniquelyIdentifiable (int id)
 When inherited from, this abstract class represents an unique ID.

Properties

static int NextID [get]
 Return the value of the next ID to be assigned.
int ID [get]
 Return a new ID and add 1 to the static NextID variable.

Private Member Functions

int Next (int h)
int Next (int h)

Private Attributes

int id

Static Private Attributes

static int nextID = 0

Detailed Description

An abstract class used for assigning unique ID's to inherieted objects. The class contains a private static integer variable which represents the ID next to be assigned.

Definition at line 12 of file UniquelyIdentifiable.cs.


Constructor & Destructor Documentation

HouseOver.THARM.UniquelyIdentifiable.UniquelyIdentifiable ( int  id  ) 

When inherited from, this abstract class represents an unique ID.

Parameters:
id An unique ID number.

Definition at line 21 of file UniquelyIdentifiable.cs.

00022         {
00023             this.id = Next(id);
00024         }

HouseOver.THARM.UniquelyIdentifiable.UniquelyIdentifiable ( int  id  ) 

When inherited from, this abstract class represents an unique ID.

Parameters:
id An unique ID number.

Definition at line 21 of file UniquelyIdentifiable.cs.

00022         {
00023             this.id = Next(id);
00024         }


Member Function Documentation

int HouseOver.THARM.UniquelyIdentifiable.Next ( int  h  )  [private]

Definition at line 34 of file UniquelyIdentifiable.cs.

00035         {
00036             if (h >= nextID)
00037                 nextID = h + 1;
00038 
00039             return h;
00040         }

int HouseOver.THARM.UniquelyIdentifiable.Next ( int  h  )  [private]

Definition at line 34 of file UniquelyIdentifiable.cs.

00035         {
00036             if (h >= nextID)
00037                 nextID = h + 1;
00038 
00039             return h;
00040         }


Member Data Documentation

static int HouseOver::THARM.UniquelyIdentifiable::nextID = 0 [static, private]

Definition at line 14 of file UniquelyIdentifiable.cs.

int HouseOver::THARM.UniquelyIdentifiable::id [private]

Definition at line 15 of file UniquelyIdentifiable.cs.


Property Documentation

static int HouseOver::THARM.UniquelyIdentifiable::NextID [static, get]

Return the value of the next ID to be assigned.

Definition at line 30 of file UniquelyIdentifiable.cs.

int HouseOver::THARM.UniquelyIdentifiable::ID [get]

Return a new ID and add 1 to the static NextID variable.

Definition at line 46 of file UniquelyIdentifiable.cs.


The documentation for this class was generated from the following files:
Generated on Wed Jan 10 03:43:05 2007 for THARM by  doxygen 1.5.1-p1