4#ifndef __KVNAMEVALUELIST_H
5#define __KVNAMEVALUELIST_H
10#include "KVNamedParameter.h"
233 template<
typename value_type>
247 template <
typename value_type>
266 template <
typename value_type>
285 template <
typename value_type>
304 template <
typename value_type>
314 template <
typename value_type>
321 return (*par) == tmp;
330 template <
typename value_type>
336 return (
p &&
p->Is<value_type>());
346 return HasParameter<int>(
name);
350 return HasParameter<bool>(
name);
360 return HasParameter<double>(
name);
364 return HasParameter<TString>(
name);
388 template <
typename value_type>
396 return (par ? par->
Get<value_type>() : KVNamedParameter::DefaultValue<value_type>());
401 return GetValue<int>(
name);
405 return GetValue<bool>(
name);
409 return GetValue<double>(
name);
413 return GetValue<cstring>(
name);
417 template <
typename value_type>
424 return (par ? par->
Get<value_type>() : KVNamedParameter::DefaultValue<value_type>());
429 return GetValue<int>(idx);
433 return GetValue<bool>(idx);
437 return GetValue<double>(idx);
441 return GetValue<cstring>(idx);
#define ClassDef(name, id)
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
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
std::ptrdiff_t difference_type
Iterator & operator=(const Iterator &rhs)
KVNamedParameter * current() const
const Iterator & operator++()
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
const Char_t * GetStringValue(Int_t idx) const
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
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)
TSeqCollection * GetCollection() const
virtual TObject * Last() const
virtual TObject * First() 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