00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef TaggedObject_h
00027 #define TaggedObject_h
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 #include <iostream.h>
00042
00043 #include <Domain.h>
00044
00058 class TaggedObject
00059 {
00060 public:
00066 TaggedObject(int tag);
00067
00072 virtual ~TaggedObject();
00073
00074
00079 inline int getTag(void) const;
00080
00081
00087 virtual void Print(ostream &s, int flag =0) =0;
00088
00090 friend ostream &operator<<(ostream &s, TaggedObject &m);
00091
00092
00093 protected:
00095 void setTag(int newTag);
00096
00097 private:
00098 int theTag;
00099 };
00100
00102
00103 inline int
00104 TaggedObject::getTag(void) const
00105 {
00106 return theTag;
00107 }
00108
00109 #endif
00110
00111