CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
FWItemRandomAccessorBase Class Reference

#include <FWItemRandomAccessor.h>

Inheritance diagram for FWItemRandomAccessorBase:
FWItemAccessorBase FWItemDetSetAccessor< C, COLL, V > FWItemMuonDigiAccessor< C, V > FWItemNewDetSetAccessor< C, COLL, V > FWItemRandomAccessor< C, V > FWItemRangeAccessor< C, R, V >

Public Member Functions

const void * data () const
 
bool isCollection () const
 
const TClass * modelType () const
 
virtual void reset ()
 
void setData (const Reflex::Object &)
 override if id of an object should be different than the index More...
 
const TClass * type () const
 
virtual ~FWItemRandomAccessorBase ()
 
- Public Member Functions inherited from FWItemAccessorBase
 FWItemAccessorBase ()
 
virtual const void * modelData (int iIndex) const =0
 
virtual unsigned int size () const =0
 
virtual ~FWItemAccessorBase ()
 

Protected Member Functions

 FWItemRandomAccessorBase (const TClass *type, const type_info &modelTypeName)
 
void * getDataPtr () const
 

Protected Attributes

void * m_data
 
const TClass * m_modelType
 
const TClass * m_type
 

Private Member Functions

 FWItemRandomAccessorBase (const FWItemRandomAccessorBase &)
 
const FWItemRandomAccessorBaseoperator= (const FWItemRandomAccessorBase &)
 

Detailed Description

Non templated part of the generic FWItemRandomAccessor<T> class.

Notice that the constructor is protected, so that it is impossible to instanciate this baseclass directly.

Definition at line 29 of file FWItemRandomAccessor.h.

Constructor & Destructor Documentation

FWItemRandomAccessorBase::~FWItemRandomAccessorBase ( )
virtual

Definition at line 37 of file FWItemRandomAccessor.cc.

38 {
39 }
FWItemRandomAccessorBase::FWItemRandomAccessorBase ( const TClass *  type,
const type_info &  modelTypeName 
)
protected

Definition at line 25 of file FWItemRandomAccessor.cc.

26 :m_type(type),
27  m_modelType(TClass::GetClass(modelTypeName)),
28  m_data(0)
29 {
30 }
type
Definition: HCALResponse.h:22
FWItemRandomAccessorBase::FWItemRandomAccessorBase ( const FWItemRandomAccessorBase )
private

Member Function Documentation

const void * FWItemRandomAccessorBase::data ( ) const
virtual

Implements FWItemAccessorBase.

Definition at line 82 of file FWItemRandomAccessor.cc.

References m_data.

83 {
84  return m_data;
85 }
void * FWItemRandomAccessorBase::getDataPtr ( ) const
protected
bool FWItemRandomAccessorBase::isCollection ( ) const
virtual

Implements FWItemAccessorBase.

Definition at line 107 of file FWItemRandomAccessor.cc.

108 {
109  return true;
110 }
const TClass * FWItemRandomAccessorBase::modelType ( ) const
virtual

Implements FWItemAccessorBase.

Definition at line 100 of file FWItemRandomAccessor.cc.

References m_modelType.

101 {
102  assert(m_modelType);
103  return m_modelType;
104 }
const FWItemRandomAccessorBase& FWItemRandomAccessorBase::operator= ( const FWItemRandomAccessorBase )
private
void FWItemRandomAccessorBase::reset ( void  )
virtual

Implements FWItemAccessorBase.

Definition at line 73 of file FWItemRandomAccessor.cc.

References m_data.

Referenced by setData().

74 {
75  m_data = 0;
76 }
void FWItemRandomAccessorBase::setData ( const Reflex::Object &  )
virtual

override if id of an object should be different than the index

Implements FWItemAccessorBase.

Definition at line 57 of file FWItemRandomAccessor.cc.

References m_data, and reset().

58 {
59  if (product.Address() == 0)
60  {
61  reset();
62  return;
63  }
64 
65  if(product.TypeOf().IsTypedef())
66  m_data = Reflex::Object(product.TypeOf().ToType(),product.Address()).Address();
67  else
68  m_data = product.Address();
69  assert(0!=m_data);
70 }
const TClass * FWItemRandomAccessorBase::type ( ) const
virtual

Member Data Documentation

void* FWItemRandomAccessorBase::m_data
mutableprotected

Definition at line 48 of file FWItemRandomAccessor.h.

Referenced by data(), getDataPtr(), reset(), and setData().

const TClass* FWItemRandomAccessorBase::m_modelType
protected

Definition at line 47 of file FWItemRandomAccessor.h.

Referenced by modelType().

const TClass* FWItemRandomAccessorBase::m_type
protected

Definition at line 46 of file FWItemRandomAccessor.h.

Referenced by type().