SctData::TestSummary::SummaryManager Class Reference

Singleton manager provides the public interface to writing a summary for a particular TestResult. More...

#include <SummaryManager.h>


Public Member Functions

string write (const TestResult &t) throw (Sct::IoError, Sct::LogicError)
 For use by clients.
void write (const TestResult &t, ostream &stream) throw (Sct::IoError, Sct::LogicError)
 For use by clients Writes to a given ostream the summary.
bool addWriter (const string &testname, boost::shared_ptr< SummaryWriter > writer) throw (Sct::LogicError)
 concrete SummaryWriters should add themselves to the map using this mechanism
boost::shared_ptr< const SummaryWritergetWriter (const string &classname) const throw (Sct::LogicError)
 get the appropriateSummaryWriter for the TestResult

Static Public Member Functions

static SummaryManagerinstance () throw ()
 get the instance of the singleton

Private Types

typedef map< string, boost::shared_ptr<
const SummaryWriter > > 
WriterMap

Private Member Functions

 ~SummaryManager ()
 do NOT delete the singleton!
 SummaryManager ()
 Singleton.
 SummaryManager (ostream &out) throw ()
 not allowed to do this - singleton

Private Attributes

WriterMap theMap
 maps TestResult names to SummaryWriters


Detailed Description

Singleton manager provides the public interface to writing a summary for a particular TestResult.

Definition at line 39 of file SummaryManager.h.


Constructor & Destructor Documentation

SctData::TestSummary::SummaryManager::~SummaryManager  )  [private]
 

do NOT delete the singleton!

Definition at line 22 of file SummaryManager.cpp.

SctData::TestSummary::SummaryManager::SummaryManager  )  [private]
 

Singleton.

Definition at line 20 of file SummaryManager.cpp.

SctData::TestSummary::SummaryManager::SummaryManager ostream &  out  )  throw () [private]
 

not allowed to do this - singleton


Member Function Documentation

bool SctData::TestSummary::SummaryManager::addWriter const string &  testname,
boost::shared_ptr< SummaryWriter writer
throw (Sct::LogicError)
 

concrete SummaryWriters should add themselves to the map using this mechanism

Parameters:
testname the name of the TestResult for which this writer will write
writer a shared pointer to the concrete SummaryWriter

shared_ptr< const SummaryWriter > SctData::TestSummary::SummaryManager::getWriter const string &  classname  )  const throw (Sct::LogicError)
 

get the appropriateSummaryWriter for the TestResult

Parameters:
classname the name of the TestResult for which the summary is to be written.

Definition at line 51 of file SummaryManager.cpp.

SummaryManager & SctData::TestSummary::SummaryManager::instance  )  throw () [static]
 

get the instance of the singleton

Definition at line 24 of file SummaryManager.cpp.

Referenced by SctAnalysis::AnalysisAlgorithm::finish(), and SctDataDisplay::TestDisplayer::printSummaryString().

void SctData::TestSummary::SummaryManager::write const TestResult t,
ostream &  stream
throw (Sct::IoError, Sct::LogicError)
 

For use by clients Writes to a given ostream the summary.

Definition at line 35 of file SummaryManager.cpp.

string SctData::TestSummary::SummaryManager::write const TestResult t  )  throw (Sct::IoError, Sct::LogicError)
 

For use by clients.

Returns a string containing the Summary.

Definition at line 29 of file SummaryManager.cpp.


Field Documentation

WriterMap SctData::TestSummary::SummaryManager::theMap [private]
 

maps TestResult names to SummaryWriters

Definition at line 75 of file SummaryManager.h.


The documentation for this class was generated from the following files:
Generated on Mon Feb 6 14:09:16 2006 for SCT DAQ/DCS Software - C++ by  doxygen 1.4.6