CMS 3D CMS Logo

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

#include <Fireworks/Core/interface/FWItemSingleAccessor.h>

Inheritance diagram for FWItemSingleAccessor:
FWItemAccessorBase BeamSpotSingleAccessor

Public Member Functions

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

Private Member Functions

 FWItemSingleAccessor (const FWItemSingleAccessor &)
 
const FWItemSingleAccessoroperator= (const FWItemSingleAccessor &)
 

Private Attributes

const void * m_data
 
const TClass * m_type
 

Detailed Description

Description: <one line="" class="" summary>="">

Usage: <usage>

Definition at line 29 of file FWItemSingleAccessor.h.

Constructor & Destructor Documentation

FWItemSingleAccessor::FWItemSingleAccessor ( const TClass *  iClass)

Definition at line 33 of file FWItemSingleAccessor.cc.

33  :
34  m_type(iClass), m_data(0)
35 {
36 }
FWItemSingleAccessor::~FWItemSingleAccessor ( )
virtual

Definition at line 43 of file FWItemSingleAccessor.cc.

44 {
45 }
FWItemSingleAccessor::FWItemSingleAccessor ( const FWItemSingleAccessor )
private

Member Function Documentation

const void * FWItemSingleAccessor::data ( ) const
virtual

Implements FWItemAccessorBase.

Definition at line 99 of file FWItemSingleAccessor.cc.

References m_data.

100 {
101  return m_data;
102 }
bool FWItemSingleAccessor::isCollection ( ) const
virtual

Implements FWItemAccessorBase.

Definition at line 123 of file FWItemSingleAccessor.cc.

124 {
125  return false;
126 }
const void * FWItemSingleAccessor::modelData ( int  iIndex) const
virtual

Implements FWItemAccessorBase.

Definition at line 90 of file FWItemSingleAccessor.cc.

References m_data.

91 {
92  if(0==iIndex) {
93  return m_data;
94  }
95  return 0;
96 }
const TClass * FWItemSingleAccessor::modelType ( ) const
virtual

Implements FWItemAccessorBase.

Definition at line 111 of file FWItemSingleAccessor.cc.

References m_type.

112 {
113  return m_type;
114 }
const FWItemSingleAccessor& FWItemSingleAccessor::operator= ( const FWItemSingleAccessor )
private
void FWItemSingleAccessor::reset ( void  )
virtual

Implements FWItemAccessorBase.

Definition at line 81 of file FWItemSingleAccessor.cc.

References m_data.

Referenced by setData().

82 {
83  m_data = 0;
84 }
void FWItemSingleAccessor::setData ( const ROOT::Reflex::Object &  product)

Definition at line 63 of file FWItemSingleAccessor.cc.

References m_data, and reset().

64 {
65  if (product.Address() == 0)
66  {
67  reset();
68  return;
69  }
70 
71  using ROOT::Reflex::Object;
72 
73  if(product.TypeOf().IsTypedef())
74  m_data = Object(product.TypeOf().ToType(), product.Address()).Address();
75  else
76  m_data = product.Address();
77  assert(0!=m_data);
78 }
unsigned int FWItemSingleAccessor::size ( void  ) const
virtual

Implements FWItemAccessorBase.

Definition at line 105 of file FWItemSingleAccessor.cc.

References m_data.

106 {
107  return 0 == m_data ? 0 : 1;
108 }
const TClass * FWItemSingleAccessor::type ( ) const
virtual

Member Data Documentation

const void* FWItemSingleAccessor::m_data
private

Definition at line 55 of file FWItemSingleAccessor.h.

Referenced by data(), modelData(), reset(), setData(), and size().

const TClass* FWItemSingleAccessor::m_type
private

Definition at line 54 of file FWItemSingleAccessor.h.

Referenced by modelType(), and type().