Fireworks
Core
src
FWSimpleProxyHelper.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
//
3
// Package: Core
4
// Class : FWSimpleProxyHelper
5
//
6
// Implementation:
7
// <Notes on implementation>
8
//
9
// Original Author: Chris Jones
10
// Created: Tue Dec 2 15:13:22 EST 2008
11
//
12
13
// system include files
14
#include <sstream>
15
#include <cassert>
16
17
#include "
FWCore/Reflection/interface/ObjectWithDict.h
"
18
#include "
FWCore/Reflection/interface/TypeWithDict.h
"
19
#include "TClass.h"
20
21
// user include files
22
#include "
Fireworks/Core/interface/FWSimpleProxyHelper.h
"
23
#include "
Fireworks/Core/interface/FWEventItem.h
"
24
25
//
26
// constants, enums and typedefs
27
//
28
29
//
30
// static data member definitions
31
//
32
33
//
34
// constructors and destructor
35
//
36
FWSimpleProxyHelper::FWSimpleProxyHelper
(
const
std::type_info& iType) : m_itemType(&iType), m_objectOffset(0) {}
37
38
// FWSimpleProxyHelper::FWSimpleProxyHelper(const FWSimpleProxyHelper& rhs)
39
// {
40
// // do actual copying here;
41
// }
42
43
//FWSimpleProxyHelper::~FWSimpleProxyHelper()
44
//{
45
//}
46
47
//
48
// assignment operators
49
//
50
// const FWSimpleProxyHelper& FWSimpleProxyHelper::operator=(const FWSimpleProxyHelper& rhs)
51
// {
52
// //An exception safe implementation is
53
// FWSimpleProxyHelper temp(rhs);
54
// swap(rhs);
55
//
56
// return *this;
57
// }
58
59
//
60
// member functions
61
//
62
void
FWSimpleProxyHelper::itemChanged
(
const
FWEventItem
* iItem) {
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
}
70
71
//
72
// static member functions
73
//
FWSimpleProxyHelper::m_objectOffset
unsigned int m_objectOffset
Definition:
FWSimpleProxyHelper.h:50
FWSimpleProxyHelper::itemChanged
void itemChanged(const FWEventItem *)
Definition:
FWSimpleProxyHelper.cc:62
edm::TypeWithDict::getBaseClassOffset
int getBaseClassOffset(TypeWithDict const &baseClass) const
Definition:
TypeWithDict.cc:761
TypeWithDict.h
ObjectWithDict.h
FWEventItem::modelType
const TClass * modelType() const
Definition:
FWEventItem.cc:464
edm::TypeWithDict
Definition:
TypeWithDict.h:38
FWSimpleProxyHelper::FWSimpleProxyHelper
FWSimpleProxyHelper(const std::type_info &)
Definition:
FWSimpleProxyHelper.cc:36
FWEventItem.h
FWSimpleProxyHelper.h
FWEventItem
Definition:
FWEventItem.h:56
FWSimpleProxyHelper::m_itemType
const std::type_info * m_itemType
Definition:
FWSimpleProxyHelper.h:49
Generated for CMSSW Reference Manual by
1.8.16