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
public
:
35
FWModelChangeManager
();
36
virtual
~FWModelChangeManager
();
37
38
// ---------- const member functions ---------------------
39
40
// ---------- static member functions --------------------
41
42
// ---------- member functions ---------------------------
43
44
void
beginChanges
();
45
void
changed
(
const
FWModelId
&);
46
void
changed
(
const
FWEventItem
*);
47
void
endChanges
();
48
49
sigc::signal<void()>
changeSignalsAreComing_
;
50
sigc::signal<void()>
changeSignalsAreDone_
;
51
52
void
newItemSlot
(
FWEventItem
*);
53
void
itemsGoingToBeClearedSlot
(
void
);
54
55
FWModelChangeManager
(
const
FWModelChangeManager
&) =
delete
;
// stop default
56
57
const
FWModelChangeManager
&
operator=
(
const
FWModelChangeManager
&) =
delete
;
// stop default
58
59
private
:
60
// ---------- member data --------------------------------
61
unsigned
int
m_depth
;
62
std::vector<FWModelIds>
m_changes
;
63
std::set<const FWEventItem*>
m_itemChanges
;
64
std::vector<FWModelChangeSignal>
m_changeSignals
;
65
std::vector<FWItemChangeSignal>
m_itemChangeSignals
;
66
};
67
68
class
FWChangeSentry
{
69
public
:
70
FWChangeSentry
(
FWModelChangeManager
& iM) :
m_manager
(&iM) {
m_manager
->
beginChanges
(); }
71
~FWChangeSentry
() {
m_manager
->
endChanges
(); }
72
73
private
:
74
FWModelChangeManager
*
m_manager
;
75
};
76
77
#endif
FWModelChangeSignal.h
FWModelChangeManager::FWModelChangeManager
FWModelChangeManager()
Definition:
FWModelChangeManager.cc:35
FWModelChangeManager::m_changeSignals
std::vector< FWModelChangeSignal > m_changeSignals
Definition:
FWModelChangeManager.h:64
FWModelChangeManager::itemsGoingToBeClearedSlot
void itemsGoingToBeClearedSlot(void)
Definition:
FWModelChangeManager.cc:160
FWModelChangeManager::m_changes
std::vector< FWModelIds > m_changes
Definition:
FWModelChangeManager.h:62
FWModelId
Definition:
FWModelId.h:28
FWModelChangeManager::m_itemChanges
std::set< const FWEventItem * > m_itemChanges
Definition:
FWModelChangeManager.h:63
FWModelChangeManager::newItemSlot
void newItemSlot(FWEventItem *)
Definition:
FWModelChangeManager.cc:145
FWModelChangeManager::beginChanges
void beginChanges()
Definition:
FWModelChangeManager.cc:59
FWChangeSentry::~FWChangeSentry
~FWChangeSentry()
Definition:
FWModelChangeManager.h:71
FWModelId.h
FWModelChangeManager::changeSignalsAreDone_
sigc::signal< void()> changeSignalsAreDone_
Definition:
FWModelChangeManager.h:50
FWModelChangeManager::m_depth
unsigned int m_depth
Definition:
FWModelChangeManager.h:61
FWChangeSentry::m_manager
FWModelChangeManager * m_manager
Definition:
FWModelChangeManager.h:74
FWEventItem
Definition:
FWEventItem.h:56
FWModelChangeManager::changed
void changed(const FWModelId &)
Definition:
FWModelChangeManager.cc:61
FWModelChangeManager::endChanges
void endChanges()
Definition:
FWModelChangeManager.cc:83
FWModelChangeManager
Definition:
FWModelChangeManager.h:33
FWModelChangeManager::m_itemChangeSignals
std::vector< FWItemChangeSignal > m_itemChangeSignals
Definition:
FWModelChangeManager.h:65
FWItemChangeSignal.h
FWModelChangeManager::operator=
const FWModelChangeManager & operator=(const FWModelChangeManager &)=delete
FWModelChangeManager::~FWModelChangeManager
virtual ~FWModelChangeManager()
Definition:
FWModelChangeManager.cc:42
FWModelChangeManager::changeSignalsAreComing_
sigc::signal< void()> changeSignalsAreComing_
Definition:
FWModelChangeManager.h:49
FWChangeSentry::FWChangeSentry
FWChangeSentry(FWModelChangeManager &iM)
Definition:
FWModelChangeManager.h:70
FWChangeSentry
Definition:
FWModelChangeManager.h:68
Generated for CMSSW Reference Manual by
1.8.14