35 #include "ParFileException.h" 46 friend ostream& operator << ( ostream& os,
Par& par ) {
54 friend ostream& operator << ( ostream& os,
Par* par ) {
78 enum ParamMode { AUTOS=
'a', BATCH=
'b', hIDDEN=
'h',
79 HIDDEN=
'H', QUERRY=
'q', LEARN=
'l' };
81 enum ParamType { BOOLEAN=
'b', COMMENT=
'c', INTEGER=
'i',
82 REAL=
'r', STRING=
's' };
84 enum NumTokens { NUMTOKENS=7 };
98 int check_value(
const char* str )
const;
105 virtual void plist( ostream& os )
const;
110 string get_name(
void )
const {
return parameter[ PARNAME ]; }
115 string get_mode(
void )
const {
return parameter[ PARMODE ]; }
120 string get_prompt(
void )
const {
return parameter[ PARPROMPT ]; }
122 string get_value(
void )
const {
return parameter[ PARVALUE ]; }
124 static int my_tokenize(
char* str,
char* delimit,
char*** tokens )
126 static void delete_tokens(
char** ptr );
148 virtual void pgetstr(
char result[],
size_t size )
const 158 virtual void print( ostream& os )
const;
160 virtual void set_val(
const string& str )
163 static bool is_indirrect(
const string& str,
char delimit=
')' );
167 vector< string > parameter;
169 void not_between_limits(
char str[],
170 const char* left,
const string& left_val,
171 const char* right,
const string& right_val )
const;
175 static int count_tokens(
char* str,
char* delimit )
throw ( Exception );
176 static void print_tokens(
char* str,
char** str_argv, ostream& os );
177 static char* save_string(
char* str )
throw ( Exception );
183 virtual void between_limits(
const string& str )
const 190 void pget_wrong_type(
char[],
const char* )
const;
virtual void print(ostream &os) const
only defined in StringPar
Definition: Par.cc:189
Definition: ParFileException.h:33
string get_prompt(void) const
Definition: Par.h:120
ParFileDelimit
Definition: Par.h:64
string get_mode(void) const
Definition: Par.h:115
virtual ~Par(void)
Definition: Par.h:89
Par(void)
Definition: Par.h:94
ParType
Definition: Par.h:69
A class to handle the Param library specific string manipulation.
Definition: ParTxt.h:31
string get_name(void) const
Definition: Par.h:110