Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

ParmParse Class Reference

#include <ParmParse.H>

Collaboration diagram for ParmParse:

Collaboration graph
[legend]
List of all members.

Public Types

enum  PPType {
  ppDefn, ppOption, ppInt, ppFloat,
  ppDouble, ppString, ppEQ_sign, ppEOF
}

Public Methods

 ParmParse (int argc, char **argv, const char *prefix=0, const char *parfile=0)
 {\bf constructors, destructor}

 ParmParse (const char *prefix=0)
 ~ParmParse ()
bool contains (const char *name)
 {\bf inquiry functions}

bool contains (const std::string &name)
int countval (const char *name, int n=-1)
int countname (const char *name)
int countname (const std::string &name)
void dumpTable (std::ostream &os)
void get (const char *name, int &ref, int ival=0)
 {\bf access functions} access single object

int query (const char *name, int &ref, int ival=0)
void get (const char *name, float &ref, int ival=0)
int query (const char *name, float &ref, int ival=0)
void get (const char *name, double &ref, int ival=0)
int query (const char *name, double &ref, int ival=0)
void get (const char *name, std::string &ref, int ival=0)
int query (const char *name, std::string &ref, int ival=0)
void getarr (const char *name, Vector< int > &ref, int start_ix, int num_val)
 access an array of objects

void getarr (const char *name, std::vector< int > &ref, int start_ix, int num_val)
int queryarr (const char *name, Vector< int > &ref, int start_ix, int num_val)
int queryarr (const char *name, std::vector< int > &ref, int start_ix, int num_val)
void getarr (const char *name, Vector< float > &ref, int start_ix, int num_val)
void getarr (const char *name, std::vector< float > &ref, int start_ix, int num_val)
int queryarr (const char *name, Vector< float > &ref, int start_ix, int num_val)
int queryarr (const char *name, std::vector< float > &ref, int start_ix, int num_val)
void getarr (const char *name, Vector< double > &ref, int start_ix, int num_val)
void getarr (const char *name, std::vector< double > &ref, int start_ix, int num_val)
int queryarr (const char *name, Vector< double > &ref, int start_ix, int num_val)
int queryarr (const char *name, std::vector< double > &ref, int start_ix, int num_val)
void getarr (const char *name, Vector< std::string > &ref, int start_ix, int num_val)
void getarr (const char *name, std::vector< std::string > &ref, int start_ix, int num_val)
int queryarr (const char *name, Vector< std::string > &ref, int start_ix, int num_val)
int queryarr (const char *name, std::vector< std::string > &ref, int start_ix, int num_val)

Protected Methods

void bldTable (const char *str, int lenstr, PP_List< PP_entry * > &tab)
void addDefn (PP_String &def, PP_List< PP_String > &val, PP_List< PP_entry * > &tab)
void read_file (const char *fname, PP_List< PP_entry * > &tab)
PPType getToken (const char *, int &, int, char *)
void rmTable ()
void ppinit (const char *parfile)
const PP_entry * ppindex (int n, const char *name) const
void getval (const char *name, const PPType type, void *ptr, int ival, int k=-1)
void getarr (const char *name, const PPType type, void *ptr, int start_ix, int num_val, int k=-1)
int queryval (const char *name, const PPType type, void *ptr, int ival, int k=-1)
int queryarr (const char *name, const PPType type, void *ptr, int start_ix, int num_val, int k=-1)
bool isInteger (const PP_String &str, int &val)
int isDouble (const PP_String &str, double &val)

Protected Attributes

PP_String thePrefix

Static Protected Attributes

PP_List< PP_entry * > table
int xargc
char ** xargv
int num_obj

Friends

class PP_entry

Member Enumeration Documentation

enum ParmParse::PPType
 

Enumeration values:
ppDefn 
ppOption 
ppInt 
ppFloat 
ppDouble 
ppString 
ppEQ_sign 
ppEOF 


Constructor & Destructor Documentation

ParmParse::ParmParse (  int    argc,
char **    argv,
const char *    prefix = 0,
const char *    parfile = 0
) 
 

{\bf constructors, destructor}

ParmParse::ParmParse (  const char *    prefix = 0 ) 
 

ParmParse::~ParmParse (    ) 
 


Member Function Documentation

void ParmParse::addDefn (  PP_String &    def,
PP_List< PP_String > &    val,
PP_List< PP_entry * > &    tab
)  [protected]
 

void ParmParse::bldTable (  const char *    str,
int    lenstr,
PP_List< PP_entry * > &    tab
)  [protected]
 

bool ParmParse::contains (  const std::string &    name ) 
 

Returns true if name is in table.

bool ParmParse::contains (  const char *    name ) 
 

{\bf inquiry functions}

Returns true if name is in table.

int ParmParse::countname (  const std::string &    name )  [inline]
 

int ParmParse::countname (  const char *    name ) 
 

int ParmParse::countval (  const char *    name,
int    n = -1
)  [inline]
 

void ParmParse::dumpTable (  std::ostream &    os ) 
 

void ParmParse::get (  const char *    name,
std::string &    ref,
int    ival = 0
)  [inline]
 

void ParmParse::get (  const char *    name,
double &    ref,
int    ival = 0
)  [inline]
 

void ParmParse::get (  const char *    name,
float &    ref,
int    ival = 0
)  [inline]
 

void ParmParse::get (  const char *    name,
int &    ref,
int    ival = 0
)  [inline]
 

{\bf access functions} access single object

void ParmParse::getarr (  const char *    name,
const PPType    type,
void *    ptr,
int    start_ix,
int    num_val,
int    k = -1
)  [protected]
 

void ParmParse::getarr (  const char *    name,
std::vector< std::string > &    ref,
int    start_ix,
int    num_val
)  [inline]
 

void ParmParse::getarr (  const char *    name,
Vector< std::string > &    ref,
int    start_ix,
int    num_val
)  [inline]
 

void ParmParse::getarr (  const char *    name,
std::vector< double > &    ref,
int    start_ix,
int    num_val
)  [inline]
 

void ParmParse::getarr (  const char *    name,
Vector< double > &    ref,
int    start_ix,
int    num_val
)  [inline]
 

void ParmParse::getarr (  const char *    name,
std::vector< float > &    ref,
int    start_ix,
int    num_val
)  [inline]
 

void ParmParse::getarr (  const char *    name,
Vector< float > &    ref,
int    start_ix,
int    num_val
)  [inline]
 

void ParmParse::getarr (  const char *    name,
std::vector< int > &    ref,
int    start_ix,
int    num_val
)  [inline]
 

void ParmParse::getarr (  const char *    name,
Vector< int > &    ref,
int    start_ix,
int    num_val
)  [inline]
 

access an array of objects

PPType ParmParse::getToken (  const char *   ,
int &   ,
int   ,
char *   
)  [protected]
 

void ParmParse::getval (  const char *    name,
const PPType    type,
void *    ptr,
int    ival,
int    k = -1
)  [protected]
 

int ParmParse::isDouble (  const PP_String &    str,
double &    val
)  [inline, protected]
 

bool ParmParse::isInteger (  const PP_String &    str,
int &    val
)  [inline, protected]
 

const PP_entry* ParmParse::ppindex (  int    n,
const char *    name
)  const [protected]
 

void ParmParse::ppinit (  const char *    parfile )  [protected]
 

int ParmParse::query (  const char *    name,
std::string &    ref,
int    ival = 0
)  [inline]
 

int ParmParse::query (  const char *    name,
double &    ref,
int    ival = 0
)  [inline]
 

int ParmParse::query (  const char *    name,
float &    ref,
int    ival = 0
)  [inline]
 

int ParmParse::query (  const char *    name,
int &    ref,
int    ival = 0
)  [inline]
 

int ParmParse::queryarr (  const char *    name,
const PPType    type,
void *    ptr,
int    start_ix,
int    num_val,
int    k = -1
)  [protected]
 

int ParmParse::queryarr (  const char *    name,
std::vector< std::string > &    ref,
int    start_ix,
int    num_val
)  [inline]
 

int ParmParse::queryarr (  const char *    name,
Vector< std::string > &    ref,
int    start_ix,
int    num_val
)  [inline]
 

int ParmParse::queryarr (  const char *    name,
std::vector< double > &    ref,
int    start_ix,
int    num_val
)  [inline]
 

int ParmParse::queryarr (  const char *    name,
Vector< double > &    ref,
int    start_ix,
int    num_val
)  [inline]
 

int ParmParse::queryarr (  const char *    name,
std::vector< float > &    ref,
int    start_ix,
int    num_val
)  [inline]
 

int ParmParse::queryarr (  const char *    name,
Vector< float > &    ref,
int    start_ix,
int    num_val
)  [inline]
 

int ParmParse::queryarr (  const char *    name,
std::vector< int > &    ref,
int    start_ix,
int    num_val
)  [inline]
 

int ParmParse::queryarr (  const char *    name,
Vector< int > &    ref,
int    start_ix,
int    num_val
)  [inline]
 

int ParmParse::queryval (  const char *    name,
const PPType    type,
void *    ptr,
int    ival,
int    k = -1
)  [protected]
 

void ParmParse::read_file (  const char *    fname,
PP_List< PP_entry * > &    tab
)  [protected]
 

void ParmParse::rmTable (    )  [protected]
 


Friends And Related Function Documentation

friend class PP_entry [friend]
 


Member Data Documentation

int ParmParse::num_obj [static, protected]
 

PP_List<PP_entry*> ParmParse::table [static, protected]
 

PP_String ParmParse::thePrefix [protected]
 

int ParmParse::xargc [static, protected]
 

char** ParmParse::xargv [static, protected]
 


The documentation for this class was generated from the following file:
Generated on Thu Aug 29 11:07:46 2002 for Chombo&INS by doxygen1.2.16