CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

FWItemTVirtualCollectionProxyAccessor Class Reference

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

Inheritance diagram for FWItemTVirtualCollectionProxyAccessor:
FWItemAccessorBase

List of all members.

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
virtual unsigned int size () const
const TClass * type () const
virtual ~FWItemTVirtualCollectionProxyAccessor ()

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 
)

Definition at line 35 of file FWItemTVirtualCollectionProxyAccessor.cc.

   : m_type(iType),
     m_colProxy(iProxy),
     m_data(0),
     m_offset(iOffset)
{
}
FWItemTVirtualCollectionProxyAccessor::~FWItemTVirtualCollectionProxyAccessor ( ) [virtual]

Definition at line 51 of file FWItemTVirtualCollectionProxyAccessor.cc.

{
}
FWItemTVirtualCollectionProxyAccessor::FWItemTVirtualCollectionProxyAccessor ( const FWItemTVirtualCollectionProxyAccessor ) [private]

Member Function Documentation

const void * FWItemTVirtualCollectionProxyAccessor::data ( ) const [virtual]

Implements FWItemAccessorBase.

Definition at line 109 of file FWItemTVirtualCollectionProxyAccessor.cc.

References m_data.

{
   return m_data;
}
bool FWItemTVirtualCollectionProxyAccessor::isCollection ( ) const [virtual]

Implements FWItemAccessorBase.

Definition at line 136 of file FWItemTVirtualCollectionProxyAccessor.cc.

{
   return true;
}
const void * FWItemTVirtualCollectionProxyAccessor::modelData ( int  iIndex) const [virtual]

Implements FWItemAccessorBase.

Definition at line 102 of file FWItemTVirtualCollectionProxyAccessor.cc.

References m_colProxy, and m_data.

{
   if ( 0 == m_data) { return m_data; }
   return m_colProxy->At(iIndex);
}
const TClass * FWItemTVirtualCollectionProxyAccessor::modelType ( ) const [virtual]

Implements FWItemAccessorBase.

Definition at line 124 of file FWItemTVirtualCollectionProxyAccessor.cc.

References m_colProxy.

{
   return m_colProxy->GetValueClass();
}
const FWItemTVirtualCollectionProxyAccessor& FWItemTVirtualCollectionProxyAccessor::operator= ( const FWItemTVirtualCollectionProxyAccessor ) [private]
void FWItemTVirtualCollectionProxyAccessor::reset ( void  ) [virtual]

Implements FWItemAccessorBase.

Definition at line 89 of file FWItemTVirtualCollectionProxyAccessor.cc.

References m_colProxy, and m_data.

Referenced by setData().

{
   if (0 != m_data)
   {
      m_data=0;
      m_colProxy->PopProxy();
   }
}
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, reset(), and edm::ObjectWithDict::typeOf().

{
   if (product.address() == 0)
   {
      reset();
      return;
   }

   if(product.typeOf().isTypedef())
      m_data = edm::ObjectWithDict(product.typeOf().toType(),product.address()).address();
   else
      m_data = product.address();

   assert(0!=m_data);
   m_colProxy->PushProxy(static_cast<char*>(const_cast<void*>(m_data))+m_offset);
}
unsigned int FWItemTVirtualCollectionProxyAccessor::size ( void  ) const [virtual]

Implements FWItemAccessorBase.

Definition at line 115 of file FWItemTVirtualCollectionProxyAccessor.cc.

References m_colProxy, and m_data.

{
   if(m_data==0) {
      return 0;
   }
   return m_colProxy->Size();
}
const TClass * FWItemTVirtualCollectionProxyAccessor::type ( ) const [virtual]

Implements FWItemAccessorBase.

Definition at line 130 of file FWItemTVirtualCollectionProxyAccessor.cc.

References m_type.

{
   return m_type;
}

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 [mutable, private]

Definition at line 62 of file FWItemTVirtualCollectionProxyAccessor.h.

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

Definition at line 63 of file FWItemTVirtualCollectionProxyAccessor.h.

Referenced by setData().

Definition at line 60 of file FWItemTVirtualCollectionProxyAccessor.h.

Referenced by type().