00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00025 #ifndef RCUCONF_CONFIGURATOR_H
00026 #define RCUCONF_CONFIGURATOR_H
00027 #ifndef RCUCONF_PARAMETER_H
00028 # include <rcuconf/Parameter.h>
00029 #endif
00030 #ifndef __STRING__
00031 # include <string>
00032 #endif
00033
00034 namespace RcuDb
00035 {
00036
00037 class Server;
00038 }
00039
00040
00041
00045 namespace RcuConf
00046 {
00049
00050 class Parameter;
00051 class Config;
00052 class Priority;
00053 class Value;
00054 class BlobValue;
00055 class SingleValue;
00056 class Address;
00057 class Component;
00058 class Rcu;
00059 class Bc;
00060 class Altro;
00061
00067 class Configurator
00068 {
00069 public:
00075 Configurator(RcuDb::Server& server,
00076 Rcu& rcu,
00077 Bc& bc,
00078 Altro& altro);
00080 virtual ~Configurator() {}
00081
00090 virtual int Write(int tag,
00091 int x,
00092 int y,
00093 int z);
00096 const std::string& ErrorString() const { return fErrorString; }
00098 Rcu& RCU() { return fRcu; }
00100 Bc& BC() { return fBc; }
00102 Altro& ALTRO() { return fAltro; }
00105 void SetDebug(bool use=true) { fDebug = use; }
00106 protected:
00108 virtual bool GetCurrent(int tag, int x, int y, int z);
00110 virtual bool GetOrder();
00112 virtual bool GetParams();
00114 virtual bool Write(Component& c, Parameter& p);
00120 virtual bool CheckWrite(int ret, const std::string& name, int addr);
00121
00123 RcuDb::Server& fServer;
00125 Rcu& fRcu;
00127 Bc& fBc;
00129 Altro& fAltro;
00131 std::string fErrorString;
00133 Config* fCurrent;
00135 Priority* fOrder;
00137 Parameter::List fParams;
00139 bool fDebug;
00140 };
00141 }
00142 #endif
00143
00144
00145
00146
00147