CMS 3D CMS Logo

FWEnumParameter.h
Go to the documentation of this file.
1 #ifndef Fireworks_Core_FWEnumParameter_h
2 #define Fireworks_Core_FWEnumParameter_h
3 // -*- C++ -*-
4 //
5 // Package: Core
6 // Class : FWEnumParameter
7 //
16 //
17 // Original Author: matevz
18 // Created: Fri Apr 30 15:16:55 CEST 2010
19 //
20 
21 // system include files
22 
23 // user include files
25 #include "RtypesCore.h"
26 #include <map>
27 
28 // forward declarations
29 
31 public:
33 
35  FWParameterizable* iParent, const std::string& iName, const long& iDefault = 0, long iMin = -1, long iMax = -1)
36  : FWLongParameter(iParent, iName, iDefault, iMin, iMax) {}
37 
38  template <class K>
40  const std::string& iName,
41  K iCallback,
42  const long& iDefault = 0,
43  long iMin = -1,
44  long iMax = -1)
45  : FWLongParameter(iParent, iName, iCallback, iDefault, iMin, iMax) {}
46 
47  // ---------- const member functions ---------------------
48 
49  // ---------- static member functions --------------------
50 
51  // ---------- member functions ---------------------------
52 
53  bool addEntry(Long_t id, const std::string& txt) { return m_enumEntries.insert(std::make_pair(id, txt)).second; }
54 
55  const std::map<Long_t, std::string>& entryMap() const { return m_enumEntries; }
56 
57 private:
58  FWEnumParameter(const FWEnumParameter&) = delete; // stop default
59  const FWEnumParameter& operator=(const FWEnumParameter&) = delete; // stop default
60 
61  // ---------- member data --------------------------------
62  std::map<Long_t, std::string> m_enumEntries;
63 };
64 
65 #endif
const std::map< Long_t, std::string > & entryMap() const
FWEnumParameter(FWParameterizable *iParent, const std::string &iName, const long &iDefault=0, long iMin=-1, long iMax=-1)
bool addEntry(Long_t id, const std::string &txt)
FWEnumParameter(FWParameterizable *iParent, const std::string &iName, K iCallback, const long &iDefault=0, long iMin=-1, long iMax=-1)
std::map< Long_t, std::string > m_enumEntries
const FWEnumParameter & operator=(const FWEnumParameter &)=delete