CMS 3D CMS Logo

Public Member Functions | Private Attributes

FWSimpleProxyHelper Class Reference

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

List of all members.

Public Member Functions

 FWSimpleProxyHelper (const std::type_info &)
void itemChanged (const FWEventItem *)
const void * offsetObject (const void *iObj) const

Private Attributes

const std::type_info * m_itemType
unsigned int m_objectOffset

Detailed Description

Description: Implements some common functionality needed by all Simple ProxyBuilders

Usage: <usage>

Definition at line 31 of file FWSimpleProxyHelper.h.


Constructor & Destructor Documentation

FWSimpleProxyHelper::FWSimpleProxyHelper ( const std::type_info &  iType)

Definition at line 37 of file FWSimpleProxyHelper.cc.

                                                                  :
   m_itemType(&iType),
   m_objectOffset(0)
{
}

Member Function Documentation

void FWSimpleProxyHelper::itemChanged ( const FWEventItem iItem)

Definition at line 68 of file FWSimpleProxyHelper.cc.

References m_itemType, m_objectOffset, and FWEventItem::modelType().

Referenced by FWDetailViewBase::build(), FWSimpleProxyBuilder::itemChangedImp(), and FWProxyBuilderTemplate< EcalRecHit >::itemChangedImp().

{
   if(0!=iItem) {
      using namespace ROOT::Reflex;
      Type myType = Type::ByTypeInfo(*m_itemType);
      Object dummy(Type::ByTypeInfo(*(iItem->modelType()->GetTypeInfo())),
                   reinterpret_cast<void*>(0xFFFF));
      Object castTo = dummy.CastObject(myType);
      assert(0!=castTo.Address());
      m_objectOffset=static_cast<char*>(dummy.Address())-static_cast<char*>(castTo.Address());
   }
}
const void* FWSimpleProxyHelper::offsetObject ( const void *  iObj) const [inline]

Member Data Documentation

const std::type_info* FWSimpleProxyHelper::m_itemType [private]

Definition at line 52 of file FWSimpleProxyHelper.h.

Referenced by itemChanged().

unsigned int FWSimpleProxyHelper::m_objectOffset [private]

Definition at line 53 of file FWSimpleProxyHelper.h.

Referenced by itemChanged(), and offsetObject().