4 #ifndef __KVNAMEVALUELIST_H
5 #define __KVNAMEVALUELIST_H
7 #include "KVHashList.h"
10 #include "KVNamedParameter.h"
232 template<
typename value_type>
246 template <
typename value_type>
265 template <
typename value_type>
284 template <
typename value_type>
303 template <
typename value_type>
313 template <
typename value_type>
320 return (*par) == tmp;
329 template <
typename value_type>
335 return (
p &&
p->Is<value_type>());
345 return HasParameter<int>(
name);
349 return HasParameter<bool>(
name);
359 return HasParameter<double>(
name);
363 return HasParameter<TString>(
name);
387 template <
typename value_type>
395 return (par ? par->
Get<value_type>() : KVNamedParameter::DefaultValue<value_type>());
400 return GetValue<int>(
name);
404 return GetValue<bool>(
name);
408 return GetValue<double>(
name);
412 return GetValue<cstring>(
name);
416 template <
typename value_type>
423 return (par ? par->
Get<value_type>() : KVNamedParameter::DefaultValue<value_type>());
428 return GetValue<int>(idx);
432 return GetValue<bool>(idx);
436 return GetValue<double>(idx);
440 return GetValue<cstring>(idx);
#define ClassDef(name, id)
#define ClassDefOverride(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
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.
KVNamedParameter * GetParameter(Int_t idx) const
return the parameter object with index idx
void Copy(TObject &nvl) const override
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)
std::unique_ptr< KVEnv > ProduceEnvFile()
Put all name-value pairs in this list as a TEnv format.
Bool_t HasNumericParameter(const Char_t *name) const
void RemoveParameter(const Char_t *name)
void SetValue64bit(const Char_t *name, ULong64_t)
void SetFromEnv(TEnv *tenv, const TString &prefix="")
void IncrementValue(const Char_t *name, value_type value)
const Char_t * GetNameAt(Int_t idx) const
void ls(Option_t *opt="") const override
Int_t GetNpar() const
return the number of stored parameters
Bool_t HasStringParameter(const Char_t *name) const
void ReadEnv(const TEnv &)
virtual void ClearSelection(const TRegexp &)
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
TString List(Option_t *opt="") const
void SetValueAt(const Char_t *name, value_type value, Int_t idx)
void Concatenate(const KVNameValueList &nvl)
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 &)
KVNamedParameter * FindParameter(const Char_t *name) const
return the parameter object with the asking name
Int_t Compare(const TObject *nvl) const override
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 Clear(Option_t *opt="") override
Bool_t GetBoolValue(Int_t idx) const
Double_t GetDoubleValue(Int_t idx) const
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 Print(Option_t *opt="") const override
void AddValue(const KVNamedParameter &p)
void SetIgnoreBool(Bool_t ignore=kTRUE)
KVHashList * GetList() const
TString GetTStringValue(const Char_t *name) const
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)
TObject * First() const override
void Add(TObject *obj) override
void AddLast(TObject *obj) override
TObject * Last() const override
TSeqCollection * GetCollection() const
void AddAt(TObject *obj, Int_t idx) override
void AddFirst(TObject *obj) override
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