#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 38 of file FWSimpleProxyHelper.cc.
: m_itemType(&iType), m_objectOffset(0) { }
void FWSimpleProxyHelper::itemChanged | ( | const FWEventItem * | iItem | ) |
Definition at line 69 of file FWSimpleProxyHelper.cc.
References edm::ObjectWithDict::address(), edm::ObjectWithDict::castObject(), m_itemType, m_objectOffset, and FWEventItem::modelType().
Referenced by FWDetailViewBase::build(), FWSimpleProxyBuilder::itemChangedImp(), and FWProxyBuilderTemplate< EcalRecHit >::itemChangedImp().
{ if(0!=iItem) { edm::TypeWithDict myType(*m_itemType); edm::ObjectWithDict dummy(edm::TypeWithDict(*(iItem->modelType()->GetTypeInfo())), reinterpret_cast<void*>(0xFFFF)); edm::ObjectWithDict 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().