CMS 3D CMS Logo

FWItemValueGetter.h
Go to the documentation of this file.
1 #ifndef Fireworks_Core_FWItemValueGetter_h
2 #define Fireworks_Core_FWItemValueGetter_h
3 // -*- C++ -*-
4 //
5 // Package: Core
6 // Class : FWItemValueGetter
7 //
16 //
17 // Original Author: Chris Jones
18 // Created: Sun Nov 30 16:14:58 EST 2008
19 //
20 
21 #include <string>
22 #include <vector>
23 
24 #include "Rtypes.h"
26 
31 
33 public:
34  FWItemValueGetter(const edm::TypeWithDict&, const std::string& iPurpose);
35  double valueFor(const void*, int idx) const;
36  UInt_t precision(int idx) const;
37  std::vector<std::string> getTitles() const;
38  int numValues() const;
39 
40  const std::string& getToolTip(const void* iObject) const;
41 
42 private:
43  struct Entry {
48  UInt_t m_precision;
49 
50  Entry(reco::parser::ExpressionPtr iExpr, std::string iExpression, std::string iUnit, std::string iTitle, int iPrec)
51  : m_expr(iExpr), m_expression(iExpression), m_unit(iUnit), m_title(iTitle), m_precision(iPrec) {}
52  };
53 
54  bool addEntry(std::string iExpression, int iPrec = 2, std::string iTitle = "", std::string iUnit = "");
55 
56  typedef std::vector<Entry> Entries_t;
57  Entries_t::const_iterator Entries_i;
58 
59  Entries_t m_entries;
61 
63 };
64 
65 #endif
Entry(reco::parser::ExpressionPtr iExpr, std::string iExpression, std::string iUnit, std::string iTitle, int iPrec)
Entries_t::const_iterator Entries_i
bool addEntry(std::string iExpression, int iPrec=2, std::string iTitle="", std::string iUnit="")
std::shared_ptr< ExpressionBase > ExpressionPtr
FWItemValueGetter(const edm::TypeWithDict &, const std::string &iPurpose)
edm::TypeWithDict m_type
std::vector< std::string > getTitles() const
std::vector< Entry > Entries_t
double valueFor(const void *, int idx) const
const std::string & getToolTip(const void *iObject) const
reco::parser::ExpressionPtr m_expr
UInt_t precision(int idx) const