paramxx  1.0.7
BoolPar Class Reference

#include <BoolPar.h>

+ Inheritance diagram for BoolPar:
+ Collaboration diagram for BoolPar:

Public Member Functions

 BoolPar ()
 
 BoolPar (const BoolPar &par)
 
 BoolPar (ParTxt &par) throw ( ParFileException )
 
bool pgetb (void) const throw ( ParFileException )
 
void set_val (const string &str) throw ( ParFileException, Exception )
 
- Public Member Functions inherited from Par
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 double pgetd (void) const throw ( ParFileException )
 only defined in BoolPar More...
 
virtual int pgeti (void) const throw ( ParFileException )
 only defined in RealPar More...
 
virtual long pgetl (void) const throw ( ParFileException )
 only defined in LongPar More...
 
virtual void pgetstr (char result[], size_t size) const throw ( ParFileException )
 only defined in LongPar More...
 
virtual string pgetstring (void) const throw ( ParFileException )
 only defined in StringPar More...
 
virtual void print (ostream &os) const
 only defined in StringPar More...
 

Additional Inherited Members

- Public Types inherited from Par
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 }
 
- Static Public Member Functions inherited from Par
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 inherited from Par
void not_between_limits (char str[], const char *left, const string &left_val, const char *right, const string &right_val) const
 
- Protected Attributes inherited from Par
vector< string > parameter
 

Detailed Description

A boolean parameter. The class is reponsible to make sure that the parameter can only take a boolean value. The class currently does not check whether min > max.

Constructor & Destructor Documentation

◆ BoolPar() [1/2]

BoolPar::BoolPar ( )
inline

The default constructor.

Referenced by BoolPar().

◆ BoolPar() [2/2]

BoolPar::BoolPar ( const BoolPar par)
inline

The copy constructor.

References BoolPar(), and pgetb().

Member Function Documentation

◆ pgetb()

bool BoolPar::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 from Par.

Referenced by BoolPar().


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