emcOMAsciiT< T > Class Template Reference
[DataManager Plugins]

#include <emcOMAsciiT.h>

Inherits emcObjectManager.

Inheritance diagram for emcOMAsciiT< T >:

Inheritance graph
[legend]
List of all members.

Detailed Description

template<class T>
class emcOMAsciiT< T >

Base class for ASCII file DM plugins.

The CanRead and CanWrite are implemented here, while the actual reader and writer must be specified by the subclass(es).

Definition at line 21 of file emcOMAsciiT.h.

Public Types

typedef bool(* ReaderFcn )(T &object, int code)
typedef bool(* WriterFcn )(const T &object, int code)

Public Member Functions

 emcOMAsciiT (const char *name, const char *title, ReaderFcn reader, WriterFcn writer=0)
virtual ~emcOMAsciiT ()
virtual bool CanRead (const emcManageable &object) const
 Can we read a given object type ?
virtual bool CanWrite (const emcManageable &object) const
 Can we write a given object type ?
virtual bool Read (emcManageable &object, const PHTimeStamp &time_stamp, int id)
 Will forward to the internal fReader.
virtual void Reset ()
 Reset the OM.
virtual bool Write (const emcManageable &object, const PHTimeStamp &tStart, int id=-1)
 Will forward to the internal fWriter.

Private Attributes

ReaderFcn fReader
WriterFcn fWriter

Classes

class  changeName


Member Typedef Documentation

template<class T>
typedef bool(* emcOMAsciiT< T >::ReaderFcn)(T &object, int code)
 

Definition at line 25 of file emcOMAsciiT.h.

template<class T>
typedef bool(* emcOMAsciiT< T >::WriterFcn)(const T &object, int code)
 

Definition at line 26 of file emcOMAsciiT.h.


Constructor & Destructor Documentation

template<class T>
emcOMAsciiT< T >::emcOMAsciiT const char *  name,
const char *  title,
ReaderFcn  reader,
WriterFcn  writer = 0
 

template<class T>
emcOMAsciiT< T >::~emcOMAsciiT  )  [virtual]
 

Definition at line 99 of file emcOMAsciiT.h.


Member Function Documentation

template<class T>
bool emcOMAsciiT< T >::CanRead const emcManageable object  )  const [virtual]
 

Can we read a given object type ?

Returns:
false by default.

Reimplemented from emcObjectManager.

Definition at line 106 of file emcOMAsciiT.h.

References emcManageable::GetSource(), and emcManageable::kFile_ASCII.

template<class T>
bool emcOMAsciiT< T >::CanWrite const emcManageable object  )  const [virtual]
 

Can we write a given object type ?

Returns:
false by default.

Reimplemented from emcObjectManager.

Definition at line 126 of file emcOMAsciiT.h.

References emcManageable::GetDestination(), and emcManageable::kFile_ASCII.

template<class T>
bool emcOMAsciiT< T >::Read emcManageable object,
const PHTimeStamp &  time_stamp,
int  id
[virtual]
 

Will forward to the internal fReader.

Implements emcObjectManager.

Definition at line 146 of file emcOMAsciiT.h.

References emcOMAsciiT< T >::fReader.

template<class T>
virtual void emcOMAsciiT< T >::Reset  )  [inline, virtual]
 

Reset the OM.

After a call to Reset, the OM must behave as if it was newly created.

Implements emcObjectManager.

Definition at line 45 of file emcOMAsciiT.h.

template<class T>
bool emcOMAsciiT< T >::Write const emcManageable object,
const PHTimeStamp &  tStart,
int  id = -1
[virtual]
 

Will forward to the internal fWriter.

Implements emcObjectManager.

Definition at line 157 of file emcOMAsciiT.h.

References emcOMAsciiT< T >::fWriter.


Member Data Documentation

template<class T>
ReaderFcn emcOMAsciiT< T >::fReader [private]
 

Definition at line 54 of file emcOMAsciiT.h.

Referenced by emcOMAsciiT< T >::Read().

template<class T>
WriterFcn emcOMAsciiT< T >::fWriter [private]
 

Definition at line 55 of file emcOMAsciiT.h.

Referenced by emcOMAsciiT< T >::Write().


The documentation for this class was generated from the following file: