Main Page   Modules   Namespace List   Class Hierarchy   Data Structures   File List   Namespace Members   Data Fields   Globals   Related Pages  

SctCalibrationController::ConfigUpdaterManager Class Reference

This singleton holds a map between Test names and ConfigUpdaters It also has a convenience method that looks up the ConfigUpdater and calls its update method. More...

#include <ConfigUpdaterManager.h>


Public Member Functions

void update (const SctData::TestResult &t) const
 Convenience method calls getUpdater then update on the returned ConfigUpdater.

ConfigUpdatergetUpdater (const string &className) const
 Get the ConfigUpdater for a given TestResult throws InvalidArgumentError if a ConfigUpdater can't be found.

bool setUpdater (const string &testName, shared_ptr< ConfigUpdater > updater)
 Sets the ConfigUpdater for a Test name.


Static Public Member Functions

ConfigUpdaterManager & instance ()
 Get the instance of the ConfigUpdaterManager nothrow.


Private Types

typedef map< string, shared_ptr<
ConfigUpdater > > 
ConfigUpdaterMap
 Map between strings and ConfigUpdaters.


Private Member Functions

 ConfigUpdaterManager ()
 Only we can make them - this is a singleton.


Private Attributes

ConfigUpdaterMap updaterMap
 And our instance of it.


Detailed Description

This singleton holds a map between Test names and ConfigUpdaters It also has a convenience method that looks up the ConfigUpdater and calls its update method.

Author:
Matthew Palmer

Definition at line 27 of file ConfigUpdaterManager.h.


Member Typedef Documentation

typedef map<string, shared_ptr<ConfigUpdater> > SctCalibrationController::ConfigUpdaterManager::ConfigUpdaterMap [private]
 

Map between strings and ConfigUpdaters.

Definition at line 60 of file ConfigUpdaterManager.h.


Constructor & Destructor Documentation

SctCalibrationController::ConfigUpdaterManager::ConfigUpdaterManager   [private]
 

Only we can make them - this is a singleton.

Definition at line 11 of file ConfigUpdaterManager.cpp.


Member Function Documentation

ConfigUpdater & SctCalibrationController::ConfigUpdaterManager::getUpdater const string &    className const
 

Get the ConfigUpdater for a given TestResult throws InvalidArgumentError if a ConfigUpdater can't be found.

Definition at line 23 of file ConfigUpdaterManager.cpp.

References updaterMap.

Referenced by update().

ConfigUpdaterManager & SctCalibrationController::ConfigUpdaterManager::instance   [static]
 

Get the instance of the ConfigUpdaterManager nothrow.

Definition at line 14 of file ConfigUpdaterManager.cpp.

bool SctCalibrationController::ConfigUpdaterManager::setUpdater const string &    testName,
shared_ptr< ConfigUpdater   updater
 

Sets the ConfigUpdater for a Test name.

If there is already a ConfigUpdater for the given name, then the map is not updated nothrow

Parameters:
testName the classname of the TestResult that can be updated by updater
Returns:
true if updater was successfully added, false otherwise

Definition at line 37 of file ConfigUpdaterManager.cpp.

References testName, and updaterMap.

void SctCalibrationController::ConfigUpdaterManager::update const SctData::TestResult   t const
 

Convenience method calls getUpdater then update on the returned ConfigUpdater.

throws InvalidArgumentError if a ConfigUpdater can't be found

Definition at line 19 of file ConfigUpdaterManager.cpp.

References Sct::Streamable::getClassName(), getUpdater(), and SctCalibrationController::ConfigUpdater::update().


Field Documentation

ConfigUpdaterMap SctCalibrationController::ConfigUpdaterManager::updaterMap [private]
 

And our instance of it.

Definition at line 61 of file ConfigUpdaterManager.h.

Referenced by getUpdater(), and setUpdater().


The documentation for this class was generated from the following files:
Generated on Mon Dec 15 19:37:32 2003 for SCT DAQ/DCS Software by doxygen1.3-rc3