00001
00002 #ifndef XSIL_XOBJ_HH
00003 #define XSIL_XOBJ_HH
00004 #include <time.h>
00005 #include <string>
00006
00007 namespace xsil {
00008 class Xwriter;
00009
00018 class xobj {
00019 public:
00020
00024 xobj(void);
00025
00031 xobj(const char* Name, const char* Type=0);
00032
00036 virtual ~xobj(void) {}
00037
00042 virtual void Spew(xsil::Xwriter& ostr) const=0;
00043
00048 virtual const char* getObjType(void) const=0;
00049
00054 virtual xobj* Clone(void) const=0;
00055
00063 virtual const xobj* find(const std::string& name) const;
00064
00072 virtual xobj* find(const std::string& name);
00073
00086 virtual const xobj* find(const std::string& nm, const std::string& ty) const;
00087
00100 virtual xobj* find(const std::string& nm, const std::string& ty);
00101
00106 const char* getName(void) const;
00107
00112 const char* getType(void) const;
00113
00118 const std::string& refName(void) const;
00119
00124 const std::string& refType(void) const;
00125
00130 void setName(const char* Name);
00131
00136 void setType(const char* Type);
00137
00138 private:
00139 std::string mName;
00140 std::string mType;
00141 };
00142
00143
00144 inline const std::string&
00145 xsil::xobj::refName(void) const {
00146 return mName;
00147 }
00148
00149 inline const std::string&
00150 xsil::xobj::refType(void) const {
00151 return mType;
00152 }
00153
00154 }
00155
00156 #endif // XSIL_XOBJ_HH