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 edm::ObjectWithDict &)
 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 51 of file FWItemTVirtualCollectionProxyAccessor.cc.

52 {
53 }
FWItemTVirtualCollectionProxyAccessor::FWItemTVirtualCollectionProxyAccessor ( const FWItemTVirtualCollectionProxyAccessor )
private

Member Function Documentation

const void * FWItemTVirtualCollectionProxyAccessor::data ( ) const
virtual

Implements FWItemAccessorBase.

Definition at line 105 of file FWItemTVirtualCollectionProxyAccessor.cc.

References m_data.

Referenced by cuy.FindIssue::__init__().

106 {
107  return m_data;
108 }
bool FWItemTVirtualCollectionProxyAccessor::isCollection ( ) const
virtual

Implements FWItemAccessorBase.

Definition at line 132 of file FWItemTVirtualCollectionProxyAccessor.cc.

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

Implements FWItemAccessorBase.

Definition at line 98 of file FWItemTVirtualCollectionProxyAccessor.cc.

References m_colProxy, and m_data.

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

Implements FWItemAccessorBase.

Definition at line 120 of file FWItemTVirtualCollectionProxyAccessor.cc.

References m_colProxy.

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

Implements FWItemAccessorBase.

Definition at line 85 of file FWItemTVirtualCollectionProxyAccessor.cc.

References m_colProxy, and m_data.

Referenced by setData().

86 {
87  if (0 != m_data)
88  {
89  m_data=0;
90  m_colProxy->PopProxy();
91  }
92 }
boost::shared_ptr< TVirtualCollectionProxy > m_colProxy
void FWItemTVirtualCollectionProxyAccessor::setData ( const edm::ObjectWithDict )
virtual

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

Implements FWItemAccessorBase.

Definition at line 71 of file FWItemTVirtualCollectionProxyAccessor.cc.

References edm::ObjectWithDict::address(), m_colProxy, m_data, m_offset, and reset().

72 {
73  if (product.address() == 0)
74  {
75  reset();
76  return;
77  }
78 
79  m_data = product.address();
80  assert(0!=m_data);
81  m_colProxy->PushProxy(static_cast<char*>(const_cast<void*>(m_data))+m_offset);
82 }
boost::shared_ptr< TVirtualCollectionProxy > m_colProxy
unsigned int FWItemTVirtualCollectionProxyAccessor::size ( void  ) const
virtual

Implements FWItemAccessorBase.

Definition at line 111 of file FWItemTVirtualCollectionProxyAccessor.cc.

References m_colProxy, and m_data.

112 {
113  if(m_data==0) {
114  return 0;
115  }
116  return m_colProxy->Size();
117 }
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().