#include <Observer.h>
Inheritance diagram for cfg::Observer:

Public Member Functions | |
| virtual | ~Observer () |
| Defines the interface for cfg::Config clients. | |
| virtual void | Update (const cfg::Config &c)=0 |
| void | RemoveWatch (const char *config) |
| void | RemoveAllWatches () |
| void | SetWatch (const char *config, const char *version="default") |
Definition at line 14 of file Observer.h.
|
|
Defines the interface for cfg::Config clients.
Definition at line 15 of file Observer.cxx. References RemoveAllWatches().
00015 { this->RemoveAllWatches(); }
|
|
|
Definition at line 29 of file Observer.cxx. References cfg::Table::Instance(), and cfg::Table::RemoveAllWatches(). Referenced by cluster::Clusterer::~Clusterer(), ~Observer(), rsim::ReadoutSim::~ReadoutSim(), and spider::SpiderWeb::~SpiderWeb().
00030 {
00031 //======================================================================
00032 // Remove all watches set by this observer
00033 //======================================================================
00034 cfg::Table::Instance().RemoveAllWatches(this);
00035 }
|
|
|
Definition at line 19 of file Observer.cxx. References cfg::Table::Instance(), and cfg::Table::RemoveWatch(). Referenced by jobc::Module::SetCfgVersion().
00020 {
00021 //======================================================================
00022 // Remove this observer from the list of clients of config
00023 //======================================================================
00024 cfg::Table::Instance().RemoveWatch(config,this);
00025 }
|
|
||||||||||||
|
Definition at line 39 of file Observer.cxx. References cfg::Table::GetConfig(), cfg::Table::Instance(), cfg::Table::SetWatch(), and Update(). Referenced by cluster::Clusterer::Clusterer(), DetectorViewOption::DetectorViewOption(), main(), PlaneViewOption::PlaneViewOption(), rsim::ReadoutSim::ReadoutSim(), jobc::Module::SetCfgVersion(), spider::SpiderWeb::SpiderWeb(), TestObs::TestObs(), TestObserver::TestObserver(), and WindowOptions::WindowOptions().
00040 {
00041 //======================================================================
00042 // Set a watch for the named version of the configuration config
00043 //======================================================================
00044 // Set the new watch
00045 cfg::Table::Instance().SetWatch(config, version, this);
00046
00047 // Trigger the first update
00048 cfg::Config* c = cfg::Table::Instance().GetConfig(config, version);
00049 if (c) try { this->Update(*c); }
00050 catch (cfg::Exception e) {
00051 std::cout << " *-> " << config << "." << version << " ";
00052 e.Print();
00053 exit(-1);
00054 }
00055 }
|
|
1.3.5