#include <Fireworks/Core/interface/FWSimpleProxyHelper.h>
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 |
Description: Implements some common functionality needed by all Simple ProxyBuilders
Usage: <usage>
Definition at line 31 of file FWSimpleProxyHelper.h.
FWSimpleProxyHelper::FWSimpleProxyHelper | ( | const std::type_info & | iType | ) |
Definition at line 37 of file FWSimpleProxyHelper.cc.
: m_itemType(&iType), m_objectOffset(0) { }
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) { Reflex::Type myType = Reflex::Type::ByTypeInfo(*m_itemType); Reflex::Object dummy(Reflex::Type::ByTypeInfo(*(iItem->modelType()->GetTypeInfo())), reinterpret_cast<void*>(0xFFFF)); Reflex::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] |
Definition at line 38 of file FWSimpleProxyHelper.h.
References m_objectOffset.
Referenced by FWDetailViewBase::build(), FWSimpleProxyBuilder::build(), FWSimpleProxyBuilder::buildViewType(), FWSimpleProxyBuilderTemplate< l1extra::L1JetParticle >::modelData(), FWProxyBuilderTemplate< EcalRecHit >::modelData(), and FWSimpleProxyBuilder::visibilityModelChanges().
{ return static_cast<const char*> (iObj)+m_objectOffset; }
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().