CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FWTableViewManager.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 #ifndef Fireworks_Core_FWTableViewManager_h
3 #define Fireworks_Core_FWTableViewManager_h
4 //
5 // Package: Core
6 // Class : FWTableViewManager
7 //
16 //
17 // Original Author:
18 // Created: Sat Jan 5 10:29:00 EST 2008
19 //
20 
21 // system include files
22 #include <string>
23 #include <vector>
24 #include <set>
25 #include <map>
27 
28 // user include files
29 
33 
34 class FWViewBase;
35 class FWGUIManager;
36 class TEveWindowSlot;
37 
39 {
40  friend class FWTableView;
42 public:
43  struct TableEntry {
44  enum { INT = 0, INT_HEX = -1, BOOL = -2 };
47  int precision;
48  };
49 
51  typedef std::vector<const FWEventItem *> Items;
53  typedef std::vector<TableEntry> TableEntries;
56  typedef std::map<std::string, TableEntries> TableSpecs;
57 
59  virtual ~FWTableViewManager();
60 
61  // ---------- const member functions ---------------------
63  // ---------- static member functions --------------------
64 
65  // ---------- member functions ---------------------------
66  virtual void newItem(const FWEventItem*);
67  void destroyItem(const FWEventItem *item);
68  void removeAllItems(void);
69  FWViewBase * buildView(TEveWindowSlot *iParent, const std::string& type);
70  const Items & items() const { return m_items; }
71  TableSpecs::iterator tableFormats(const edm::TypeWithDict &key);
72  TableSpecs::iterator tableFormats(const TClass &key);
73  void addTo(FWConfiguration&) const;
74  void addToImpl(FWConfiguration&) const;
75  void setFrom(const FWConfiguration&);
76 
77  void notifyViews();
78 
81 
82 protected:
84 
86  virtual void modelChangesComing();
87  virtual void modelChangesDone();
88  virtual void colorsChanged();
89  void dataChanged ();
90 
91  typedef std::vector<boost::shared_ptr<FWTableView> > Views;
92 
96 private:
97  TableSpecs::iterator tableFormatsImpl(const edm::TypeWithDict &key);
98  FWTableViewManager(const FWTableViewManager&); // stop default
99  const FWTableViewManager& operator=(const FWTableViewManager&); // stop default
100 
101  void beingDestroyed(const FWViewBase*);
102 
104  {
105  public:
106  TableHandle &column(const char *formula, int precision, const char *name);
107  TableHandle &column(const char *label, int precision)
108  {
109  return column(label, precision, label);
110  }
111 
112  TableHandle(const char *name, TableSpecs &specs)
113  :m_name(name), m_specs(specs)
114  {
115  m_specs[name].clear();
116  }
117  private:
120  };
121 
122  TableHandle table(const char *collection);
123 };
124 
125 #endif
type
Definition: HCALResponse.h:21
void addToImpl(FWConfiguration &) const
TableHandle table(const char *collection)
TableHandle(const char *name, TableSpecs &specs)
virtual FWTypeToRepresentations supportedTypesAndRepresentations() const
TableHandle & column(const char *label, int precision)
void setFrom(const FWConfiguration &)
virtual void newItem(const FWEventItem *)
TableHandle & column(const char *formula, int precision, const char *name)
const FWTableViewManager & operator=(const FWTableViewManager &)
TableSpecs::iterator tableFormats(const edm::TypeWithDict &key)
const Items & items() const
std::vector< boost::shared_ptr< FWTableView > > Views
TableSpecs::iterator tableFormatsImpl(const edm::TypeWithDict &key)
std::map< std::string, TableEntries > TableSpecs
std::vector< TableEntry > TableEntries
void addTo(FWConfiguration &) const
std::vector< const FWEventItem * > Items
static const std::string kConfigColumns
virtual void modelChangesDone()
virtual void colorsChanged()
void destroyItem(const FWEventItem *item)
virtual void modelChangesComing()
static const std::string kConfigTypeNames
void beingDestroyed(const FWViewBase *)
FWViewBase * buildView(TEveWindowSlot *iParent, const std::string &type)