CMS 3D CMS Logo

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
29 
30 // forward declarations
31 class FWEventItem;
32 
34 {
35 
36 public:
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&); // stop default
59 
60  const FWModelChangeManager& operator=(const FWModelChangeManager&); // 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 
71 public:
73  m_manager(&iM)
74  {
75  m_manager->beginChanges();
76  }
78  {
79  m_manager->endChanges();
80  }
81 private:
83 };
84 
85 #endif
std::vector< FWModelChangeSignal > m_changeSignals
std::vector< FWModelIds > m_changes
std::set< const FWEventItem * > m_itemChanges
void newItemSlot(FWEventItem *)
FWModelChangeManager * m_manager
sigc::signal< void > changeSignalsAreDone_
void changed(const FWModelId &)
std::vector< FWItemChangeSignal > m_itemChangeSignals
sigc::signal< void > changeSignalsAreComing_
FWChangeSentry(FWModelChangeManager &iM)
const FWModelChangeManager & operator=(const FWModelChangeManager &)