Fireworks
Core
interface
FWProxyBuilderTemplate.h
Go to the documentation of this file.
1
#ifndef Fireworks_Core_FWProxyBuilderTemplate_h
2
#define Fireworks_Core_FWProxyBuilderTemplate_h
3
// -*- C++ -*-
4
//
5
// Package: Core
6
// Class : FWProxyBuilderTemplate
7
//
16
//
17
// Original Author: Matevz Tadel
18
// Created: April 23 2010
19
//
20
21
// system include files
22
#include <typeinfo>
23
24
// user include files
25
#include "
Fireworks/Core/interface/FWProxyBuilderBase.h
"
26
#include "
Fireworks/Core/interface/FWSimpleProxyHelper.h
"
27
#include "
Fireworks/Core/interface/FWEventItem.h
"
28
29
template
<
typename
T>
30
class
FWProxyBuilderTemplate
:
public
FWProxyBuilderBase
{
31
public
:
32
FWProxyBuilderTemplate
() :
m_helper
(typeid(
T
)) {}
33
~FWProxyBuilderTemplate
()
override
{}
34
35
// ---------- const member functions ---------------------
36
37
// ---------- static member functions --------------------
38
39
// ---------- member functions ---------------------------
40
41
protected
:
42
const
T
&
modelData
(
int
index
) {
return
*reinterpret_cast<const T*>(
m_helper
.
offsetObject
(
item
()->
modelData
(
index
))); }
43
44
private
:
45
FWProxyBuilderTemplate
(
const
FWProxyBuilderTemplate
&) =
delete
;
// stop default
46
47
const
FWProxyBuilderTemplate
&
operator=
(
const
FWProxyBuilderTemplate
&) =
delete
;
// stop default
48
49
virtual
void
itemChangedImp
(
const
FWEventItem
* iItem) {
50
if
(iItem)
51
m_helper
.
itemChanged
(iItem);
52
}
53
54
// ---------- member data --------------------------------
55
FWSimpleProxyHelper
m_helper
;
56
};
57
58
#endif
FWProxyBuilderTemplate::operator=
const FWProxyBuilderTemplate & operator=(const FWProxyBuilderTemplate &)=delete
FWSimpleProxyHelper::itemChanged
void itemChanged(const FWEventItem *)
Definition:
FWSimpleProxyHelper.cc:62
FWProxyBuilderBase.h
FWProxyBuilderTemplate
Definition:
FWProxyBuilderTemplate.h:30
FWSimpleProxyHelper::offsetObject
const void * offsetObject(const void *iObj) const
Definition:
FWSimpleProxyHelper.h:36
FWEventItem.h
FWProxyBuilderTemplate::~FWProxyBuilderTemplate
~FWProxyBuilderTemplate() override
Definition:
FWProxyBuilderTemplate.h:33
FWSimpleProxyHelper.h
FWProxyBuilderBase::item
const FWEventItem * item() const
Definition:
FWProxyBuilderBase.h:64
FWEventItem
Definition:
FWEventItem.h:56
FWProxyBuilderTemplate::FWProxyBuilderTemplate
FWProxyBuilderTemplate()
Definition:
FWProxyBuilderTemplate.h:32
FWProxyBuilderTemplate::modelData
const T & modelData(int index)
Definition:
FWProxyBuilderTemplate.h:42
T
long double T
Definition:
Basic3DVectorLD.h:48
FWProxyBuilderBase
Definition:
FWProxyBuilderBase.h:46
AlignmentPI::index
index
Definition:
AlignmentPayloadInspectorHelper.h:46
FWProxyBuilderTemplate::m_helper
FWSimpleProxyHelper m_helper
Definition:
FWProxyBuilderTemplate.h:55
FWSimpleProxyHelper
Definition:
FWSimpleProxyHelper.h:30
FWProxyBuilderTemplate::itemChangedImp
virtual void itemChangedImp(const FWEventItem *iItem)
Definition:
FWProxyBuilderTemplate.h:49
Generated for CMSSW Reference Manual by
1.8.16