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 
29 
31 public:
32  FWItemValueGetter(const edm::TypeWithDict&, const std::string& iPurpose);
33  double valueFor(const void*, int idx) const;
34  UInt_t precision(int idx) const;
35  std::vector<std::string> getTitles() const;
36  int numValues() const;
37 
38  const std::string& getToolTip(const void* iObject) const;
39 
40 private:
41  struct Entry {
46  UInt_t m_precision;
47 
48  Entry(reco::parser::ExpressionPtr iExpr, std::string iExpression, std::string iUnit, std::string iTitle, int iPrec)
49  : m_expr(iExpr), m_expression(iExpression), m_unit(iUnit), m_title(iTitle), m_precision(iPrec) {}
50  };
51 
52  bool addEntry(std::string iExpression, int iPrec = 2, std::string iTitle = "", std::string iUnit = "");
53 
54  typedef std::vector<Entry> Entries_t;
55  Entries_t::const_iterator Entries_i;
56 
59 
61 };
62 
63 #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)
UInt_t precision(int idx) const
std::vector< std::string > getTitles() const
const std::string & getToolTip(const void *iObject) const
edm::TypeWithDict m_type
std::vector< Entry > Entries_t
reco::parser::ExpressionPtr m_expr
double valueFor(const void *, int idx) const