3 #ifndef CXCPARAMX_SIMPLE_H 4 #define CXCPARAMX_SIMPLE_H 9 #include <Exception/Exception.h> 20 simple(
int argc,
char** argv,
const string& mode =
"rw" );
21 simple(
const string& filename,
int argc,
char** argv,
const string& mode =
"rw" );
23 void get(
const string& name,
float& value )
const;
24 void get(
const string& name,
double& value )
const;
25 void get(
const string& name,
short& value )
const;
26 void get(
const string& name,
int& value )
const;
27 void get(
const string& name,
long& value )
const;
28 void get(
const string& name,
bool& value )
const;
29 void get(
const string& name,
string& value )
const;
31 float getf(
const string& name )
const;
32 double getd(
const string& name )
const;
33 short gets(
const string& name )
const;
34 int geti(
const string& name )
const;
35 long getl(
const string& name )
const;
36 bool getb(
const string& name )
const;
37 string getstr(
const string& name )
const;
39 bool access(
const string& name )
const;
43 using pParamFileImpl = std::unique_ptr<ParamFileImpl, void(*)(ParamFileImpl*)>;
50 void access_t(
const string& name )
const;
59 #endif // ! CXCPARAMX_SIMPLE_H
string getstr(const string &name) const
Return a parameter value as an string.
Definition: simple.cc:261
simple(int argc, char **argv, const string &mode="rw")
Constructor with file name taken from argv[0].
Definition: simple.cc:60
short gets(const string &name) const
Return a parameter value as a short.
Definition: simple.cc:213
long getl(const string &name) const
Return a parameter value as a long.
Definition: simple.cc:235
int geti(const string &name) const
Return a parameter value as an int.
Definition: simple.cc:224
void get(const string &name, float &value) const
Retrieve a parameter value into a float.
Definition: simple.cc:93
bool getb(const string &name) const
Return a parameter value as an bool.
Definition: simple.cc:250
double getd(const string &name) const
Return a parameter value as a double.
Definition: simple.cc:201
float getf(const string &name) const
Return a parameter value as a float.
Definition: simple.cc:190