Main Page
Namespaces
Classes
Package Documentation
src
Fireworks
Core
interface
FWModelChangeManager.h
Go to the documentation of this file.
1
#ifndef Fireworks_Core_FWModelChangeManager_h
2
#define Fireworks_Core_FWModelChangeManager_h
3
// -*- C++ -*-
4
//
5
// Package: Core
6
// Class : FWModelChangeManager
7
//
16
//
17
// Original Author: Chris Jones
18
// Created: Thu Jan 17 17:37:49 EST 2008
19
//
20
21
// system include files
22
#include "sigc++/signal.h"
23
#include <set>
24
25
// user include files
26
#include "
Fireworks/Core/interface/FWModelId.h
"
27
#include "
Fireworks/Core/interface/FWModelChangeSignal.h
"
28
#include "
Fireworks/Core/interface/FWItemChangeSignal.h
"
29
30
// forward declarations
31
class
FWEventItem
;
32
33
class
FWModelChangeManager
34
{
35
36
public
:
37
FWModelChangeManager
();
38
virtual
~FWModelChangeManager
();
39
40
// ---------- const member functions ---------------------
41
42
// ---------- static member functions --------------------
43
44
// ---------- member functions ---------------------------
45
46
void
beginChanges
();
47
void
changed
(
const
FWModelId
&);
48
void
changed
(
const
FWEventItem
*);
49
void
endChanges
();
50
51
sigc::signal<void>
changeSignalsAreComing_
;
52
sigc::signal<void>
changeSignalsAreDone_
;
53
54
void
newItemSlot
(
FWEventItem
*);
55
void
itemsGoingToBeClearedSlot
(
void
);
56
57
private
:
58
FWModelChangeManager
(
const
FWModelChangeManager
&) =
delete
;
// stop default
59
60
const
FWModelChangeManager
&
operator=
(
const
FWModelChangeManager
&) =
delete
;
// stop default
61
62
// ---------- member data --------------------------------
63
unsigned
int
m_depth
;
64
std::vector<FWModelIds>
m_changes
;
65
std::set<const FWEventItem*>
m_itemChanges
;
66
std::vector<FWModelChangeSignal>
m_changeSignals
;
67
std::vector<FWItemChangeSignal>
m_itemChangeSignals
;
68
};
69
70
class
FWChangeSentry
{
71
public
:
72
FWChangeSentry
(
FWModelChangeManager
& iM) :
73
m_manager(&iM)
74
{
75
m_manager->beginChanges();
76
}
77
~FWChangeSentry
()
78
{
79
m_manager->endChanges();
80
}
81
private
:
82
FWModelChangeManager
*
m_manager
;
83
};
84
85
#endif
FWModelChangeSignal.h
FWModelChangeManager::FWModelChangeManager
FWModelChangeManager()
Definition:
FWModelChangeManager.cc:36
FWModelChangeManager::m_changeSignals
std::vector< FWModelChangeSignal > m_changeSignals
Definition:
FWModelChangeManager.h:66
FWModelChangeManager::itemsGoingToBeClearedSlot
void itemsGoingToBeClearedSlot(void)
Definition:
FWModelChangeManager.cc:201
FWModelChangeManager::m_changes
std::vector< FWModelIds > m_changes
Definition:
FWModelChangeManager.h:64
FWModelId
Definition:
FWModelId.h:28
FWModelChangeManager::m_itemChanges
std::set< const FWEventItem * > m_itemChanges
Definition:
FWModelChangeManager.h:65
FWModelChangeManager::newItemSlot
void newItemSlot(FWEventItem *)
Definition:
FWModelChangeManager.cc:184
FWModelChangeManager::beginChanges
void beginChanges()
Definition:
FWModelChangeManager.cc:66
FWChangeSentry::~FWChangeSentry
~FWChangeSentry()
Definition:
FWModelChangeManager.h:77
FWModelId.h
FWModelChangeManager::m_depth
unsigned int m_depth
Definition:
FWModelChangeManager.h:63
FWChangeSentry::m_manager
FWModelChangeManager * m_manager
Definition:
FWModelChangeManager.h:82
FWEventItem
Definition:
FWEventItem.h:56
FWModelChangeManager::changeSignalsAreDone_
sigc::signal< void > changeSignalsAreDone_
Definition:
FWModelChangeManager.h:52
FWModelChangeManager::changed
void changed(const FWModelId &)
Definition:
FWModelChangeManager.cc:72
FWModelChangeManager::endChanges
void endChanges()
Definition:
FWModelChangeManager.cc:100
FWModelChangeManager
Definition:
FWModelChangeManager.h:33
FWModelChangeManager::m_itemChangeSignals
std::vector< FWItemChangeSignal > m_itemChangeSignals
Definition:
FWModelChangeManager.h:67
FWItemChangeSignal.h
FWModelChangeManager::operator=
const FWModelChangeManager & operator=(const FWModelChangeManager &)=delete
FWModelChangeManager::changeSignalsAreComing_
sigc::signal< void > changeSignalsAreComing_
Definition:
FWModelChangeManager.h:51
FWModelChangeManager::~FWModelChangeManager
virtual ~FWModelChangeManager()
Definition:
FWModelChangeManager.cc:46
FWChangeSentry::FWChangeSentry
FWChangeSentry(FWModelChangeManager &iM)
Definition:
FWModelChangeManager.h:72
FWChangeSentry
Definition:
FWModelChangeManager.h:70
Generated for CMSSW Reference Manual by
1.8.11