00001
00002 #ifndef XSIL_XSIL_HH
00003 #define XSIL_XSIL_HH
00004
00005 #include "xsil/xobj.hh"
00006 #include <list>
00007 #include <string>
00008
00009 class Time;
00010
00011 namespace xsil {
00012 class array;
00013 class comment;
00014 class param;
00015 class table;
00016 class time;
00017
00024 class XSIL : public xobj {
00025 public:
00026 using xobj::find;
00027
00031 XSIL(void);
00032
00038 XSIL(const char* Name, const char* Type=0);
00039
00044 XSIL(const XSIL& x);
00045
00049 virtual ~XSIL(void);
00050
00055 virtual XSIL* Clone(void) const;
00056
00061 void Spew(Xwriter& ostr) const;
00062
00073 virtual const xobj* find(const std::string& nm, const std::string& ty) const;
00074
00085 virtual xobj* find(const std::string& nm, const std::string& ty);
00086
00092 xobj* addObject(const xobj& x);
00093
00099 xobj* addObject(xobj* x);
00100
00107 virtual XSIL* addXSIL(const char* Name, const char* Type=0);
00108
00116 array* addArray(const char* Name, const char* Type=0, const char* Unit=0);
00117
00123 comment* addComment(const char* Text=0);
00124
00133 param* addParam(const char* Name, const char* Type=0, const char* Unit=0,
00134 const char* Value=0);
00135
00143 param* addParam(const char* Name, const char* Unit, double Value);
00144
00152 param* addParam(const char* Name, const char* Unit, int Value);
00153
00160 table* addTable(const char* Name, const char* Type=0);
00161
00169 time* addTime(const char* Name, const char* Type=0, const char* Value=0);
00170
00177 time* addTime(const char* Name, const Time& t);
00178
00183 void erase(const xobj* x);
00184
00189 virtual const char* getObjType(void) const;
00190
00191 private:
00194 typedef std::list<xobj*> ObjList;
00195 typedef ObjList::iterator objlist_iterator;
00196 typedef ObjList::const_iterator const_objlist_iterator;
00197 ObjList mList;
00198 };
00199
00200 }
00201
00202 #endif // XSIL_XSIL_HH