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

SctData::TestSummary::SummaryManager Class Reference

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

#include <SummaryManager.h>

Inheritance diagram for SctData::TestSummary::SummaryManager:

noncopyable

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

SummaryManager & instance () 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.


Member Typedef Documentation

typedef map<string, boost::shared_ptr<const SummaryWriter> > SctData::TestSummary::SummaryManager::WriterMap [private]
 

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

Definition at line 65 of file SummaryManager.cpp.

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(), ArchTrimRangeTestResult::TestSummary(), ArchTimeWalkTestResult::TestSummary(), ArchStrobeDelayTestResult::TestSummary(), ArchPipelineTestResult::TestSummary(), ArchNPtGainTestResult::TestSummary(), ArchNoiseOccupancyTestResult::TestSummary(), ArchNMaskTestResult::TestSummary(), and ArchFullBypassTestResult::TestSummary().

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.

References Sct::IoError.

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.

References Sct::IoError, and Sct::File::write().


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 Dec 15 19:38:02 2003 for SCT DAQ/DCS Software by doxygen1.3-rc3