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 }