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
FWItemTVirtualCollectionProxyAccessor Class Reference

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

Inheritance diagram for FWItemTVirtualCollectionProxyAccessor:
FWItemAccessorBase

Public Member Functions

virtual const void * data () const
 
 FWItemTVirtualCollectionProxyAccessor (const TClass *iType, boost::shared_ptr< TVirtualCollectionProxy > iProxy, size_t iOffset=0)
 
bool isCollection () const
 
virtual const void * modelData (int iIndex) const
 
const TClass * modelType () const
 
void reset ()
 
void setData (const Reflex::Object &)
 override if id of an object should be different than the index More...
 
virtual unsigned int size () const
 
const TClass * type () const
 
virtual ~FWItemTVirtualCollectionProxyAccessor ()
 
- Public Member Functions inherited from FWItemAccessorBase
 FWItemAccessorBase ()
 
virtual ~FWItemAccessorBase ()
 

Private Member Functions

 FWItemTVirtualCollectionProxyAccessor (const FWItemTVirtualCollectionProxyAccessor &)
 
const
FWItemTVirtualCollectionProxyAccessor
operator= (const FWItemTVirtualCollectionProxyAccessor &)
 

Private Attributes

boost::shared_ptr
< TVirtualCollectionProxy > 
m_colProxy
 
const void * m_data
 
size_t m_offset
 
const TClass * m_type
 

Detailed Description

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

Usage: <usage>

Definition at line 31 of file FWItemTVirtualCollectionProxyAccessor.h.

Constructor & Destructor Documentation

FWItemTVirtualCollectionProxyAccessor::FWItemTVirtualCollectionProxyAccessor ( const TClass *  iType,
boost::shared_ptr< TVirtualCollectionProxy >  iProxy,
size_t  iOffset = 0 
)
FWItemTVirtualCollectionProxyAccessor::~FWItemTVirtualCollectionProxyAccessor ( )
virtual

Definition at line 49 of file FWItemTVirtualCollectionProxyAccessor.cc.

50 {
51 }
FWItemTVirtualCollectionProxyAccessor::FWItemTVirtualCollectionProxyAccessor ( const FWItemTVirtualCollectionProxyAccessor )
private

Member Function Documentation

const void * FWItemTVirtualCollectionProxyAccessor::data ( ) const
virtual

Implements FWItemAccessorBase.

Definition at line 107 of file FWItemTVirtualCollectionProxyAccessor.cc.

References m_data.

108 {
109  return m_data;
110 }
bool FWItemTVirtualCollectionProxyAccessor::isCollection ( ) const
virtual

Implements FWItemAccessorBase.

Definition at line 134 of file FWItemTVirtualCollectionProxyAccessor.cc.

135 {
136  return true;
137 }
const void * FWItemTVirtualCollectionProxyAccessor::modelData ( int  iIndex) const
virtual

Implements FWItemAccessorBase.

Definition at line 100 of file FWItemTVirtualCollectionProxyAccessor.cc.

References m_colProxy, and m_data.

101 {
102  if ( 0 == m_data) { return m_data; }
103  return m_colProxy->At(iIndex);
104 }
boost::shared_ptr< TVirtualCollectionProxy > m_colProxy
const TClass * FWItemTVirtualCollectionProxyAccessor::modelType ( ) const
virtual

Implements FWItemAccessorBase.

Definition at line 122 of file FWItemTVirtualCollectionProxyAccessor.cc.

References m_colProxy.

123 {
124  return m_colProxy->GetValueClass();
125 }
boost::shared_ptr< TVirtualCollectionProxy > m_colProxy
const FWItemTVirtualCollectionProxyAccessor& FWItemTVirtualCollectionProxyAccessor::operator= ( const FWItemTVirtualCollectionProxyAccessor )
private
void FWItemTVirtualCollectionProxyAccessor::reset ( void  )
virtual

Implements FWItemAccessorBase.

Definition at line 87 of file FWItemTVirtualCollectionProxyAccessor.cc.

References m_colProxy, and m_data.

Referenced by setData().

88 {
89  if (0 != m_data)
90  {
91  m_data=0;
92  m_colProxy->PopProxy();
93  }
94 }
boost::shared_ptr< TVirtualCollectionProxy > m_colProxy
void FWItemTVirtualCollectionProxyAccessor::setData ( const Reflex::Object &  )
virtual

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

Implements FWItemAccessorBase.

Definition at line 69 of file FWItemTVirtualCollectionProxyAccessor.cc.

References m_colProxy, m_data, m_offset, and reset().

70 {
71  if (product.Address() == 0)
72  {
73  reset();
74  return;
75  }
76 
77  if(product.TypeOf().IsTypedef())
78  m_data = Reflex::Object(product.TypeOf().ToType(),product.Address()).Address();
79  else
80  m_data = product.Address();
81 
82  assert(0!=m_data);
83  m_colProxy->PushProxy(static_cast<char*>(const_cast<void*>(m_data))+m_offset);
84 }
boost::shared_ptr< TVirtualCollectionProxy > m_colProxy
unsigned int FWItemTVirtualCollectionProxyAccessor::size ( void  ) const
virtual

Implements FWItemAccessorBase.

Definition at line 113 of file FWItemTVirtualCollectionProxyAccessor.cc.

References m_colProxy, and m_data.

114 {
115  if(m_data==0) {
116  return 0;
117  }
118  return m_colProxy->Size();
119 }
boost::shared_ptr< TVirtualCollectionProxy > m_colProxy
const TClass * FWItemTVirtualCollectionProxyAccessor::type ( ) const
virtual

Member Data Documentation

boost::shared_ptr<TVirtualCollectionProxy> FWItemTVirtualCollectionProxyAccessor::m_colProxy
private

Definition at line 61 of file FWItemTVirtualCollectionProxyAccessor.h.

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

const void* FWItemTVirtualCollectionProxyAccessor::m_data
mutableprivate

Definition at line 62 of file FWItemTVirtualCollectionProxyAccessor.h.

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

size_t FWItemTVirtualCollectionProxyAccessor::m_offset
private

Definition at line 63 of file FWItemTVirtualCollectionProxyAccessor.h.

Referenced by setData().

const TClass* FWItemTVirtualCollectionProxyAccessor::m_type
private

Definition at line 60 of file FWItemTVirtualCollectionProxyAccessor.h.

Referenced by type().