00001 #ifndef trsDataVI_H
00002 #define trsDataVI_H
00003
00004 #include <string>
00005 #include <iostream>
00006
00007 00009
00010 The transient data of the program should inherit from this base class.<br>
00011 The transient data assumes:
00012 <ul>
00013 <li> it will be created one (execute the \c ini() method)
00014 <li> the pointer will be preserved alive and that the data will be cleared up and filled
00015 again.
00016 </ul>
00017 <ul>
00018 <li> trsDataVI has a main virtual method update() that executes
00019 the pure virtual methods clear() and make(). The clear() and make() should
00020 be implemented by the derived class. In principle, clear() clear the data
00021 and make() makes or fill the data. <br> Note that this method is usually null and
00022 replaced by the action of an algorithmVI.
00023 <li> There is an pure virtual method ini() to initialize the data. Most of the data is created only one,
00024 the pointer kept in a serverVI, and the contents of the data replaced
00025 every update().
00026 <li> For convenience we add a virtual
00027 method writeOut() to print out the information of the data. To be compatible
00028 with the messageVI writeOut() method.
00029 <li> The command() method executed the method of this class via their names.
00030 It is useful to create composite classes. It is used for example in the
00031 template class serverVI.
00032 </ul>
00033 */
00034
00035
00036
00037
00038 class trsDataVI
00039
00040 {
00041 public:
00042
00043
00044
00046 trsDataVI() {}
00048 virtual ~trsDataVI() {}
00049
00051 virtual void update();
00052
00054 virtual void ini() = 0;
00056 virtual void clear() = 0;
00058
00059 virtual void make() = 0;
00060
00062
00063 virtual void writeOut() const {};
00064
00066
00067 virtual void command(std::string com);
00068
00069 };
00070 #endif