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 Attributes
FWSimpleProxyHelper Class Reference

#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
 

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.

37  :
38  m_itemType(&iType),
40 {
41 }
const std::type_info * m_itemType

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(), FWProxyBuilderTemplate< EcalRecHit >::itemChangedImp(), and FWSimpleProxyBuilder::itemChangedImp().

69 {
70  if(0!=iItem) {
71  Reflex::Type myType = Reflex::Type::ByTypeInfo(*m_itemType);
72  Reflex::Object dummy(Reflex::Type::ByTypeInfo(*(iItem->modelType()->GetTypeInfo())),
73  reinterpret_cast<void*>(0xFFFF));
74  Reflex::Object castTo = dummy.CastObject(myType);
75  assert(0!=castTo.Address());
76  m_objectOffset=static_cast<char*>(dummy.Address())-static_cast<char*>(castTo.Address());
77  }
78 }
const TClass * modelType() const
Definition: FWEventItem.cc:561
const std::type_info * m_itemType
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().