4 #ifndef __KVNAMEVALUELIST_H
5 #define __KVNAMEVALUELIST_H
231 template<
typename value_type>
245 template <
typename value_type>
264 template <
typename value_type>
283 template <
typename value_type>
302 template <
typename value_type>
312 template <
typename value_type>
319 return (*par) == tmp;
328 template <
typename value_type>
334 return (p && p->
Is<value_type>());
344 return HasParameter<int>(name);
348 return HasParameter<bool>(name);
358 return HasParameter<double>(name);
362 return HasParameter<TString>(name);
386 template <
typename value_type>
394 return (par ? par->
Get<value_type>() : KVNamedParameter::DefaultValue<value_type>());
399 return GetValue<int>(name);
403 return GetValue<bool>(name);
407 return GetValue<double>(name);
411 return GetValue<cstring>(name);
415 template <
typename value_type>
422 return (par ? par->
Get<value_type>() : KVNamedParameter::DefaultValue<value_type>());
427 return GetValue<int>(idx);
431 return GetValue<bool>(idx);
435 return GetValue<double>(idx);
439 return GetValue<cstring>(idx);
#define ClassDef(name, id)
Extension of TEnv to allow the writing of comments in the file.
Extended version of ROOT THashList.
void Sort(Bool_t order=kSortAscending)
std::forward_iterator_tag iterator_category
KVNamedParameter * pointer
Iterator(const Iterator &other)
KVNamedParameter & operator*() const
KVNamedParameter & reference
Iterator(const KVNameValueList *N)
Iterator(const KVNameValueList &N)
Bool_t operator==(const Iterator &it) const
Bool_t operator!=(const Iterator &it) const
const Iterator & operator++()
KVNamedParameter * current() const
Iterator & operator=(const Iterator &rhs)
std::ptrdiff_t difference_type
KVNamedParameter value_type
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
virtual void Print(Option_t *opt="") const
KVNamedParameter * GetParameter(Int_t idx) const
return the parameter object with index idx
virtual void ls(Option_t *opt="") const
Int_t GetIntValue(const Char_t *name) const
Double_t GetDoubleValue(const Char_t *name) const
Bool_t HasValue64bit(const Char_t *name) const
void SetValue(const Char_t *name, value_type value)
virtual ~KVNameValueList()
Destructor.
Bool_t fIgnoreBool
do not convert "yes", "false", "on", etc. in TEnv file to boolean
Bool_t HasNumericParameter(const Char_t *name) const
void RemoveParameter(const Char_t *name)
Int_t Compare(const TObject *nvl) const
void SetValue64bit(const Char_t *name, ULong64_t)
void SetFromEnv(TEnv *tenv, const TString &prefix="")
void IncrementValue(const Char_t *name, value_type value)
virtual void Clear(Option_t *opt="")
const Char_t * GetNameAt(Int_t idx) const
Int_t GetNpar() const
return the number of stored parameters
Bool_t HasStringParameter(const Char_t *name) const
void SetFirstValue(const Char_t *name, value_type value)
virtual void ReadEnvFile(const Char_t *filename)
Bool_t IsValue(const Char_t *name, value_type value) const
void SetValueAt(const Char_t *name, value_type value, Int_t idx)
virtual void WriteEnvFile(const Char_t *filename)
Write all name-value pairs in this list as a TEnv format file.
Int_t GetNameIndex(const Char_t *name) const
void Merge(const KVNameValueList &)
KVNameValueList()
Default constructor.
KVNamedParameter * FindParameter(const Char_t *name) const
return the parameter object with the asking name
KVNameValueList operator+=(const KVNameValueList &nvl)
KVNameValueList & operator=(const KVNameValueList &)
KVHashList fList
list of KVNamedParameter objects
Bool_t HasIntParameter(const Char_t *name) const
void Sort(Bool_t order=kSortAscending)
value_type GetValue(Int_t idx) const
void SetOwner(Bool_t enable=kTRUE)
Bool_t GetBoolValue(Int_t idx) const
Double_t GetDoubleValue(Int_t idx) const
virtual KVEnv * ProduceEnvFile()
void WriteClass(const Char_t *classname, const Char_t *classdesc, const Char_t *base_class="")
Bool_t HasBoolParameter(const Char_t *name) const
Bool_t GetBoolValue(const Char_t *name) const
ULong64_t GetValue64bit(const Char_t *name) const
value_type GetValue(const Char_t *name) const
const Char_t * GetStringValue(Int_t idx) const
Int_t GetIntValue(Int_t idx) const
const Char_t * GetStringValue(const Char_t *name) const
Bool_t HasParameter(const Char_t *name) const
void SetLastValue(const Char_t *name, value_type value)
bool Set(const KVString &)
Bool_t HasDoubleParameter(const Char_t *name) const
Bool_t HasParameter(const Char_t *name) const
void AddValue(const KVNamedParameter &p)
void SetIgnoreBool(Bool_t ignore=kTRUE)
KVHashList * GetList() const
TString GetTStringValue(const Char_t *name) const
void Copy(TObject &nvl) const
virtual void ClearSelection(TRegexp &)
void WriteToEnv(TEnv *tenv, const TString &prefix="")
A generic named parameter storing values of different types.
void Set(const char *, const char *)
void Add(const KVNamedParameter &p)
virtual void AddLast(TObject *obj)
virtual TObject * Last() const
virtual TObject * First() const
TSeqCollection * GetCollection() const
virtual void Add(TObject *obj)
virtual void AddAt(TObject *obj, Int_t idx)
virtual void AddFirst(TObject *obj)
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
virtual TObject * Remove(TObject *obj)=0
virtual Int_t IndexOf(const TObject *obj) const
unsigned long long ULong64_t