MINT2
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
MINT::NamedParameter< T > Class Template Reference

#include <NamedParameter.h>

Inheritance diagram for MINT::NamedParameter< T >:
MINT::NamedParameterBase MINT::INamedParameter

Public Member Functions

 NamedParameter (const std::string &name, NamedParameterBase::VERBOSITY vb)
 
 NamedParameter (const std::string &name, const char *fname=0, NamedParameterBase::VERBOSITY vb=NamedParameterBase::VERBOSE)
 
 NamedParameter (const std::string &name, const T &def, const char *fname=0, NamedParameterBase::VERBOSITY vb=NamedParameterBase::VERBOSE)
 
 NamedParameter (const std::string &name, const T &v0, const T &v1, const char *fname=0, NamedParameterBase::VERBOSITY vb=NamedParameterBase::VERBOSE)
 
 NamedParameter (const std::string &name, const T &v0, const T &v1, const T &v2, const char *fname=0, NamedParameterBase::VERBOSITY vb=NamedParameterBase::VERBOSE)
 
 NamedParameter (const std::string &name, const T &v0, const T &v1, const T &v2, const T &v3, const char *fname=0, NamedParameterBase::VERBOSITY vb=NamedParameterBase::VERBOSE)
 
 NamedParameter (const std::string &name, const T &v0, const T &v1, const T &v2, const T &v3, const T &v4, const char *fname=0, NamedParameterBase::VERBOSITY vb=NamedParameterBase::VERBOSE)
 
 NamedParameter (const std::string &name, const T &v0, const T &v1, const T &v2, const T &v3, const T &v4, const T &v5, const char *fname=0, NamedParameterBase::VERBOSITY vb=NamedParameterBase::VERBOSE)
 
 NamedParameter (const std::string &name, const T &v0, const T &v1, const T &v2, const T &v3, const T &v4, const T &v5, const T &v6, const char *fname=0, NamedParameterBase::VERBOSITY vb=NamedParameterBase::VERBOSE)
 
 NamedParameter (const std::string &name, const T &v0, const T &v1, const T &v2, const T &v3, const T &v4, const T &v5, const T &v6, const T &v7, const char *fname=0, NamedParameterBase::VERBOSITY vb=NamedParameterBase::VERBOSE)
 
 NamedParameter (const std::string &name, const T &v0, const T &v1, const T &v2, const T &v3, const T &v4, const T &v5, const T &v6, const T &v7, const T &v8, const char *fname=0, NamedParameterBase::VERBOSITY vb=NamedParameterBase::VERBOSE)
 
 NamedParameter (const std::string &name, const std::vector< T > &defVec, const char *fname=0, NamedParameterBase::VERBOSITY vb=NamedParameterBase::VERBOSE)
 
 NamedParameter (const NamedParameter< T > &other)
 
virtual ~NamedParameter ()
 
virtual int size () const
 
virtual const T & getVal (int i=0) const
 
 operator T () const
 
const std::vector< T > & getVector () const
 
virtual void setVal (const T &val, int i=0)
 
virtual void setVal (const std::vector< T > &valList)
 
virtual void print (std::ostream &os=std::cout) const
 
 operator std::vector< T > () const
 
NamedParameter< T > & operator= (const T &d)
 
NamedParameter< T > & operator= (const std::vector< T > &v)
 
NamedParameter< T > & operator+= (const T &rhs)
 
NamedParameter< T > & operator-= (const T &rhs)
 
NamedParameter< T > & operator *= (const T &rhs)
 
NamedParameter< T > & operator/= (const T &rhs)
 
template<>
void print (std::ostream &os) const
 
template<>
MINT::NamedParameter< std::string > & operator-= (const std::string &rhs)
 
template<>
MINT::NamedParameter< std::string > & operator *= (const std::string &rhs)
 
template<>
MINT::NamedParameter< std::string > & operator/= (const std::string &rhs)
 
template<>
MINT::NamedParameter< std::string > & operator-= (const std::string &rhs)
 
template<>
MINT::NamedParameter< std::string > & operator *= (const std::string &rhs)
 
template<>
MINT::NamedParameter< std::string > & operator/= (const std::string &rhs)
 
template<>
void print (std::ostream &os) const
 
- Public Member Functions inherited from MINT::NamedParameterBase
bool setPPF (ParsedParameterFile *ppF_in=0)
 
bool read ()
 
bool read (std::istream &is)
 
bool read (const std::string &fname)
 
bool reloadFile (const std::string &id)
 
bool setFromInitString (const std::string &str)
 
bool setFromInitStringNoName (const std::string &str_in)
 
 NamedParameterBase (const std::string &name_in="", const char *fname=0, VERBOSITY=VERBOSE)
 
 NamedParameterBase (const NamedParameterBase &other)
 
virtual ~NamedParameterBase ()
 
virtual const std::string & name () const
 
void quiet (bool beSo=true)
 
bool gotInitialised () const
 
- Public Member Functions inherited from MINT::INamedParameter
virtual ~INamedParameter ()
 

Protected Member Functions

virtual bool setFromParsedLine (const ParsedParameterLine &line)
 
template<>
bool setFromParsedLine (const ParsedParameterLine &line)
 
template<>
bool setFromParsedLine (const ParsedParameterLine &line)
 
- Protected Member Functions inherited from MINT::NamedParameterBase
virtual bool setFromParsedFile ()
 
- Protected Member Functions inherited from MINT::INamedParameter
 INamedParameter ()
 

Protected Attributes

std::vector< T > _valueArray
 
- Protected Attributes inherited from MINT::NamedParameterBase
std::string _name
 
ParsedParameterFile_ppF
 
bool _gotInitialised
 
bool _quiet
 

Additional Inherited Members

- Public Types inherited from MINT::NamedParameterBase
enum  VERBOSITY { VERBOSE =0, QUIET =1 }
 
- Static Public Member Functions inherited from MINT::NamedParameterBase
static bool setDefaultInputFile (const std::string &fname)
 
static bool setDefaultInputStream (std::istream &str=std::cin)
 
- Static Protected Member Functions inherited from MINT::NamedParameterBase
static ParsedParameterFileListgetFlist ()
 
- Static Protected Attributes inherited from MINT::NamedParameterBase
static bool IveSaidItOnce =0
 
static std::string _defaultFile = ""
 
static std::istream * _defaultStreamPtr = &std::cin
 

Detailed Description

template<typename T>
class MINT::NamedParameter< T >

Definition at line 16 of file NamedParameter.h.

Constructor & Destructor Documentation

◆ NamedParameter() [1/13]

template<typename T>
MINT::NamedParameter< T >::NamedParameter ( const std::string &  name,
NamedParameterBase::VERBOSITY  vb 
)
inline

Definition at line 43 of file NamedParameter.h.

46  : NamedParameterBase(name, (const char*)0, vb)
47  {
49  }
virtual const std::string & name() const
NamedParameterBase(const std::string &name_in="", const char *fname=0, VERBOSITY=VERBOSE)

◆ NamedParameter() [2/13]

template<typename T>
MINT::NamedParameter< T >::NamedParameter ( const std::string &  name,
const char *  fname = 0,
NamedParameterBase::VERBOSITY  vb = NamedParameterBase::VERBOSE 
)
inline

Definition at line 50 of file NamedParameter.h.

54  : NamedParameterBase(name, fname, vb)
55  {
57  }
virtual const std::string & name() const
NamedParameterBase(const std::string &name_in="", const char *fname=0, VERBOSITY=VERBOSE)

◆ NamedParameter() [3/13]

template<typename T>
MINT::NamedParameter< T >::NamedParameter ( const std::string &  name,
const T &  def,
const char *  fname = 0,
NamedParameterBase::VERBOSITY  vb = NamedParameterBase::VERBOSE 
)
inline

Definition at line 58 of file NamedParameter.h.

63  : NamedParameterBase(name, fname, vb)
64  {
65  setVal(def);
66  _gotInitialised = true;
68  }
virtual const std::string & name() const
virtual void setVal(const T &val, int i=0)
NamedParameterBase(const std::string &name_in="", const char *fname=0, VERBOSITY=VERBOSE)

◆ NamedParameter() [4/13]

template<typename T>
MINT::NamedParameter< T >::NamedParameter ( const std::string &  name,
const T &  v0,
const T &  v1,
const char *  fname = 0,
NamedParameterBase::VERBOSITY  vb = NamedParameterBase::VERBOSE 
)
inline

Definition at line 69 of file NamedParameter.h.

74  : NamedParameterBase(name, fname, vb)
75  {
76  setVal(v0, 0); setVal(v1,1);
77  _gotInitialised = true;
79  }
virtual const std::string & name() const
virtual void setVal(const T &val, int i=0)
NamedParameterBase(const std::string &name_in="", const char *fname=0, VERBOSITY=VERBOSE)

◆ NamedParameter() [5/13]

template<typename T>
MINT::NamedParameter< T >::NamedParameter ( const std::string &  name,
const T &  v0,
const T &  v1,
const T &  v2,
const char *  fname = 0,
NamedParameterBase::VERBOSITY  vb = NamedParameterBase::VERBOSE 
)
inline

Definition at line 80 of file NamedParameter.h.

85  : NamedParameterBase(name, fname, vb)
86  {
87  setVal(v0, 0); setVal(v1,1); setVal(v2,2);
88  _gotInitialised = true;
90  }
virtual const std::string & name() const
virtual void setVal(const T &val, int i=0)
NamedParameterBase(const std::string &name_in="", const char *fname=0, VERBOSITY=VERBOSE)

◆ NamedParameter() [6/13]

template<typename T>
MINT::NamedParameter< T >::NamedParameter ( const std::string &  name,
const T &  v0,
const T &  v1,
const T &  v2,
const T &  v3,
const char *  fname = 0,
NamedParameterBase::VERBOSITY  vb = NamedParameterBase::VERBOSE 
)
inline

Definition at line 91 of file NamedParameter.h.

97  : NamedParameterBase(name, fname, vb)
98  {
99  setVal(v0, 0); setVal(v1,1); setVal(v2,2); setVal(v3,3);
100  _gotInitialised = true;
102  }
virtual const std::string & name() const
virtual void setVal(const T &val, int i=0)
NamedParameterBase(const std::string &name_in="", const char *fname=0, VERBOSITY=VERBOSE)

◆ NamedParameter() [7/13]

template<typename T>
MINT::NamedParameter< T >::NamedParameter ( const std::string &  name,
const T &  v0,
const T &  v1,
const T &  v2,
const T &  v3,
const T &  v4,
const char *  fname = 0,
NamedParameterBase::VERBOSITY  vb = NamedParameterBase::VERBOSE 
)
inline

Definition at line 103 of file NamedParameter.h.

109  : NamedParameterBase(name, fname, vb)
110  {
111  setVal(v0, 0); setVal(v1,1); setVal(v2,2); setVal(v3,3); setVal(v4,4);
112  _gotInitialised = true;
114  }
virtual const std::string & name() const
virtual void setVal(const T &val, int i=0)
NamedParameterBase(const std::string &name_in="", const char *fname=0, VERBOSITY=VERBOSE)

◆ NamedParameter() [8/13]

template<typename T>
MINT::NamedParameter< T >::NamedParameter ( const std::string &  name,
const T &  v0,
const T &  v1,
const T &  v2,
const T &  v3,
const T &  v4,
const T &  v5,
const char *  fname = 0,
NamedParameterBase::VERBOSITY  vb = NamedParameterBase::VERBOSE 
)
inline

Definition at line 115 of file NamedParameter.h.

121  : NamedParameterBase(name, fname, vb)
122  {
123  setVal(v0, 0); setVal(v1,1); setVal(v2,2); setVal(v3,3); setVal(v4,4);
124  setVal(v5,5);
125  _gotInitialised = true;
127  }
virtual const std::string & name() const
virtual void setVal(const T &val, int i=0)
NamedParameterBase(const std::string &name_in="", const char *fname=0, VERBOSITY=VERBOSE)

◆ NamedParameter() [9/13]

template<typename T>
MINT::NamedParameter< T >::NamedParameter ( const std::string &  name,
const T &  v0,
const T &  v1,
const T &  v2,
const T &  v3,
const T &  v4,
const T &  v5,
const T &  v6,
const char *  fname = 0,
NamedParameterBase::VERBOSITY  vb = NamedParameterBase::VERBOSE 
)
inline

Definition at line 128 of file NamedParameter.h.

135  : NamedParameterBase(name, fname, vb)
136  {
137  setVal(v0, 0); setVal(v1,1); setVal(v2,2); setVal(v3,3);
138  setVal(v4,4); setVal(v5,5); setVal(v6,6);
139  _gotInitialised = true;
141  }
virtual const std::string & name() const
virtual void setVal(const T &val, int i=0)
NamedParameterBase(const std::string &name_in="", const char *fname=0, VERBOSITY=VERBOSE)

◆ NamedParameter() [10/13]

template<typename T>
MINT::NamedParameter< T >::NamedParameter ( const std::string &  name,
const T &  v0,
const T &  v1,
const T &  v2,
const T &  v3,
const T &  v4,
const T &  v5,
const T &  v6,
const T &  v7,
const char *  fname = 0,
NamedParameterBase::VERBOSITY  vb = NamedParameterBase::VERBOSE 
)
inline

Definition at line 142 of file NamedParameter.h.

149  : NamedParameterBase(name, fname, vb)
150  {
151  setVal(v0, 0); setVal(v1,1); setVal(v2,2); setVal(v3,3);
152  setVal(v4,4); setVal(v5,5); setVal(v6,6); setVal(v7,7);
153  _gotInitialised = true;
155  }
virtual const std::string & name() const
virtual void setVal(const T &val, int i=0)
NamedParameterBase(const std::string &name_in="", const char *fname=0, VERBOSITY=VERBOSE)

◆ NamedParameter() [11/13]

template<typename T>
MINT::NamedParameter< T >::NamedParameter ( const std::string &  name,
const T &  v0,
const T &  v1,
const T &  v2,
const T &  v3,
const T &  v4,
const T &  v5,
const T &  v6,
const T &  v7,
const T &  v8,
const char *  fname = 0,
NamedParameterBase::VERBOSITY  vb = NamedParameterBase::VERBOSE 
)
inline

Definition at line 156 of file NamedParameter.h.

163  : NamedParameterBase(name, fname, vb)
164  {
165  setVal(v0, 0); setVal(v1,1); setVal(v2,2); setVal(v3,3);
166  setVal(v4,4); setVal(v5,5); setVal(v6,6); setVal(v7,7);
167  setVal(v8,8);
168  _gotInitialised = true;
170  }
virtual const std::string & name() const
virtual void setVal(const T &val, int i=0)
NamedParameterBase(const std::string &name_in="", const char *fname=0, VERBOSITY=VERBOSE)

◆ NamedParameter() [12/13]

template<typename T>
MINT::NamedParameter< T >::NamedParameter ( const std::string &  name,
const std::vector< T > &  defVec,
const char *  fname = 0,
NamedParameterBase::VERBOSITY  vb = NamedParameterBase::VERBOSE 
)
inline

Definition at line 171 of file NamedParameter.h.

176  : NamedParameterBase(name, fname, vb)
177  {
178  setVal(defVec);
179  _gotInitialised = true;
181  }
virtual const std::string & name() const
virtual void setVal(const T &val, int i=0)
NamedParameterBase(const std::string &name_in="", const char *fname=0, VERBOSITY=VERBOSE)

◆ NamedParameter() [13/13]

template<typename T>
MINT::NamedParameter< T >::NamedParameter ( const NamedParameter< T > &  other)
inline

Definition at line 182 of file NamedParameter.h.

183  : INamedParameter()
184  , NamedParameterBase(other)
185  , _valueArray(other._valueArray)
186  {
187  }
std::vector< T > _valueArray
NamedParameterBase(const std::string &name_in="", const char *fname=0, VERBOSITY=VERBOSE)

◆ ~NamedParameter()

template<typename T>
virtual MINT::NamedParameter< T >::~NamedParameter ( )
inlinevirtual

Definition at line 189 of file NamedParameter.h.

189 {}

Member Function Documentation

◆ getVal()

template<typename T>
virtual const T& MINT::NamedParameter< T >::getVal ( int  i = 0) const
inlinevirtual

Definition at line 194 of file NamedParameter.h.

194  {
195  if(i < 0 || i >= (int) _valueArray.size()){
196  std::cout << "FATAL ERROR in NamedParameter::getVal: "
197  << " for parameter name \"" << name()
198  << "\". Index: " << i << " out of range [ "
199  << 0 << " , " << _valueArray.size()
200  << " [ - I will crash."
201  << "\n Maybe the parameter was not initialised?"
202  << "\n Even non-array NamedParameters are stored"
203  << " in an array - in this case of size 1."
204  << " Uninitialised this can end up being 0."
205  << std::endl;
206  throw "array index out of bounds";
207  }
208  return _valueArray[i];
209  }
virtual const std::string & name() const
std::vector< T > _valueArray

◆ getVector()

template<typename T>
const std::vector<T>& MINT::NamedParameter< T >::getVector ( ) const
inline

Definition at line 216 of file NamedParameter.h.

216  {
217  return _valueArray;
218  }
std::vector< T > _valueArray

◆ operator *=() [1/3]

template<>
MINT::NamedParameter< std::string > & MINT::NamedParameter< std::string >::operator *= ( const std::string &  rhs)

Definition at line 25 of file NamedParameter.cpp.

25  {
26  std::cout << "WARNING in MINT::NamedParameter<std::string>::operator-=:"
27  << "\n\t OPERATOR \"*=\" undefined for strings"
28  << "\n\t you tried: " << (std::string)(*this)
29  << " *= " << rhs
30  << std::endl;
31  return *this;
32 }

◆ operator *=() [2/3]

template<typename T>
NamedParameter<T>& MINT::NamedParameter< T >::operator *= ( const T &  rhs)
inline

Definition at line 260 of file NamedParameter.h.

260  {
261  for(unsigned int i=0; i < _valueArray.size(); i++) _valueArray[i] *= rhs;
262  return *this;
263  }
std::vector< T > _valueArray

◆ operator *=() [3/3]

template<>
MINT::NamedParameter< std::string > & MINT::NamedParameter< std::string >::operator *= ( const std::string &  rhs)

◆ operator std::vector< T >()

template<typename T>
MINT::NamedParameter< T >::operator std::vector< T > ( ) const
inline

Definition at line 243 of file NamedParameter.h.

243 {return getVector();}
const std::vector< T > & getVector() const

◆ operator T()

template<typename T>
MINT::NamedParameter< T >::operator T ( ) const
inline

Definition at line 210 of file NamedParameter.h.

210  {
211  return getVal();
212  // meaningful for parameters that aren't arrays
213  // otherwise: you'll get the first.
214  }
virtual const T & getVal(int i=0) const

◆ operator+=()

template<typename T>
NamedParameter<T>& MINT::NamedParameter< T >::operator+= ( const T &  rhs)
inline

Definition at line 252 of file NamedParameter.h.

252  {
253  _valueArray[0] += rhs;
254  return *this;
255  }
std::vector< T > _valueArray

◆ operator-=() [1/3]

template<>
MINT::NamedParameter< std::string > & MINT::NamedParameter< std::string >::operator-= ( const std::string &  rhs)

Definition at line 14 of file NamedParameter.cpp.

14  {
15  std::cout << "WARNING in MINT::NamedParameter<std::string>::operator-=:"
16  << "\n\t OPERATOR \"-=\" undefined for strings"
17  << "\n\t you tried: " << (std::string)(*this)
18  << " -= " << rhs
19  << std::endl;
20  return *this;
21 }

◆ operator-=() [2/3]

template<typename T>
NamedParameter<T>& MINT::NamedParameter< T >::operator-= ( const T &  rhs)
inline

Definition at line 256 of file NamedParameter.h.

256  {
257  _valueArray[0] -= rhs;
258  return *this;
259  }
std::vector< T > _valueArray

◆ operator-=() [3/3]

template<>
MINT::NamedParameter< std::string > & MINT::NamedParameter< std::string >::operator-= ( const std::string &  rhs)

◆ operator/=() [1/3]

template<>
MINT::NamedParameter< std::string > & MINT::NamedParameter< std::string >::operator/= ( const std::string &  rhs)

Definition at line 36 of file NamedParameter.cpp.

36  {
37  std::cout << "WARNING in MINT::NamedParameter<std::string>::operator-=:"
38  << "\n\t OPERATOR \"/=\" undefined for strings"
39  << "\n\t you tried: " << (std::string)(*this)
40  << " /= " << rhs
41  << std::endl;
42  return *this;
43 }

◆ operator/=() [2/3]

template<typename T>
NamedParameter<T>& MINT::NamedParameter< T >::operator/= ( const T &  rhs)
inline

Definition at line 264 of file NamedParameter.h.

264  {
265  for(unsigned int i=0; i < _valueArray.size(); i++) _valueArray[i] /= rhs;
266  return *this;
267  }
std::vector< T > _valueArray

◆ operator/=() [3/3]

template<>
MINT::NamedParameter< std::string > & MINT::NamedParameter< std::string >::operator/= ( const std::string &  rhs)

◆ operator=() [1/2]

template<typename T>
NamedParameter<T>& MINT::NamedParameter< T >::operator= ( const T &  d)
inline

Definition at line 244 of file NamedParameter.h.

244  {
245  setVal(d, 0);
246  return *this;
247  }
virtual void setVal(const T &val, int i=0)

◆ operator=() [2/2]

template<typename T>
NamedParameter<T>& MINT::NamedParameter< T >::operator= ( const std::vector< T > &  v)
inline

Definition at line 248 of file NamedParameter.h.

248  {
249  setVal(v);
250  return *this;
251  }
virtual void setVal(const T &val, int i=0)

◆ print() [1/3]

template<>
void MINT::NamedParameter< std::string >::print ( std::ostream &  os) const

Definition at line 64 of file NamedParameter.cpp.

64  {
65  os << "\"" << name() << "\" ";
66  if(size()==0){
67  return;
68  }else{
69  for(int i=0; i< size(); i++){
70  os << "\"" << getVal(i) << "\" ";
71  if(i != size()) os << " ";
72  }
73  }
74 }
virtual int size() const
virtual const std::string & name() const
virtual const T & getVal(int i=0) const

◆ print() [2/3]

template<typename T>
virtual void MINT::NamedParameter< T >::print ( std::ostream &  os = std::cout) const
inlinevirtual

Definition at line 232 of file NamedParameter.h.

232  {
233  os << "\"" << name() << "\" ";
234  if(size()==0){
235  return;
236  }else{
237  for(int i=0; i< size(); i++){
238  os << getVal(i);
239  if(i != size()) os << " ";
240  }
241  }
242  }
virtual int size() const
virtual const std::string & name() const
virtual const T & getVal(int i=0) const

◆ print() [3/3]

template<>
void MINT::NamedParameter< std::string >::print ( std::ostream &  os) const

◆ setFromParsedLine() [1/3]

template<typename T>
virtual bool MINT::NamedParameter< T >::setFromParsedLine ( const ParsedParameterLine line)
inlineprotectedvirtual

Implements MINT::NamedParameterBase.

Definition at line 20 of file NamedParameter.h.

20  {
21  _valueArray.clear();
22  _valueArray.resize(1);
23  const std::vector<std::string>& vsl = line.parsedStrings();
24  if(vsl.size() < 2) return false; // first element is parameter name
25  if(vsl[0] != _name){
26  std::cout << "ERROR in NamedParameter::setFromParsedLine"
27  << " wrong parameter name. My name is " << _name
28  << " the line's first element is " << vsl[0]
29  << std::endl;
30  return false;
31  }
32  for(unsigned int i=1; i< vsl.size(); i++){
33  // std::stringstream strm(vsl[i]);
34  NamedParameterStream strm(vsl[i]);
35  T tmpVal;
36  strm >> tmpVal;
37  setVal(tmpVal, i-1);
38  }
39  return true;
40  }
std::vector< T > _valueArray
virtual void setVal(const T &val, int i=0)

◆ setFromParsedLine() [2/3]

template<>
bool MINT::NamedParameter< std::string >::setFromParsedLine ( const ParsedParameterLine line)
protectedvirtual

Implements MINT::NamedParameterBase.

Definition at line 47 of file NamedParameter.cpp.

47  {
48  const std::vector<std::string>& vsl = line.parsedStrings();
49  if(vsl.size() < 2) return false; // first element is parameter name
50  if(vsl[0] != _name){
51  std::cout << "ERROR IN NamedParameter<string>::setFromParsedLine"
52  << " wrong parameter name. My name is " << _name
53  << " the line's first element is " << vsl[0]
54  << std::endl;
55  return false;
56  }
57  for(unsigned int i=1; i< vsl.size(); i++){
58  setVal(vsl[i], i-1);
59  }
60  return true;
61 }
const std::vector< std::string > & parsedStrings() const
virtual void setVal(const T &val, int i=0)

◆ setFromParsedLine() [3/3]

template<>
bool MINT::NamedParameter< std::string >::setFromParsedLine ( const ParsedParameterLine line)
protectedvirtual

◆ setVal() [1/2]

template<typename T>
virtual void MINT::NamedParameter< T >::setVal ( const T &  val,
int  i = 0 
)
inlinevirtual

Definition at line 220 of file NamedParameter.h.

220  {
221  if(i < 0) return;
222  if(i >= (int) _valueArray.size()){
223  _valueArray.resize(i+1);
224  }
225  _valueArray[i] = val;
226  _gotInitialised = true;
227  }
std::vector< T > _valueArray

◆ setVal() [2/2]

template<typename T>
virtual void MINT::NamedParameter< T >::setVal ( const std::vector< T > &  valList)
inlinevirtual

Definition at line 228 of file NamedParameter.h.

228  {
229  _valueArray = valList;
230  _gotInitialised = true;
231  }
std::vector< T > _valueArray

◆ size()

template<typename T>
virtual int MINT::NamedParameter< T >::size ( ) const
inlinevirtual

Definition at line 191 of file NamedParameter.h.

191  {
192  return _valueArray.size();
193  }
std::vector< T > _valueArray

Member Data Documentation

◆ _valueArray

template<typename T>
std::vector<T> MINT::NamedParameter< T >::_valueArray
protected

Definition at line 18 of file NamedParameter.h.


The documentation for this class was generated from the following file: