4#ifndef __KVNAMEDPARAMETER_H
5#define __KVNAMEDPARAMETER_H
11typedef 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>
203template<>
inline int KVNamedParameter::Get<int>()
const
207template<>
inline double KVNamedParameter::Get<double>()
const
211template<>
inline bool KVNamedParameter::Get<bool>()
const
215template<>
inline KVString KVNamedParameter::Get<KVString>()
const
219template<>
inline TString KVNamedParameter::Get<TString>()
const
223template<>
inline cstring KVNamedParameter::Get<cstring>()
const
227template<>
inline std::string KVNamedParameter::Get<std::string>()
const
229 return std::string(GetString());
231template<>
inline int KVNamedParameter::DefaultValue<int>()
235template<>
inline double KVNamedParameter::DefaultValue<double>()
239template<>
inline bool KVNamedParameter::DefaultValue<bool>()
243template<>
inline TString KVNamedParameter::DefaultValue<TString>()
247template<>
inline KVString KVNamedParameter::DefaultValue<KVString>()
251template<>
inline cstring KVNamedParameter::DefaultValue<cstring>()
255template<>
inline std::string KVNamedParameter::DefaultValue<std::string>()
#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
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