4 #ifndef __KVNAMEDPARAMETER_H
5 #define __KVNAMEDPARAMETER_H
11 typedef const char* cstring;
100 template <
typename T>
136 void Set(
const char*,
const char*);
141 void Set(
const char*);
154 template <
typename T>
159 a.very_unlikely_method_name();
161 template <
typename T>
165 template <
typename T>
203 template<>
inline int KVNamedParameter::Get<int>()
const
207 template<>
inline double KVNamedParameter::Get<double>()
const
211 template<>
inline bool KVNamedParameter::Get<bool>()
const
215 template<>
inline KVString KVNamedParameter::Get<KVString>()
const
219 template<>
inline TString KVNamedParameter::Get<TString>()
const
223 template<>
inline cstring KVNamedParameter::Get<cstring>()
const
227 template<>
inline std::string KVNamedParameter::Get<std::string>()
const
229 return std::string(GetString());
231 template<>
inline int KVNamedParameter::DefaultValue<int>()
235 template<>
inline double KVNamedParameter::DefaultValue<double>()
239 template<>
inline bool KVNamedParameter::DefaultValue<bool>()
243 template<>
inline TString KVNamedParameter::DefaultValue<TString>()
247 template<>
inline KVString KVNamedParameter::DefaultValue<KVString>()
251 template<>
inline cstring KVNamedParameter::DefaultValue<cstring>()
255 template<>
inline std::string KVNamedParameter::DefaultValue<std::string>()
282 template <
typename T>
#define ClassDef(name, id)
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
A generic named parameter storing values of different types.
Bool_t IsEqual(const TObject *obj) const
Bool_t HasSameValueAs(const KVNamedParameter &) const
const Char_t * GetString() const
KVNamedParameter()
Default constructor.
void Set(const char *, const char *)
virtual void Print(Option_t *opt="") const
void Add(const KVNamedParameter &p)
Bool_t operator==(const KVNamedParameter &) const
const Char_t * GetSQLType() const
Double_t GetDouble() const
virtual void Clear(Option_t *="")
Removes the name and any assigned value.
virtual void ls(Option_t *opt="") const
Int_t Compare(const TObject *obj) const
Compares numerical parameters for sorting lists (such as KVNameValueList)
void WriteToEnv(TEnv *, const TString &p="")
Write parameter in TEnv, using optional prefix p as "p.[name]".
Double_t fNumber
used to store numerical (integer or floating-point) values
TString GetTString() const
virtual ~KVNamedParameter()
Destructor.
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Int_t TestBits(UInt_t f) const