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

UTIL::LCFixedObject< NINT, NFLOAT, NDOUBLE > Class Template Reference

#include <LCFixedObject.h>

List of all members.

Public Member Functions

 LCFixedObject ()
 LCFixedObject (LCObject *obj)
LCGenericObjectImplobj ()
virtual ~LCFixedObject ()
virtual int id ()
int getNInt () const
int getNFloat () const
int getNDouble () const
int getIntVal (int index) const
float getFloatVal (int index) const
double getDoubleVal (int index) const
bool isFixedSize () const

Protected Attributes

LCGenericObjectImpl_obj
bool _createdObject


Detailed Description

template<int NINT, int NFLOAT, int NDOUBLE>
class UTIL::LCFixedObject< NINT, NFLOAT, NDOUBLE >

Template class for fixed size LCGenericObject subclasses. By inheriting from this class users can very easily implement their own objects.
It uses an instance of LCGenericObjectImpl that holds the data, thus there is no overhead when the data is read from a database or file for copying it to some local structure (Decorator pattern).
This is still an abstract class: subclasses have to implement LCGenericObject::getTypeName() and LCGenericObject::getDataDescription().

Author:
gaede
Version:
Id
LCFixedObject.h,v 1.2 2005/02/25 17:27:45 gaede Exp

Definition at line 27 of file LCFixedObject.h.


Constructor & Destructor Documentation

template<int NINT, int NFLOAT, int NDOUBLE>
UTIL::LCFixedObject< NINT, NFLOAT, NDOUBLE >::LCFixedObject  )  [inline]
 

Default c'tor.

Definition at line 33 of file LCFixedObject.h.

template<int NINT, int NFLOAT, int NDOUBLE>
UTIL::LCFixedObject< NINT, NFLOAT, NDOUBLE >::LCFixedObject LCObject obj  )  [inline]
 

C'tor to be used for elements of LCGenericObjects read from an LCIO file or the database. Subclasses should 'override' this, e.g.:
Myclass(LCObject* obj) : LCFixedObject(obj) {}

Definition at line 44 of file LCFixedObject.h.

References UTIL::LCFixedObject< NINT, NFLOAT, NDOUBLE >::obj().

template<int NINT, int NFLOAT, int NDOUBLE>
virtual UTIL::LCFixedObject< NINT, NFLOAT, NDOUBLE >::~LCFixedObject  )  [inline, virtual]
 

Clean up if we created a new LCGenericObjectImpl

Definition at line 81 of file LCFixedObject.h.


Member Function Documentation

template<int NINT, int NFLOAT, int NDOUBLE>
double UTIL::LCFixedObject< NINT, NFLOAT, NDOUBLE >::getDoubleVal int  index  )  const [inline]
 

Definition at line 102 of file LCFixedObject.h.

template<int NINT, int NFLOAT, int NDOUBLE>
float UTIL::LCFixedObject< NINT, NFLOAT, NDOUBLE >::getFloatVal int  index  )  const [inline]
 

Definition at line 99 of file LCFixedObject.h.

template<int NINT, int NFLOAT, int NDOUBLE>
int UTIL::LCFixedObject< NINT, NFLOAT, NDOUBLE >::getIntVal int  index  )  const [inline]
 

Definition at line 96 of file LCFixedObject.h.

template<int NINT, int NFLOAT, int NDOUBLE>
int UTIL::LCFixedObject< NINT, NFLOAT, NDOUBLE >::getNDouble  )  const [inline]
 

Definition at line 94 of file LCFixedObject.h.

template<int NINT, int NFLOAT, int NDOUBLE>
int UTIL::LCFixedObject< NINT, NFLOAT, NDOUBLE >::getNFloat  )  const [inline]
 

Definition at line 93 of file LCFixedObject.h.

template<int NINT, int NFLOAT, int NDOUBLE>
int UTIL::LCFixedObject< NINT, NFLOAT, NDOUBLE >::getNInt  )  const [inline]
 

Definition at line 92 of file LCFixedObject.h.

template<int NINT, int NFLOAT, int NDOUBLE>
virtual int UTIL::LCFixedObject< NINT, NFLOAT, NDOUBLE >::id  )  [inline, virtual]
 

Return the id of the underlying LCGenericObjectImpl

Definition at line 87 of file LCFixedObject.h.

template<int NINT, int NFLOAT, int NDOUBLE>
bool UTIL::LCFixedObject< NINT, NFLOAT, NDOUBLE >::isFixedSize  )  const [inline]
 

Definition at line 105 of file LCFixedObject.h.

template<int NINT, int NFLOAT, int NDOUBLE>
LCGenericObjectImpl* UTIL::LCFixedObject< NINT, NFLOAT, NDOUBLE >::obj  )  [inline]
 

The LCGenericObjectImpl . Sublcasses use this to access their data.

Definition at line 76 of file LCFixedObject.h.

Referenced by UTIL::LCFixedObject< NINT, NFLOAT, NDOUBLE >::LCFixedObject().


Member Data Documentation

template<int NINT, int NFLOAT, int NDOUBLE>
bool UTIL::LCFixedObject< NINT, NFLOAT, NDOUBLE >::_createdObject [protected]
 

Definition at line 112 of file LCFixedObject.h.

template<int NINT, int NFLOAT, int NDOUBLE>
LCGenericObjectImpl* UTIL::LCFixedObject< NINT, NFLOAT, NDOUBLE >::_obj [protected]
 

Definition at line 111 of file LCFixedObject.h.


The documentation for this class was generated from the following file:
Generated on Sun Jun 3 06:32:40 2007 for A TPC Tracking Environment by  doxygen 1.3.9.1