CMS 3D CMS Logo

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::FWSimpleProxyHelper ( const std::type_info &  iType)

Definition at line 36 of file FWSimpleProxyHelper.cc.

36 : m_itemType(&iType), m_objectOffset(0) {}

Member Function Documentation

◆ itemChanged()

void FWSimpleProxyHelper::itemChanged ( const FWEventItem iItem)

Definition at line 62 of file FWSimpleProxyHelper.cc.

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 }

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

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

◆ offsetObject()

const void* FWSimpleProxyHelper::offsetObject ( const void *  iObj) const
inline

Member Data Documentation

◆ m_itemType

const std::type_info* FWSimpleProxyHelper::m_itemType
private

Definition at line 49 of file FWSimpleProxyHelper.h.

Referenced by itemChanged().

◆ m_objectOffset

unsigned int FWSimpleProxyHelper::m_objectOffset
private

Definition at line 50 of file FWSimpleProxyHelper.h.

Referenced by itemChanged(), and offsetObject().

FWSimpleProxyHelper::m_objectOffset
unsigned int m_objectOffset
Definition: FWSimpleProxyHelper.h:50
FWEventItem::modelType
const TClass * modelType() const
Definition: FWEventItem.cc:464
edm::TypeWithDict
Definition: TypeWithDict.h:38
FWSimpleProxyHelper::m_itemType
const std::type_info * m_itemType
Definition: FWSimpleProxyHelper.h:49