CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FWEventItemsManager.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 #ifndef Fireworks_Core_FWEventItemsManager_h
3 #define Fireworks_Core_FWEventItemsManager_h
4 //
5 // Package: Core
6 // Class : FWEventItemsManager
7 //
16 //
17 // Original Author:
18 // Created: Thu Jan 3 13:27:29 EST 2008
19 // $Id: FWEventItemsManager.h,v 1.19 2011/07/30 04:54:27 amraktad Exp $
20 //
21 
22 // system include files
23 #include <vector>
24 #include <boost/shared_ptr.hpp>
25 #include "sigc++/signal.h"
26 
27 // user include files
29 
30 // forward declarations
31 namespace edm {
32  class EventBase;
33 }
34 namespace fireworks {
35  class Context;
36 }
37 
38 class FWEventItem;
41 class FWSelectionManager;
44 
46 {
47 public:
48  //does not take ownership of the object to which it points but does keep reference
50  virtual ~FWEventItemsManager();
51 
52  typedef std::vector<FWEventItem*>::const_iterator const_iterator;
53 
54  //configuration management interface
55  void addTo(FWConfiguration&) const;
56  void setFrom(const FWConfiguration&);
57 
58  // ---------- const member functions ---------------------
60  const_iterator begin() const;
61  const_iterator end() const;
62  // const std::vector<FWEventItem*> &items () const { return m_items; }
63 
64  const FWEventItem* find(const std::string& iName) const;
65  // ---------- static member functions --------------------
66 
67  // ---------- member functions ---------------------------
68  const FWEventItem* add(const FWPhysicsObjectDesc& iItem, const FWConfiguration* pbConf = 0);
69  void clearItems();
70 
71  void newEvent(const edm::EventBase* iEvent);
72 
74 
75  sigc::signal<void, FWEventItem*> newItem_;
76  sigc::signal<void> goingToClearItems_;
77 private:
78 
79  void removeItem(const FWEventItem*);
80  FWEventItemsManager(const FWEventItemsManager&); // stop default
81 
82  const FWEventItemsManager& operator=(const FWEventItemsManager&); // stop default
83 
84  // ---------- member data --------------------------------
85  std::vector<FWEventItem*> m_items;
88 
90  boost::shared_ptr<FWItemAccessorFactory> m_accessorFactory;
91 };
92 
93 
94 #endif
FWModelChangeManager * m_changeManager
void removeItem(const FWEventItem *)
boost::shared_ptr< FWItemAccessorFactory > m_accessorFactory
void setFrom(const FWConfiguration &)
void setContext(fireworks::Context *)
int iEvent
Definition: GenABIO.cc:243
sigc::signal< void, FWEventItem * > newItem_
const FWEventItem * find(const std::string &iName) const
const edm::EventBase * m_event
const_iterator begin() const
NOTE: iterator is allowed to return a null object for items that have been removed.
void newEvent(const edm::EventBase *iEvent)
const FWEventItem * add(const FWPhysicsObjectDesc &iItem, const FWConfiguration *pbConf=0)
const FWEventItemsManager & operator=(const FWEventItemsManager &)
fireworks::Context * m_context
std::vector< FWEventItem * > m_items
void addTo(FWConfiguration &) const
std::vector< FWEventItem * >::const_iterator const_iterator
sigc::signal< void > goingToClearItems_
FWEventItemsManager(FWModelChangeManager *)
const_iterator end() const