Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

CReadException Class Reference

#include <CReadException.h>

List of all members.

Public Member Functions

 CReadException (const string &rInitialReason=string(""), int nWordsRead=0)
 Parameterized construction.

virtual ~CReadException ()
 Destruction.

 CReadException (const CReadException &aCReadException)
 copy

CReadExceptionoperator= (const CReadException &aCReadException)
 Assignment.

int operator== (const CReadException &aCReadException)
 == comparison

int operator!= (const CReadException &aCReadExceptoin)
 != comparison.

int GetCount () const
 Selector for m_nWordsRead.

string GetString () const
 Selectors for m_sAggregateException.

void AddItem (const string &rMessage)
 Append a string to the aggregate.

void AddCount (int nWords)
 Increment the count.

void Add (const string &rMessage, int nwords)
 AddItem and AddCount.

virtual const char * ReasonText () const
 Really will return m_sAggregateException.

virtual Int_t ReasonCode () const
 Will return m_nWordsRead for now.


Private Attributes

string m_sAggregateException
 Aggregate of the exception strings.

int m_nWordsRead
 Number of words successfully read.


Detailed Description

CLASS_PACKAGE Aggregates the exceptions that can be thrown by readout objects contained wthin a ReadOrder. In a read order object, each item read can do any of the following:

Definition at line 325 of file CReadException.h.


Constructor & Destructor Documentation

CReadException::CReadException const string &  rInitialReason = string(""),
int  nWords = 0
 

Parameterized construction.

Parameterized constructor. This constructs a CReadException with optoinal non default initial values for the aggregate exception string and, optionally the number of words read.

Parameters:
rInitialReason (const string& default ="") An initial value for the aggregate exception string.
nWordsRead (int default=0): An initial value for m_nWordsRead.

Definition at line 320 of file CReadException.cpp.

CReadException::~CReadException  )  [virtual]
 

Destruction.

Definition at line 330 of file CReadException.cpp.

CReadException::CReadException const CReadException aCReadException  ) 
 

copy

Construct a temp copy of a reference object.

Parameters:
aCReadException (const CReadException&) The reference object that we are copy constructing.

Definition at line 340 of file CReadException.cpp.


Member Function Documentation

void CReadException::Add const string &  rMessage,
int  nWords
 

AddItem and AddCount.

Adds an item and a count.

Parameters:
rMessage (const string&) appended as a list element to the aggregate message
nWords (int) added to m_nWordsRead.

Definition at line 454 of file CReadException.cpp.

References AddCount(), and AddItem().

Referenced by CReadOrder::Read().

void CReadException::AddCount int  nWords  ) 
 

Increment the count.

Adds the paramter to the m_nWordsRead field.

Parameters:
nWords (int) Number of words read to add to m_nWordsRead.

Definition at line 442 of file CReadException.cpp.

References m_nWordsRead.

Referenced by Add().

void CReadException::AddItem const string &  rMessage  ) 
 

Append a string to the aggregate.

Adds an exception string to the current list in m_sAggregateException. Exception strings are added in such a way that this member remains a valid TCL list.

Parameters:
rMessage (const string&) The string to append as a list element to the aggregate message.

Definition at line 427 of file CReadException.cpp.

References m_sAggregateException.

Referenced by Add().

int CReadException::GetCount  )  const
 

Selector for m_nWordsRead.

Returns:
m_nWordsRead

Definition at line 398 of file CReadException.cpp.

References m_nWordsRead.

Referenced by CReadOrder::Read().

string CReadException::GetString  )  const
 

Selectors for m_sAggregateException.

Returns:
m_sAggregateException

Definition at line 410 of file CReadException.cpp.

References m_sAggregateException.

int CReadException::operator!= const CReadException aCReadException  ) 
 

!= comparison.

Returns:
int returns the inverse of operator==.
Parameters:
aCReadException (CreadException&) The object we compare *this to.

Definition at line 386 of file CReadException.cpp.

References operator==().

CReadException & CReadException::operator= const CReadException aCReadException  ) 
 

Assignment.

Assigns *this to contain a copy of aCReadException.

Parameters:
aCReadException (const CReadException&) The rhs of the assignment operator.
Returns:
CReadException& this in order to support operator chaining.

Definition at line 355 of file CReadException.cpp.

References m_nWordsRead, and m_sAggregateException.

int CReadException::operator== const CReadException aCReadException  ) 
 

== comparison

Returns:
int Return nonzero if *this is the same as aCReadException.
Parameters:
aCReadException (CreadException&) The object we compare *this to.

Definition at line 373 of file CReadException.cpp.

References m_nWordsRead, and m_sAggregateException.

Referenced by operator!=().

int CReadException::ReasonCode  )  const [virtual]
 

Will return m_nWordsRead for now.

Returns:
int Return the reason code, which in this case is the total number of words read.

Definition at line 475 of file CReadException.cpp.

References m_nWordsRead.

const char * CReadException::ReasonText  )  const [virtual]
 

Really will return m_sAggregateException.

Returns:
string Returns the aggregate reason message.

Definition at line 465 of file CReadException.cpp.

References m_sAggregateException.


Member Data Documentation

int CReadException::m_nWordsRead [private]
 

Number of words successfully read.

Definition at line 330 of file CReadException.h.

Referenced by AddCount(), GetCount(), operator=(), operator==(), and ReasonCode().

string CReadException::m_sAggregateException [private]
 

Aggregate of the exception strings.

Definition at line 329 of file CReadException.h.

Referenced by AddItem(), GetString(), operator=(), operator==(), and ReasonText().


The documentation for this class was generated from the following files:
Generated on Fri Mar 12 13:04:36 2004 for Scripted Readout by doxygen 1.3.4