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::SctApiIPC_ptr api, bool force=false) 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

static 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.

Referenced by SctCalibrationController::CalibrationControllerImpl::applyChanges(), and SctCalibrationController::CalibrationControllerImpl::updateWith().

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::SctApiIPC_ptr  api,
bool  force = false
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(), and getUpdater().

Referenced by SctCalibrationController::CalibrationControllerImpl::applyChanges(), and SctCalibrationController::CalibrationControllerImpl::updateWith().

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 Mon Feb 6 14:05:24 2006 for SCT DAQ/DCS Software - C++ by  doxygen 1.4.6