Configurator.h

Go to the documentation of this file.
00001 // -*- mode: C++ -*- 
00002 //
00003 // Copyright (C) 2006 Christian Holm Christensen <cholm@nbi.dk>
00004 //
00005 // This library is free software; you can redistribute it and/or
00006 // modify it under the terms of the GNU Lesser General Public License
00007 // as published by the Free Software Foundation; either version 2.1
00008 // of the License, or (at your option) any later version.
00009 //
00010 // This library is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013 // Lesser General Public License for more details.
00014 //
00015 // You should have received a copy of the GNU Lesser General Public
00016 // License along with this library; if not, write to the Free
00017 // Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00018 // 02111-1307 USA
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   // Forward declaration 
00037   class Server;
00038 }
00039   
00040 
00041 
00045 namespace RcuConf
00046 {
00049   // Forward decls. 
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 // EOF
00145 //
00146 
00147   
Top of page Last update Fri Apr 27 01:54:15 2007
Copyright © 2004 Christian Holm Created by DoxyGen 1.3.5