rasdaman complete source
Classes | Public Types | Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
r_Parse_Params Class Reference

#include <parseparams.hh>

Classes

struct  parse_params_s
 

Public Types

enum  parse_param_type { param_type_int, param_type_double, param_type_string }
 the possible parameter types used for add() More...
 

Public Member Functions

 r_Parse_Params (void)
 default constructor, should not be used More...
 
 r_Parse_Params (unsigned int num)
 constructor, gets descriptor of the values to scan for More...
 
 ~r_Parse_Params (void)
 destructor More...
 
int add (const char *key, void *store, parse_param_type type)
 add parameters to the list More...
 
int process (const char *str) const
 process parameter string More...
 

Protected Types

typedef struct
r_Parse_Params::parse_params_s 
parse_params_t
 

Protected Attributes

parse_params_tparams
 
unsigned int maxnum
 
unsigned int number
 

Static Protected Attributes

static const unsigned int granularity
 

Member Typedef Documentation

process the parameter string. Returns the number of keywords found or -1 for error.

Member Enumeration Documentation

the possible parameter types used for add()

Enumerator
param_type_int 
param_type_double 
param_type_string 

Constructor & Destructor Documentation

r_Parse_Params::r_Parse_Params ( void  )

default constructor, should not be used

r_Parse_Params::r_Parse_Params ( unsigned int  num)

constructor, gets descriptor of the values to scan for

r_Parse_Params::~r_Parse_Params ( void  )

destructor

Member Function Documentation

int r_Parse_Params::add ( const char *  key,
void *  store,
parse_param_type  type 
)

add parameters to the list

int r_Parse_Params::process ( const char *  str) const

process parameter string

Add a parameter to the list. key is the keyword, e.g. ``quality'', type is one of the available types and describes the data type of the parameter and store is a pointer to a variable of this type that will be updated by process() if the parameter is encountered there. The variable pointed to by store must not be initalized except for param_type_string where it must be set to NULL before calling process() for the first time. The contents of a string variable must be freed by the caller by first checking whether the variable is NULL and if not doing a delete [] .

Member Data Documentation

const unsigned int r_Parse_Params::granularity
staticprotected
unsigned int r_Parse_Params::maxnum
protected
unsigned int r_Parse_Params::number
protected
parse_params_t* r_Parse_Params::params
protected

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