rasdaman client API  10.6.3
The Array Analytics Engine: Datacubes at Your Fingertips
Classes | Public Types | Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
r_Parse_Params Class Reference

Class for parsing a string consisting of key=value pairs separated by ",". More...

#include <parseparams.hh>

Classes

struct  parse_params_t
 process the parameter string. More...
 

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
 Possible parameter types and their corresponding C types are. 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 add (const std::string &key, void *store, parse_param_type type)
 
int process (const char *str) const
 Add a parameter to the list. More...
 
int process (const char *str, char separator, bool withWhiteSpaces) const
 

Protected Attributes

parse_params_tparams {NULL}
 
unsigned int maxnum {}
 
unsigned int number {}
 

Static Protected Attributes

static const unsigned int granularity
 

Detailed Description

Class for parsing a string consisting of key=value pairs separated by ",".

Member Enumeration Documentation

◆ parse_param_type

the possible parameter types used for add()

Enumerator
param_type_int 
param_type_double 
param_type_string 

Constructor & Destructor Documentation

◆ r_Parse_Params() [1/2]

r_Parse_Params::r_Parse_Params ( void  )
default

Possible parameter types and their corresponding C types are.

◆ r_Parse_Params() [2/2]

r_Parse_Params::r_Parse_Params ( unsigned int  num)
explicit

constructor, gets descriptor of the values to scan for

◆ ~r_Parse_Params()

r_Parse_Params::~r_Parse_Params ( void  )

destructor

Member Function Documentation

◆ add() [1/2]

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

add parameters to the list

◆ add() [2/2]

int r_Parse_Params::add ( const std::string &  key,
void *  store,
parse_param_type  type 
)

◆ process() [1/2]

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

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 [] var. process parameter string

◆ process() [2/2]

int r_Parse_Params::process ( const char *  str,
char  separator,
bool  withWhiteSpaces 
) const

Member Data Documentation

◆ granularity

const unsigned int r_Parse_Params::granularity
staticprotected

◆ maxnum

unsigned int r_Parse_Params::maxnum {}
protected

◆ number

unsigned int r_Parse_Params::number {}
protected

◆ params

parse_params_t* r_Parse_Params::params {NULL}
protected

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