#include <Par.h>
Public Types | |
enum | ParFileDelimit { DELIMIT = ',' } |
enum | ParType { PARNAME, PARTYPE, PARMODE, PARVALUE, PARMINIMUM, PARMAXIMUM, PARPROMPT } |
enum | ParamMode { AUTOS = 'a', BATCH = 'b', hIDDEN = 'h', HIDDEN = 'H', QUERRY = 'q', LEARN = 'l' } |
enum | ParamType { BOOLEAN = 'b', COMMENT = 'c', INTEGER = 'i', REAL = 'r', STRING = 's' } |
enum | NumTokens { NUMTOKENS = 7 } |
Public Member Functions | |
virtual | ~Par (void) |
Par (void) | |
Par (ParTxt &par) | |
int | check_value (const char *str) const |
virtual void | plist (ostream &os) const |
string | get_name (void) const |
string | get_mode (void) const |
string | get_prompt (void) const |
string | get_value (void) const |
virtual bool | pgetb (void) const throw ( ParFileException ) |
virtual double | pgetd (void) const throw ( ParFileException ) |
only defined in BoolPar | |
virtual int | pgeti (void) const throw ( ParFileException ) |
only defined in RealPar | |
virtual long | pgetl (void) const throw ( ParFileException ) |
only defined in LongPar | |
virtual void | pgetstr (char result[], size_t size) const throw ( ParFileException ) |
only defined in LongPar | |
virtual string | pgetstring (void) const throw ( ParFileException ) |
only defined in StringPar | |
virtual void | print (ostream &os) const |
only defined in StringPar | |
virtual void | set_val (const string &str) throw ( ParFileException, Exception ) |
Static Public Member Functions | |
static int | my_tokenize (char *str, char *delimit, char ***tokens) throw ( Exception ) |
static void | delete_tokens (char **ptr) |
static bool | is_indirrect (const string &str, char delimit=')') |
Protected Member Functions | |
void | not_between_limits (char str[], const char *left, const string &left_val, const char *right, const string &right_val) const |
Protected Attributes | |
vector< string > | parameter |
Friends | |
ostream & | operator<< (ostream &os, Par &par) |
ostream & | operator<< (ostream &os, Par *par) |
Definition at line 41 of file Par.h.
enum Par::ParFileDelimit |
enum Par::ParType |
The position of the parameters.
void Par::plist | ( | ostream & | os | ) | const [virtual] |
string Par::get_name | ( | void | ) | const [inline] |
string Par::get_mode | ( | void | ) | const [inline] |
string Par::get_prompt | ( | void | ) | const [inline] |
bool Par::pgetb | ( | void | ) | const throw ( ParFileException ) [virtual] |
The user is trying to get the boolean value of a parameter which is anything but a boolean.
Reimplemented in BoolPar.
Definition at line 146 of file Par.cc.
Referenced by ParFile::pgetb().
double Par::pgetd | ( | void | ) | const throw ( ParFileException ) [virtual] |
only defined in BoolPar
The user is trying to get the double value of a parameter which is anything but a double.
Reimplemented in RealPar.
Definition at line 153 of file Par.cc.
Referenced by ParFile::pgetd().
int Par::pgeti | ( | void | ) | const throw ( ParFileException ) [virtual] |
only defined in RealPar
Reimplemented in LongPar.
Definition at line 160 of file Par.cc.
Referenced by ParFile::pgeti().
long Par::pgetl | ( | void | ) | const throw ( ParFileException ) [virtual] |
only defined in LongPar
Reimplemented in LongPar.
Definition at line 167 of file Par.cc.
Referenced by ParFile::pgetl().
void Par::pgetstr | ( | char | result[], | |
size_t | size | |||
) | const throw ( ParFileException ) [virtual] |
string Par::pgetstring | ( | void | ) | const throw ( ParFileException ) [virtual] |
only defined in StringPar
Reimplemented in StringPar.
Definition at line 182 of file Par.cc.
Referenced by ParFile::pgetstr(), and ParFile::pgetstring().
void Par::print | ( | ostream & | os | ) | const [virtual] |
only defined in StringPar
To output the parameter of the form: name,type,mode,val,min,max,prompt
Reimplemented in StringPar.
Definition at line 189 of file Par.cc.
Referenced by CommentPar::plist(), and ParFile::print().
ostream& operator<< | ( | ostream & | os, | |
Par & | par | |||
) | [friend] |
ostream& operator<< | ( | ostream & | os, | |
Par * | par | |||
) | [friend] |