#include <ParmParse.H>
Public Types | |
enum | { LAST = -1, FIRST = 0, ALL = -1 } |
typedef std::list< PP_entry > | Table |
Public Member Functions | |
ParmParse (const std::string &prefix=std::string()) | |
Construct an additional ParmParse object sharing the same internal table as any other such objects in existence. | |
bool | contains (const char *name) const |
Returns true if name is in table. | |
int | countval (const char *name, int n=LAST) const |
Returns the number of values associated with nth occurence of name (prepended with the prefix) in the table. | |
int | countname (const std::string &name) const |
Returns the number of times the given name (prepended with prefix) appears in the table. | |
int | countRecords (const std::string &name) const |
Returns the number of records of the given name (prepended with prefix) appears in the table. | |
Record | getRecord (const std::string &name, int n=LAST) const |
Returns the nth record of the given name, or zero if none found. | |
void | getkth (const char *name, int k, bool &ref, int ival=FIRST) const |
Get the ival'th value of kth occurrence of the requested name. | |
void | get (const char *name, bool &ref, int ival=FIRST) const |
Same as getkth() but searches for the last occurrence of name. | |
int | querykth (const char *name, int k, bool &ref, int ival=FIRST) const |
Similar to getkth() but returns 0 if there is no kth occurrence of name. | |
int | query (const char *name, bool &ref, int ival=FIRST) const |
Same as querykth() but searches for the last occurrence of name. | |
void | getkth (const char *name, int k, int &ref, int ival=FIRST) const |
Get the ival'th value of kth occurrence of the requested name. | |
void | get (const char *name, int &ref, int ival=FIRST) const |
Same as getkth() but searches for the last occurrence of name. | |
int | querykth (const char *name, int k, int &ref, int ival=FIRST) const |
Similar to getkth() but returns 0 if there is no kth occurrence of name. | |
int | query (const char *name, int &ref, int ival=FIRST) const |
Same as querykth() but searches for the last occurrence of name. | |
void | getkth (const char *name, int k, float &ref, int ival=FIRST) const |
Get the ival'th value of kth occurrence of the requested name. | |
void | get (const char *name, float &ref, int ival=FIRST) const |
Same as getkth() but searches for the last occurrence of name. | |
int | querykth (const char *name, int k, float &ref, int ival=FIRST) const |
Similar to getkth() but returns 0 if there is no kth occurrence of name. | |
int | query (const char *name, float &ref, int ival=FIRST) const |
Same as querykth() but searches for the last occurrence of name. | |
void | getkth (const char *name, int k, double &ref, int ival=FIRST) const |
Get the ival'th value of kth occurrence of the requested name. | |
void | get (const char *name, double &ref, int ival=FIRST) const |
Same as getkth() but searches for the last occurrence of name. | |
int | querykth (const char *name, int k, double &ref, int ival=FIRST) const |
Similar to getkth() but returns 0 if there is no kth occurrence of name. | |
int | query (const char *name, double &ref, int ival=FIRST) const |
Same as querykth() but searches for the last occurrence of name. | |
void | getkth (const char *name, int k, std::string &ref, int ival=FIRST) const |
Get the ival'th value of kth occurrence of the requested name. | |
void | get (const char *name, std::string &ref, int ival=FIRST) const |
Same as getkth() but searches for the last occurrence of name. | |
int | querykth (const char *name, int k, std::string &ref, int ival=FIRST) const |
Similar to getkth() but returns 0 if there is no kth occurrence of name. | |
int | query (const char *name, std::string &ref, int ival=FIRST) const |
Same as querykth() but searches for the last occurrence of name. | |
void | getkth (const char *name, int k, IntVect &ref, int ival=FIRST) const |
Get the ival'th value of kth occurrence of the requested name. | |
void | get (const char *name, IntVect &ref, int ival=FIRST) const |
Same as getkth() but searches for the last occurrence of name. | |
int | querykth (const char *name, int k, IntVect &ref, int ival=FIRST) const |
Similar to getkth() but returns 0 if there is no kth occurrence of name. | |
int | query (const char *name, IntVect &ref, int ival=FIRST) const |
Same as querykth() but searches for the last occurrence of name. | |
void | getkth (const char *name, int k, Box &ref, int ival=FIRST) const |
Get the ival'th value of kth occurrence of the requested name. | |
void | get (const char *name, Box &ref, int ival=FIRST) const |
Same as getkth() but searches for the last occurrence of name. | |
int | querykth (const char *name, int k, Box &ref, int ival=FIRST) const |
Similar to getkth() but returns 0 if there is no kth occurrence of name. | |
int | query (const char *name, Box &ref, int ival=FIRST) const |
Same as querykth() but searches for the last occurrence of name. | |
void | getktharr (const char *name, int k, std::vector< int > &ref, int start_ix=FIRST, int num_val=ALL) const |
Gets an std::vector<int> of num values from kth occurrence of given name. | |
void | getarr (const char *name, std::vector< int > &ref, int start_ix=FIRST, int num_val=ALL) const |
Same as getktharr() but searches for last occurrence of name. | |
int | queryktharr (const char *name, int k, std::vector< int > &ref, int start_ix=FIRST, int num_val=ALL) const |
queryktharr() is to querykth() as getktharr() is to getkth(). | |
int | queryarr (const char *name, std::vector< int > &ref, int start_ix=FIRST, int num_val=ALL) const |
Same as queryktharr() but searches for last occurrence of name. | |
void | getktharr (const char *name, int k, std::vector< float > &ref, int start_ix=FIRST, int num_val=ALL) const |
Gets an std::vector<float> of num values from kth occurrence of given name. | |
void | getarr (const char *name, std::vector< float > &ref, int start_ix=FIRST, int num_val=ALL) const |
Same as getktharr() but searches for last occurrence of name. | |
int | queryktharr (const char *name, int k, std::vector< float > &ref, int start_ix=FIRST, int num_val=ALL) const |
queryktharr() is to querykth() as getktharr() is to getkth(). | |
int | queryarr (const char *name, std::vector< float > &ref, int start_ix=FIRST, int num_val=ALL) const |
Same as queryktharr() but searches for last occurrence of name. | |
void | getktharr (const char *name, int k, std::vector< double > &ref, int start_ix=FIRST, int num_val=ALL) const |
Gets an std::vector<double> of num values from kth occurrence of given name. | |
void | getarr (const char *name, std::vector< double > &ref, int start_ix=FIRST, int num_val=ALL) const |
Same as getktharr() but searches for last occurrence of name. | |
int | queryktharr (const char *name, int k, std::vector< double > &ref, int start_ix=FIRST, int num_val=ALL) const |
queryktharr() is to querykth() as getktharr() is to getkth(). | |
int | queryarr (const char *name, std::vector< double > &ref, int start_ix=FIRST, int num_val=ALL) const |
Same as queryktharr() but searches for last occurrence of name. | |
void | getktharr (const char *name, int k, std::vector< std::string > &ref, int start_ix=FIRST, int num_val=ALL) const |
Gets an std::vector<std::string> of num values from kth occurrence of given name. | |
void | getarr (const char *name, std::vector< std::string > &ref, int start_ix=FIRST, int num_val=ALL) const |
Same as getktharr() but searches for last occurrence of name. | |
int | queryktharr (const char *name, int k, std::vector< std::string > &ref, int start_ix=FIRST, int num_val=ALL) const |
queryktharr() is to querykth() as getktharr() is to getkth(). | |
int | queryarr (const char *name, std::vector< std::string > &ref, int start_ix=FIRST, int num_val=ALL) const |
Same as queryktharr() but searches for last occurrence of name.2. | |
void | getktharr (const char *name, int k, std::vector< IntVect > &ref, int start_ix=FIRST, int num_val=ALL) const |
Gets an std::vector<IntVect> of num values from kth occurrence of given name. | |
void | getarr (const char *name, std::vector< IntVect > &ref, int start_ix=FIRST, int num_val=ALL) const |
Same as getktharr() but searches for last occurrence of name. | |
int | queryktharr (const char *name, int k, std::vector< IntVect > &ref, int start_ix=FIRST, int num_val=ALL) const |
queryktharr() is to querykth() as getktharr() is to getkth(). | |
int | queryarr (const char *name, std::vector< IntVect > &ref, int start_ix=FIRST, int num_val=ALL) const |
Same as queryktharr() but searches for last occurrence of name.2. | |
void | getktharr (const char *name, int k, std::vector< Box > &ref, int start_ix=FIRST, int num_val=ALL) const |
Gets an std::vector<Box> of num values from kth occurrence of given name. | |
void | getarr (const char *name, std::vector< Box > &ref, int start_ix=FIRST, int num_val=ALL) const |
Same as getktharr() but searches for last occurrence of name. | |
int | queryktharr (const char *name, int k, std::vector< Box > &ref, int start_ix=FIRST, int num_val=ALL) const |
queryktharr() is to querykth() as getktharr() is to getkth(). | |
int | queryarr (const char *name, std::vector< Box > &ref, int start_ix=FIRST, int num_val=ALL) const |
Same as queryktharr() but searches for last occurrence of name.2. | |
Static Public Member Functions | |
static void | dumpTable (std::ostream &os) |
Write the contents of the table in ASCII to the ostream. | |
static void | Initialize (int argc, char **argv, const char *parfile) |
Construct an initial ParmParse object from the argc and argv passed in to main(). | |
static void | Finalize () |
The destructor. | |
Friends | |
class | Frame |
class | Record |
Classes | |
class | Frame |
struct | PP_entry |
class | Record |
typedef std::list<PP_entry> ParmParse::Table |
ParmParse::ParmParse | ( | const std::string & | prefix = std::string() |
) | [explicit] |
Construct an additional ParmParse object sharing the same internal table as any other such objects in existence.
If prefix is specified, load this string as the code prefix for this particular ParmParse object.
Referenced by getRecord().
bool ParmParse::contains | ( | const char * | name | ) | const |
int ParmParse::countval | ( | const char * | name, | |
int | n = LAST | |||
) | const |
Returns the number of values associated with nth occurence of name (prepended with the prefix) in the table.
n == -1 implies the last occurence.
References ParmParse::PP_entry::m_vals, and ppindex().
int ParmParse::countname | ( | const std::string & | name | ) | const |
Returns the number of times the given name (prepended with prefix) appears in the table.
References ppfound().
int ParmParse::countRecords | ( | const std::string & | name | ) | const |
Returns the number of records of the given name (prepended with prefix) appears in the table.
References ppfound().
ParmParse::Record ParmParse::getRecord | ( | const std::string & | name, | |
int | n = LAST | |||
) | const |
Returns the nth record of the given name, or zero if none found.
References BoxLib::Abort(), ParmParse::PP_entry::m_table, ParmParse(), ppindex(), and Record.
void ParmParse::dumpTable | ( | std::ostream & | os | ) | [static] |
void ParmParse::getkth | ( | const char * | name, | |
int | k, | |||
bool & | ref, | |||
int | ival = FIRST | |||
) | const |
Get the ival'th value of kth occurrence of the requested name.
If successful, the value is converted to a bool and stored in reference ref. If the kth occurrence does not exist or ival'th value does not exist, or if the printed representation of the value cannot be converted to an bool, an error message is output and the program halts. Note that ival == 0 is the first value in the list. ParmParse converte the value 'true', and non-zero integers or floats to bool(true), and bool(false) for 'false' or zero integer or float values.
References sgetval().
void ParmParse::get | ( | const char * | name, | |
bool & | ref, | |||
int | ival = FIRST | |||
) | const |
int ParmParse::querykth | ( | const char * | name, | |
int | k, | |||
bool & | ref, | |||
int | ival = FIRST | |||
) | const |
Similar to getkth() but returns 0 if there is no kth occurrence of name.
If successful, it returns 1 and stores the value in ref. If the kth occurrence exists, but ival'th value of that occurrence does not, or if there is a type mismatch, then the program signals an error and halts.
References squeryval().
int ParmParse::query | ( | const char * | name, | |
bool & | ref, | |||
int | ival = FIRST | |||
) | const |
Same as querykth() but searches for the last occurrence of name.
References LAST, and squeryval().
Referenced by FArrayBox::Initialize(), DistributionMapping::Initialize(), and Profiler::Initialize().
void ParmParse::getkth | ( | const char * | name, | |
int | k, | |||
int & | ref, | |||
int | ival = FIRST | |||
) | const |
Get the ival'th value of kth occurrence of the requested name.
If successful, the value is converted to an int and stored in reference ref. If the kth occurrence does not exist or ival'th value does not exist, or if the printed representation of the value cannot be converted to an int, an error message is output and the program halts. Note that ival == 0 is the first value in the list.
References sgetval().
void ParmParse::get | ( | const char * | name, | |
int & | ref, | |||
int | ival = FIRST | |||
) | const |
int ParmParse::querykth | ( | const char * | name, | |
int | k, | |||
int & | ref, | |||
int | ival = FIRST | |||
) | const |
Similar to getkth() but returns 0 if there is no kth occurrence of name.
If successful, it returns 1 and stores the value in ref. If the kth occurrence exists, but ival'th value of that occurrence does not, or if there is a type mismatch, then the program signals an error and halts.
References squeryval().
int ParmParse::query | ( | const char * | name, | |
int & | ref, | |||
int | ival = FIRST | |||
) | const |
void ParmParse::getkth | ( | const char * | name, | |
int | k, | |||
float & | ref, | |||
int | ival = FIRST | |||
) | const |
Get the ival'th value of kth occurrence of the requested name.
If successful, the value is converted to a float and stored in reference ref. If the kth occurrence does not exist or ival'th value does not exist, or if the printed representation of the value cannot be converted to a float, an error message is output and the program halts. Note that ival == 0 is the first value in the list.
References sgetval().
void ParmParse::get | ( | const char * | name, | |
float & | ref, | |||
int | ival = FIRST | |||
) | const |
int ParmParse::querykth | ( | const char * | name, | |
int | k, | |||
float & | ref, | |||
int | ival = FIRST | |||
) | const |
Similar to getkth() but returns 0 if there is no kth occurrence of name.
If successful, it returns 1 and stores the value in ref. If the kth occurrence exists, but ival'th value of that occurrence does not, or if there is a type mismatch, then the program signals an error and halts.
References squeryval().
int ParmParse::query | ( | const char * | name, | |
float & | ref, | |||
int | ival = FIRST | |||
) | const |
void ParmParse::getkth | ( | const char * | name, | |
int | k, | |||
double & | ref, | |||
int | ival = FIRST | |||
) | const |
Get the ival'th value of kth occurrence of the requested name.
If successful, the value is converted to a double and stored in reference ref. If the kth occurrence does not exist or ival'th value does not exist, or if the printed representation of the value cannot be converted to a double, an error message is output and the program halts. Note that ival = 0 is the first value in the list.
References sgetval().
void ParmParse::get | ( | const char * | name, | |
double & | ref, | |||
int | ival = FIRST | |||
) | const |
int ParmParse::querykth | ( | const char * | name, | |
int | k, | |||
double & | ref, | |||
int | ival = FIRST | |||
) | const |
Similar to getkth() but returns 0 if there is no kth occurrence of name.
If successful, it returns 1 and stores the value in ref. If the kth occurrence exists, but ival'th value of that occurrence does not, or if there is a type mismatch, then the program signals an error and halts.
References squeryval().
int ParmParse::query | ( | const char * | name, | |
double & | ref, | |||
int | ival = FIRST | |||
) | const |
void ParmParse::getkth | ( | const char * | name, | |
int | k, | |||
std::string & | ref, | |||
int | ival = FIRST | |||
) | const |
Get the ival'th value of kth occurrence of the requested name.
If successful, the value is converted to a std::string and stored in reference ref. If the kth occurrence does not exist or ival'th value does not exist, or if the printed representation of the value cannot be converted to a std::string, an error message is output and the program halts. Note that ival = 0 is the first value in the list.
References sgetval().
void ParmParse::get | ( | const char * | name, | |
std::string & | ref, | |||
int | ival = FIRST | |||
) | const |
int ParmParse::querykth | ( | const char * | name, | |
int | k, | |||
std::string & | ref, | |||
int | ival = FIRST | |||
) | const |
Similar to getkth() but returns 0 if there is no kth occurrence of name.
If successful, it returns 1 and stores the value in ref. If the kth occurrence exists, but ival'th value of that occurrence does not, or if there is a type mismatch, then the program signals an error and halts.
References squeryval().
int ParmParse::query | ( | const char * | name, | |
std::string & | ref, | |||
int | ival = FIRST | |||
) | const |
void ParmParse::getkth | ( | const char * | name, | |
int | k, | |||
IntVect & | ref, | |||
int | ival = FIRST | |||
) | const |
Get the ival'th value of kth occurrence of the requested name.
If successful, the value is converted to an IntVect and stored in reference ref. If the kth occurrence does not exist or ival'th value does not exist, or if the printed representation of the value cannot be converted to a IntVect, an error message is output and the program halts. Note that ival = 0 is the first value in the list.
References sgetval().
void ParmParse::get | ( | const char * | name, | |
IntVect & | ref, | |||
int | ival = FIRST | |||
) | const |
int ParmParse::querykth | ( | const char * | name, | |
int | k, | |||
IntVect & | ref, | |||
int | ival = FIRST | |||
) | const |
Similar to getkth() but returns 0 if there is no kth occurrence of name.
If successful, it returns 1 and stores the value in ref. If the kth occurrence exists, but ival'th value of that occurrence does not, or if there is a type mismatch, then the program signals an error and halts.
References squeryval().
int ParmParse::query | ( | const char * | name, | |
IntVect & | ref, | |||
int | ival = FIRST | |||
) | const |
void ParmParse::getkth | ( | const char * | name, | |
int | k, | |||
Box & | ref, | |||
int | ival = FIRST | |||
) | const |
Get the ival'th value of kth occurrence of the requested name.
If successful, the value is converted to a Box and stored in reference ref. If the kth occurrence does not exist or ival'th value does not exist, or if the printed representation of the value cannot be converted to a Box, an error message is output and the program halts. Note that ival = 0 is the first value in the list.
References sgetval().
void ParmParse::get | ( | const char * | name, | |
Box & | ref, | |||
int | ival = FIRST | |||
) | const |
int ParmParse::querykth | ( | const char * | name, | |
int | k, | |||
Box & | ref, | |||
int | ival = FIRST | |||
) | const |
Similar to getkth() but returns 0 if there is no kth occurrence of name.
If successful, it returns 1 and stores the value in ref. If the kth occurrence exists, but ival'th value of that occurrence does not, or if there is a type mismatch, then the program signals an error and halts.
References squeryval().
int ParmParse::query | ( | const char * | name, | |
Box & | ref, | |||
int | ival = FIRST | |||
) | const |
void ParmParse::getktharr | ( | const char * | name, | |
int | k, | |||
std::vector< int > & | ref, | |||
int | start_ix = FIRST , |
|||
int | num_val = ALL | |||
) | const |
Gets an std::vector<int> of num values from kth occurrence of given name.
If successful, the values are converted to an int and stored in the std::vector<int> object ref. ref is resized (if necessary) to hold num values. The value in the list indexed by start is copied into std::vector<int>[0], std::vector<int>[1] holds start+1, etc. If the kth occurrence does not exist or there are fewer than start + num values associated with the kth occurrence, or if some of the values cannot be converted to an int, an error message is reported and the program halts.
References sgetarr().
void ParmParse::getarr | ( | const char * | name, | |
std::vector< int > & | ref, | |||
int | start_ix = FIRST , |
|||
int | num_val = ALL | |||
) | const |
int ParmParse::queryktharr | ( | const char * | name, | |
int | k, | |||
std::vector< int > & | ref, | |||
int | start_ix = FIRST , |
|||
int | num_val = ALL | |||
) | const |
int ParmParse::queryarr | ( | const char * | name, | |
std::vector< int > & | ref, | |||
int | start_ix = FIRST , |
|||
int | num_val = ALL | |||
) | const |
void ParmParse::getktharr | ( | const char * | name, | |
int | k, | |||
std::vector< float > & | ref, | |||
int | start_ix = FIRST , |
|||
int | num_val = ALL | |||
) | const |
Gets an std::vector<float> of num values from kth occurrence of given name.
If successful, the values are converted to a float and stored in the std::vector<float> object ref. ref is resized (if necessary) to hold num values. The value in the list indexed by start is copied into std::vector<float>[0], std::vector<float>[1] holds start+1, etc. If the kth occurrence does not exist or there are fewer than start + num values associated with the kth occurrence, or if some of the values cannot be converted to a float, an error message is reported and the program halts.
References sgetarr().
void ParmParse::getarr | ( | const char * | name, | |
std::vector< float > & | ref, | |||
int | start_ix = FIRST , |
|||
int | num_val = ALL | |||
) | const |
int ParmParse::queryktharr | ( | const char * | name, | |
int | k, | |||
std::vector< float > & | ref, | |||
int | start_ix = FIRST , |
|||
int | num_val = ALL | |||
) | const |
int ParmParse::queryarr | ( | const char * | name, | |
std::vector< float > & | ref, | |||
int | start_ix = FIRST , |
|||
int | num_val = ALL | |||
) | const |
void ParmParse::getktharr | ( | const char * | name, | |
int | k, | |||
std::vector< double > & | ref, | |||
int | start_ix = FIRST , |
|||
int | num_val = ALL | |||
) | const |
Gets an std::vector<double> of num values from kth occurrence of given name.
If successful, the values are converted to a double and stored in the std::vector<double> object ref. ref is resized (if necessary) to hold num values. The value in the list indexed by start is copied into std::vector<double>[0], std::vector<double>[1] holds start+1, etc. If the kth occurrence does not exist or there are fewer than start + num values associated with the kth occurrence, or if some of the values cannot be converted to a double, an error message is reported and the program halts.
References sgetarr().
void ParmParse::getarr | ( | const char * | name, | |
std::vector< double > & | ref, | |||
int | start_ix = FIRST , |
|||
int | num_val = ALL | |||
) | const |
int ParmParse::queryktharr | ( | const char * | name, | |
int | k, | |||
std::vector< double > & | ref, | |||
int | start_ix = FIRST , |
|||
int | num_val = ALL | |||
) | const |
int ParmParse::queryarr | ( | const char * | name, | |
std::vector< double > & | ref, | |||
int | start_ix = FIRST , |
|||
int | num_val = ALL | |||
) | const |
void ParmParse::getktharr | ( | const char * | name, | |
int | k, | |||
std::vector< std::string > & | ref, | |||
int | start_ix = FIRST , |
|||
int | num_val = ALL | |||
) | const |
Gets an std::vector<std::string> of num values from kth occurrence of given name.
If successful, the values are converted to an std::string and stored in the std::vector<std::string> object ref. ref is resized (if necessary) to hold num values. The value in the list indexed by start is copied into std::vector<std::string>[0], std::vector<std::string>[1] holds start+1, etc. If the kth occurrence does not exist or there are fewer than start + num values associated with the kth occurrence, or if some of the values cannot be converted to an std::string, an error message is reported and the program halts.
References sgetarr().
void ParmParse::getarr | ( | const char * | name, | |
std::vector< std::string > & | ref, | |||
int | start_ix = FIRST , |
|||
int | num_val = ALL | |||
) | const |
int ParmParse::queryktharr | ( | const char * | name, | |
int | k, | |||
std::vector< std::string > & | ref, | |||
int | start_ix = FIRST , |
|||
int | num_val = ALL | |||
) | const |
int ParmParse::queryarr | ( | const char * | name, | |
std::vector< std::string > & | ref, | |||
int | start_ix = FIRST , |
|||
int | num_val = ALL | |||
) | const |
void ParmParse::getktharr | ( | const char * | name, | |
int | k, | |||
std::vector< IntVect > & | ref, | |||
int | start_ix = FIRST , |
|||
int | num_val = ALL | |||
) | const |
Gets an std::vector<IntVect> of num values from kth occurrence of given name.
If successful, the values are converted to an IntVect and stored in the std::vector<IntVect> object ref. ref is resized (if necessary) to hold num values. The value in the list indexed by start is copied into std::vector<IntVect>[0], std::vector<IntVect>[1] holds start+1, etc. If the kth occurrence does not exist or there are fewer than start + num values associated with the kth occurrence, or if some of the values cannot be converted to an IntVect, an error message is reported and the program halts.
References sgetarr().
void ParmParse::getarr | ( | const char * | name, | |
std::vector< IntVect > & | ref, | |||
int | start_ix = FIRST , |
|||
int | num_val = ALL | |||
) | const |
int ParmParse::queryktharr | ( | const char * | name, | |
int | k, | |||
std::vector< IntVect > & | ref, | |||
int | start_ix = FIRST , |
|||
int | num_val = ALL | |||
) | const |
int ParmParse::queryarr | ( | const char * | name, | |
std::vector< IntVect > & | ref, | |||
int | start_ix = FIRST , |
|||
int | num_val = ALL | |||
) | const |
void ParmParse::getktharr | ( | const char * | name, | |
int | k, | |||
std::vector< Box > & | ref, | |||
int | start_ix = FIRST , |
|||
int | num_val = ALL | |||
) | const |
Gets an std::vector<Box> of num values from kth occurrence of given name.
If successful, the values are converted to an Box and stored in the std::vector<Box> object ref. ref is resized (if necessary) to hold num values. The value in the list indexed by start is copied into std::vector<Box>[0], std::vector<Box>[1] holds start+1, etc. If the kth occurrence does not exist or there are fewer than start + num values associated with the kth occurrence, or if some of the values cannot be converted to an Box, an error message is reported and the program halts.
References sgetarr().
void ParmParse::getarr | ( | const char * | name, | |
std::vector< Box > & | ref, | |||
int | start_ix = FIRST , |
|||
int | num_val = ALL | |||
) | const |
int ParmParse::queryktharr | ( | const char * | name, | |
int | k, | |||
std::vector< Box > & | ref, | |||
int | start_ix = FIRST , |
|||
int | num_val = ALL | |||
) | const |
int ParmParse::queryarr | ( | const char * | name, | |
std::vector< Box > & | ref, | |||
int | start_ix = FIRST , |
|||
int | num_val = ALL | |||
) | const |
void ParmParse::Initialize | ( | int | argc, | |
char ** | argv, | |||
const char * | parfile | |||
) | [static] |
Construct an initial ParmParse object from the argc and argv passed in to main().
An error will be signalled if another ParmParse object currently exists. If parfile is specified, read the parameters in from that file first and then append those derived from argv to the table. If prefix is specified, load this string as the code prefix for this particular ParmParse object.
References BoxLib::Error(), g_table, initialized, and ppinit().
Referenced by BoxLib::Initialize().
void ParmParse::Finalize | ( | ) | [static] |
The destructor.
The internal static table will only be deleted if there are no other ParmParse objects in existence.
References finalize_table(), g_table, ParallelDescriptor::IOProcessor(), and unused_table_entries_q().
Referenced by BoxLib::Finalize().
friend class Frame [friend] |
friend class Record [friend] |
Referenced by getRecord().