#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 18 of file Observer.cxx. References RemoveAllWatches(). 00018 { this->RemoveAllWatches(); }
|
|
|
Definition at line 32 of file Observer.cxx. References cfg::Table::Instance(), and cfg::Table::RemoveAllWatches(). Referenced by cluster::Clusterer::~Clusterer(), ~Observer(), and spider::SpiderWeb::~SpiderWeb(). 00033 {
00034 //======================================================================
00035 // Remove all watches set by this observer
00036 //======================================================================
00037 cfg::Table::Instance().RemoveAllWatches(this);
00038 }
|
|
|
Definition at line 22 of file Observer.cxx. References cfg::Table::Instance(), and cfg::Table::RemoveWatch(). 00023 {
00024 //======================================================================
00025 // Remove this observer from the list of clients of config
00026 //======================================================================
00027 cfg::Table::Instance().RemoveWatch(config,this);
00028 }
|
|
||||||||||||
|
Definition at line 42 of file Observer.cxx. References cfg::Table::GetConfig(), cfg::Table::Instance(), cfg::Table::SetWatch(), and Update(). Referenced by evgen::CosmicsGen::CosmicsGen(), DetectorViewOption::DetectorViewOption(), evd::Display3D::Display3D(), evgen::GENIEGen::GENIEGen(), main(), evd::RecoBaseDrawer::RecoBaseDrawer(), evd::SimulationDrawer::SimulationDrawer(), evgen::SingleGen::SingleGen(), spider::SpiderWeb::SpiderWeb(), TestObs::TestObs(), and TestObserver::TestObserver(). 00043 {
00044 //======================================================================
00045 // Set a watch for the named version of the configuration config
00046 //======================================================================
00047 // Set the new watch
00048 cfg::Table::Instance().SetWatch(config, version, this);
00049
00050 // Trigger the first update
00051 cfg::Config* c = cfg::Table::Instance().GetConfig(config, version);
00052 if (c) try { this->Update(*c); }
00053 catch (cfg::Exception e) {
00054 std::cout << " *-> " << config << "." << version << " ";
00055 e.Print();
00056 exit(-1);
00057 }
00058 }
|
|
1.3.9.1