Sct::ISSerializableWrapper< T > Class Template Reference

wraps a isinfo object (class as a template) as a Serializable allowing it to be read and written using IOManager classes. More...

#include <ISSerializableWrapper.h>

Inheritance diagram for Sct::ISSerializableWrapper< T >:

Inheritance graph
[legend]
Collaboration diagram for Sct::ISSerializableWrapper< T >:

Collaboration graph
[legend]

Public Member Functions

 ISSerializableWrapper ()
 default constructor
 ISSerializableWrapper (shared_ptr< T > ob)
 constructor with shared_ptr to ISInfo to wrap
virtual ~ISSerializableWrapper ()
 destructor
virtual string getClassName () const
 INLINE FUNCTIONS.
virtual Sct::UniqueID getUniqueID () const
 to be implimented by concrete class
shared_ptr< T > getWrappedObject ()
 access wrapped isinfo ob
shared_ptr< const T > getWrappedObject () const
 const access to wrapped isinfo ob
virtual void publishWrappedObjectToServer (const string &isServerName) const
 publish wrapped object to IS directly, with server name
void constructUniqueID () const
 To be implimented by user code.

Private Attributes

shared_ptr< T > ob
 shared pointer to the wrapped ISInfo
string m_uniqueID
 unique ID of the ISInfo

Detailed Description

template<class T>
class Sct::ISSerializableWrapper< T >

wraps a isinfo object (class as a template) as a Serializable allowing it to be read and written using IOManager classes.

and getUniqueID in the usual way for a Serializable. Class is templated so that ISStreamerWrapper can make a new isinfo of the correct type on read. The templated class must have a public `version' member.

Todo:
is there a better way of getting the unique ID?

Definition at line 28 of file ISSerializableWrapper.h.


Constructor & Destructor Documentation

template<class T>
Sct::ISSerializableWrapper< T >::ISSerializableWrapper  )  [inline]
 

default constructor

Definition at line 31 of file ISSerializableWrapper.h.

template<class T>
Sct::ISSerializableWrapper< T >::ISSerializableWrapper shared_ptr< T >  ob  )  [inline]
 

constructor with shared_ptr to ISInfo to wrap

Parameters:
shared_ptr to the ISInfo
unique id of this ISInfo

Definition at line 39 of file ISSerializableWrapper.h.

References Sct::ISSerializableWrapper< T >::constructUniqueID().

Here is the call graph for this function:

template<class T>
virtual Sct::ISSerializableWrapper< T >::~ISSerializableWrapper  )  [inline, virtual]
 

destructor

Definition at line 44 of file ISSerializableWrapper.h.


Member Function Documentation

template<class T>
void Sct::ISSerializableWrapper< T >::constructUniqueID  )  const
 

To be implimented by user code.

Use to set m_uniqueID from object of type T

Referenced by Sct::ISSerializableWrapper< T >::ISSerializableWrapper(), Sct::ISSerializableWrapper< T >::publishWrappedObjectToServer(), and Sct::ISStreamerWrapper< T >::read().

template<class T>
string Sct::ISSerializableWrapper< T >::getClassName  )  const [inline, virtual]
 

INLINE FUNCTIONS.

Implements Sct::Streamable.

Definition at line 66 of file ISSerializableWrapper.h.

References Sct::ISSerializableWrapper< T >::ob.

Referenced by Sct::ISSerializableWrapper< T >::publishWrappedObjectToServer().

template<class T>
UniqueID Sct::ISSerializableWrapper< T >::getUniqueID  )  const [inline, virtual]
 

to be implimented by concrete class

Implements Sct::Serializable.

Definition at line 71 of file ISSerializableWrapper.h.

References Sct::ISSerializableWrapper< T >::m_uniqueID.

Referenced by Sct::ISSerializableWrapper< T >::publishWrappedObjectToServer().

template<class T>
shared_ptr<const T> Sct::ISSerializableWrapper< T >::getWrappedObject  )  const [inline]
 

const access to wrapped isinfo ob

Definition at line 52 of file ISSerializableWrapper.h.

References Sct::ISSerializableWrapper< T >::ob.

template<class T>
shared_ptr<T> Sct::ISSerializableWrapper< T >::getWrappedObject  )  [inline]
 

access wrapped isinfo ob

Definition at line 50 of file ISSerializableWrapper.h.

References Sct::ISSerializableWrapper< T >::ob.

Referenced by Sct::ISSerializableWrapper< T >::publishWrappedObjectToServer(), Sct::ISStreamerWrapper< T >::read(), and Sct::ISStreamerWrapper< T >::write().

template<class T>
void Sct::ISSerializableWrapper< T >::publishWrappedObjectToServer const string &  isServerName  )  const [inline, virtual]
 

publish wrapped object to IS directly, with server name

Parameters:
the name of the server to publish to.
Exceptions:
ISException if there is a problem with the publishing.

Implements Sct::ISSerializableWrapperI.

Definition at line 76 of file ISSerializableWrapper.h.

References Sct::ISSerializableWrapper< T >::constructUniqueID(), Sct::ISSerializableWrapper< T >::getClassName(), Sct::SctNames::getISDictionary(), Sct::ISSerializableWrapper< T >::getUniqueID(), and Sct::ISSerializableWrapper< T >::getWrappedObject().

Here is the call graph for this function:


Field Documentation

template<class T>
string Sct::ISSerializableWrapper< T >::m_uniqueID [mutable, private]
 

unique ID of the ISInfo

Definition at line 62 of file ISSerializableWrapper.h.

Referenced by Sct::ISSerializableWrapper< T >::getUniqueID().

template<class T>
shared_ptr<T> Sct::ISSerializableWrapper< T >::ob [private]
 

shared pointer to the wrapped ISInfo

Definition at line 61 of file ISSerializableWrapper.h.

Referenced by Sct::ISSerializableWrapper< T >::getClassName(), and Sct::ISSerializableWrapper< T >::getWrappedObject().


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