Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | 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, Sct_SctApi_T_SctApi &api) const
 Convenience method calls getUpdater then update on the returned ConfigUpdater.

ConfigUpdatergetUpdater (const string &className) const
 Get the ConfigUpdater for a given TestResult
Exceptions:
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

ConfigUpdaterManagerinstance ()
 Get the instance of the ConfigUpdaterManager.


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 29 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 63 of file ConfigUpdaterManager.h.


Constructor & Destructor Documentation

SctCalibrationController::ConfigUpdaterManager::ConfigUpdaterManager  )  [private]
 

Only we can make them - this is a singleton.

Definition at line 14 of file ConfigUpdaterManager.cpp.


Member Function Documentation

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

Get the ConfigUpdater for a given TestResult

Exceptions:
InvalidArgumentError if a ConfigUpdater can't be found.

Definition at line 33 of file ConfigUpdaterManager.cpp.

References updaterMap.

Referenced by update().

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

Get the instance of the ConfigUpdaterManager.

Note:
nothrow

Definition at line 17 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

Note:
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 47 of file ConfigUpdaterManager.cpp.

References updaterMap.

void SctCalibrationController::ConfigUpdaterManager::update const SctData::TestResult t,
Sct_SctApi_T_SctApi &  api
const
 

Convenience method calls getUpdater then update on the returned ConfigUpdater.

Exceptions:
InvalidArgumentError if a ConfigUpdater can't be found
SctApiAccessException if there is some problem with the api

Definition at line 22 of file ConfigUpdaterManager.cpp.

References Sct::Streamable::getClassName(), SctData::TestResult::getPassed(), SctData::TestResult::getUniqueID(), getUpdater(), and SctCalibrationController::ConfigUpdater::update().

Here is the call graph for this function:


Field Documentation

ConfigUpdaterMap SctCalibrationController::ConfigUpdaterManager::updaterMap [private]
 

And our instance of it.

Definition at line 64 of file ConfigUpdaterManager.h.

Referenced by getUpdater(), and setUpdater().


The documentation for this class was generated from the following files:
Generated on Thu Jul 15 09:52:19 2004 for SCT DAQ/DCS Software - C++ by doxygen 1.3.5