UniquelyIdentifiable.cs

Go to the documentation of this file.
00001 using System;
00002 using System.Collections.Generic;
00003 using System.Text;
00004 
00005 namespace HouseOver.THARM
00006 {
00011     [Serializable]
00012     public abstract class UniquelyIdentifiable
00013     {
00014         private static int nextID = 0;
00015         private int id;
00016 
00021         public UniquelyIdentifiable(int id)
00022         {
00023             this.id = Next(id);
00024         }
00025 
00029         public static int NextID
00030         {
00031             get { return nextID;}
00032         }
00033         
00034         private int Next(int h)
00035         {
00036             if (h >= nextID)
00037                 nextID = h + 1;
00038 
00039             return h;
00040         }
00041 
00045         public int ID
00046         {
00047             get { return id; }
00048         }
00049         
00050     }
00051 }

Generated on Wed Jan 10 03:42:42 2007 for THARM by  doxygen 1.5.1-p1