CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 36 of file FWSimpleProxyHelper.cc.

36 : m_itemType(&iType), m_objectOffset(0) {}
const std::type_info * m_itemType

Member Function Documentation

void FWSimpleProxyHelper::itemChanged ( const FWEventItem iItem)

Definition at line 62 of file FWSimpleProxyHelper.cc.

References edm::TypeWithDict::getBaseClassOffset(), m_itemType, m_objectOffset, and FWEventItem::modelType().

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

62  {
63  if (nullptr != iItem) {
64  edm::TypeWithDict baseType(*m_itemType);
65  edm::TypeWithDict mostDerivedType(*(iItem->modelType()->GetTypeInfo()));
66  // The - sign is there because this is the address of a derived object minus the address of the base object.
67  m_objectOffset = -mostDerivedType.getBaseClassOffset(baseType);
68  }
69 }
const TClass * modelType() const
Definition: FWEventItem.cc:464
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 49 of file FWSimpleProxyHelper.h.

Referenced by itemChanged().

unsigned int FWSimpleProxyHelper::m_objectOffset
private

Definition at line 50 of file FWSimpleProxyHelper.h.

Referenced by itemChanged(), and offsetObject().