#include <KnapParams.h>
Public Types | |
enum | chrParams { chrDummy, endOfChrParams } |
Character parameters. More... | |
enum | intParams { intDummy, endOfIntParams } |
Integer paramters. More... | |
enum | dblParams { dblDummy, endOfDblParams } |
Double parameters. More... | |
enum | strParams { strDummy, endOfStrParams } |
String parameters. More... | |
enum | strArrayParams { strArrayDummy, endOfStrArrayParams } |
There are no string array parameters. More... | |
Public Member Functions | |
virtual void | createKeywordList () |
Method for creating the list of keyword looked for in the parameter file. More... | |
virtual void | setDefaultEntries () |
Method for setting the default values for the parameters. More... | |
void | setEntry (const chrParams key, const char *val) |
char* is true(1) or false(0), not used More... | |
void | setEntry (const chrParams key, const char val) |
char is true(1) or false(0), not used More... | |
void | setEntry (const chrParams key, const bool val) |
This method is the one that ever been used. More... | |
void | setEntry (const intParams key, const char *val) |
void | setEntry (const intParams key, const int val) |
void | setEntry (const dblParams key, const char *val) |
void | setEntry (const dblParams key, const double val) |
void | setEntry (const strParams key, const char *val) |
void | setEntry (const strArrayParams key, const char *val) |
Constructors. | |
KnapParams () | |
The default constructor creates a parameter set with from the template argument structure. More... | |
Query methods | |
For user application: Following code are do NOT need to change. The reason can not put following functions in base class The members of the parameter set can be queried for using the overloaded entry() method. Using the example in the class documentation the user can get a parameter with the "<code>param.entry(USER_par::parameter_name)</code>" expression. | |
char | entry (const chrParams key) const |
int | entry (const intParams key) const |
double | entry (const dblParams key) const |
const std::string & | entry (const strParams key) const |
const std::vector< std::string > & | entry (const strArrayParams key) const |
Packing/unpacking methods | |
void | pack (AlpsEncoded &buf) |
Pack the parameter set into the buffer (AlpsEncoded is used as buffer Here). More... | |
void | unpack (AlpsEncoded &buf) |
Unpack the parameter set from the buffer. More... | |
![]() | |
void | setEntry (const AlpsParameter key, const char *val) |
First, there is the assignment operator that sets the whole parameter set at once. More... | |
void | readFromStream (std::istream &parstream) |
Read the parameters from the stream specified in the argument. More... | |
void | readFromFile (const char *paramfile) |
Read parameters from a file. More... | |
void | readFromArglist (const int argnum, const char *const *arglist) |
Read parameters from the command line. More... | |
void | writeToStream (std::ostream &outstream) const |
Write keyword-value pairs to the stream specified in the argument. More... | |
AlpsParameterSet (int c, int i, int d, int s, int sa) | |
The constructor allocate memory for parameters. More... | |
virtual | ~AlpsParameterSet () |
The destructor deletes all data members. More... | |
Additional Inherited Members | |
![]() | |
std::vector< std::pair < std::string, AlpsParameter > > | keys_ |
The keyword, parameter pairs. More... | |
std::vector< std::string > | obsoleteKeys_ |
list of obsolete keywords. More... | |
bool * | bpar_ |
The bool parameters. More... | |
int * | ipar_ |
The integer parameters. More... | |
double * | dpar_ |
The double parameters. More... | |
std::string * | spar_ |
The string (actually, std::string) parameters. More... | |
int | numSa_ |
The "vector of string" parameters. More... | |
std::vector< std::string > * | sapar_ |
The keyword, parameter pairs. More... | |
Definition at line 26 of file KnapParams.h.
Character parameters.
All of these variable are used as booleans (ture = 1, false = 0).
Enumerator | |
---|---|
chrDummy | |
endOfChrParams |
Definition at line 30 of file KnapParams.h.
There are no string array parameters.
Enumerator | |
---|---|
strArrayDummy | |
endOfStrArrayParams |
Definition at line 59 of file KnapParams.h.
|
inline |
The default constructor creates a parameter set with from the template argument structure.
The keyword list is created and the defaults are set.
Definition at line 71 of file KnapParams.h.
|
virtual |
Method for creating the list of keyword looked for in the parameter file.
Implements AlpsParameterSet.
|
virtual |
Method for setting the default values for the parameters.
Implements AlpsParameterSet.
|
inline |
Definition at line 115 of file KnapParams.h.
|
inline |
Definition at line 118 of file KnapParams.h.
|
inline |
Definition at line 121 of file KnapParams.h.
|
inline |
Definition at line 124 of file KnapParams.h.
|
inline |
Definition at line 127 of file KnapParams.h.
char* is true(1) or false(0), not used
Definition at line 132 of file KnapParams.h.
char is true(1) or false(0), not used
Definition at line 135 of file KnapParams.h.
This method is the one that ever been used.
Definition at line 138 of file KnapParams.h.
Definition at line 141 of file KnapParams.h.
Definition at line 144 of file KnapParams.h.
Definition at line 147 of file KnapParams.h.
Definition at line 150 of file KnapParams.h.
Definition at line 153 of file KnapParams.h.
|
inline |
Definition at line 156 of file KnapParams.h.
|
inlinevirtual |
Pack the parameter set into the buffer (AlpsEncoded is used as buffer Here).
Reimplemented from AlpsParameterSet.
Definition at line 165 of file KnapParams.h.
|
inlinevirtual |
Unpack the parameter set from the buffer.
Reimplemented from AlpsParameterSet.
Definition at line 178 of file KnapParams.h.