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 30 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 edm::TypeWithDict::getBaseClassOffset(), m_itemType, m_objectOffset, and FWEventItem::modelType().

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

69 {
70  if(0!=iItem) {
71  edm::TypeWithDict baseType(*m_itemType);
72  edm::TypeWithDict mostDerivedType(*(iItem->modelType()->GetTypeInfo()));
73  // The - sign is there because this is the address of a derived object minus the address of the base object.
74  m_objectOffset = -mostDerivedType.getBaseClassOffset(baseType);
75  }
76 }
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 51 of file FWSimpleProxyHelper.h.

Referenced by itemChanged().

unsigned int FWSimpleProxyHelper::m_objectOffset
private

Definition at line 52 of file FWSimpleProxyHelper.h.

Referenced by itemChanged(), and offsetObject().