#include <winstd.H>
#include <typeinfo>
#include <cstdlib>
#include <cstddef>
#include <cstdio>
#include <cstring>
#include <cctype>
#include <iostream>
#include <strstream>
#include <string>
#include <vector>
#include <list>
#include <BoxLib.H>
#include <ParmParse.H>
#include <ParallelDescriptor.H>
#include <Box.H>
#include <IntVect.H>
Defines | |
#define | ERROR_MESS |
Typedefs | |
typedef std::list < ParmParse::PP_entry > ::iterator | list_iterator |
typedef std::list < ParmParse::PP_entry > ::const_iterator | const_list_iterator |
Enumerations | |
enum | PType { pDefn, pValue, pEQ_sign, pOpenBracket, pCloseBracket, pEOF } |
enum | lexState { START, STRING, QUOTED_STRING, IDENTIFIER, LIST } |
Functions | |
std::ostream & | operator<< (std::ostream &os, const ParmParse::PP_entry &pp) |
template<class T> | |
bool | is (const std::string &str, T &val) |
template<> | |
bool | is (const std::string &str, std::string &val) |
template<> | |
bool | is (const std::string &str, bool &val) |
template<class T> | |
const char * | tok_name (const T &) |
template<class T> | |
const char * | tok_name (std::vector< T > &) |
void | eat_garbage (const char *&str) |
PType | getToken (const char *&str, char *ostr) |
static bool | ppfound (const std::string &keyword, const ParmParse::PP_entry &pe, bool recordQ) |
const ParmParse::PP_entry * | ppindex (const ParmParse::Table &table, int n, const std::string &name, bool recordQ) |
void | bldTable (const char *&str, std::list< ParmParse::PP_entry > &tab) |
static void | read_file (const char *fname, std::list< ParmParse::PP_entry > &tab) |
void | addDefn (std::string &def, std::list< std::string > &val, std::list< ParmParse::PP_entry > &tab) |
void | addTable (std::string &def, ParmParse::Table &val, std::list< ParmParse::PP_entry > &tab) |
void | bldTable (const char *&str, std::list< ParmParse::PP_entry > &tab) |
template<class T> | |
bool | squeryval (const ParmParse::Table &table, const std::string &name, T &ptr, int ival, int occurence) |
template<class T> | |
void | sgetval (const ParmParse::Table &table, const std::string &name, T &ptr, int ival, int occurence) |
bool | squeryarr (const ParmParse::Table &table, const std::string &name, std::vector< int > &ptr, int start_ix, int num_val, int occurence) |
void | sgetarr (const ParmParse::Table &table, const std::string &name, std::vector< int > &ptr, int start_ix, int num_val, int occurence) |
bool | squeryarr (const ParmParse::Table &table, const std::string &name, std::vector< float > &ptr, int start_ix, int num_val, int occurence) |
void | sgetarr (const ParmParse::Table &table, const std::string &name, std::vector< float > &ptr, int start_ix, int num_val, int occurence) |
bool | squeryarr (const ParmParse::Table &table, const std::string &name, std::vector< double > &ptr, int start_ix, int num_val, int occurence) |
void | sgetarr (const ParmParse::Table &table, const std::string &name, std::vector< double > &ptr, int start_ix, int num_val, int occurence) |
bool | squeryarr (const ParmParse::Table &table, const std::string &name, std::vector< std::string > &ptr, int start_ix, int num_val, int occurence) |
void | sgetarr (const ParmParse::Table &table, const std::string &name, std::vector< std::string > &ptr, int start_ix, int num_val, int occurence) |
bool | squeryarr (const ParmParse::Table &table, const std::string &name, std::vector< IntVect > &ptr, int start_ix, int num_val, int occurence) |
void | sgetarr (const ParmParse::Table &table, const std::string &name, std::vector< IntVect > &ptr, int start_ix, int num_val, int occurence) |
bool | squeryarr (const ParmParse::Table &table, const std::string &name, std::vector< Box > &ptr, int start_ix, int num_val, int occurence) |
void | sgetarr (const ParmParse::Table &table, const std::string &name, std::vector< Box > &ptr, int start_ix, int num_val, int occurence) |
void | ppinit (int argc, char **argv, const char *parfile, ParmParse::Table &table) |
bool | unused_table_entries_q (const ParmParse::Table &table) |
void | finalize_table (std::string pfx, const ParmParse::Table &table) |
Variables | |
ParmParse::Table | g_table |
const char *const | state_name [] |
bool | initialized = false |
#define ERROR_MESS |
Value:
ostr[k++] = '\0'; \ std::cerr << "ParmParse::getToken(): invalid string = " << ostr << '\n'; \ std::cerr << "STATE = " << state_name[state] \ << ", next char = " << ch << '\n'; \ std::cerr << ", rest of input = \n" << str << '\n'; \ BoxLib::Abort()
Referenced by getToken().
typedef std::list<ParmParse::PP_entry>::const_iterator const_list_iterator [static] |
typedef std::list<ParmParse::PP_entry>::iterator list_iterator [static] |
enum lexState |
enum PType |
void @50::addDefn | ( | std::string & | def, | |
std::list< std::string > & | val, | |||
std::list< ParmParse::PP_entry > & | tab | |||
) | [static] |
void @50::addTable | ( | std::string & | def, | |
ParmParse::Table & | val, | |||
std::list< ParmParse::PP_entry > & | tab | |||
) | [static] |
void @50::bldTable | ( | const char *& | str, | |
std::list< ParmParse::PP_entry > & | tab | |||
) | [static] |
References BoxLib::Abort(), addDefn(), addTable(), bldTable(), getToken(), pCloseBracket, pDefn, pEOF, pEQ_sign, pOpenBracket, and pValue.
void @50::bldTable | ( | const char *& | str, | |
std::list< ParmParse::PP_entry > & | tab | |||
) | [static] |
Referenced by bldTable(), ppinit(), and read_file().
void @50::eat_garbage | ( | const char *& | str | ) | [static] |
Referenced by getToken().
void @50::finalize_table | ( | std::string | pfx, | |
const ParmParse::Table & | table | |||
) | [static] |
Referenced by ParmParse::Finalize().
PType @50::getToken | ( | const char *& | str, | |
char * | ostr | |||
) | [static] |
References eat_garbage(), BoxLib::Error(), ERROR_MESS, IDENTIFIER, LIST, pCloseBracket, pDefn, pEOF, pEQ_sign, pOpenBracket, pValue, QUOTED_STRING, START, and STRING.
Referenced by bldTable().
bool @50::is | ( | const std::string & | str, | |
bool & | val | |||
) | [inline, static] |
References is().
bool @50::is | ( | const std::string & | str, | |
std::string & | val | |||
) | [inline, static] |
bool @50::is | ( | const std::string & | str, | |
T & | val | |||
) | [inline, static] |
Referenced by is(), squeryarr(), and squeryval().
std::ostream& operator<< | ( | std::ostream & | os, | |
const ParmParse::PP_entry & | pp | |||
) |
References BoxLib::Error(), ParmParse::PP_entry::m_name, and ParmParse::PP_entry::m_vals.
static bool @50::ppfound | ( | const std::string & | keyword, | |
const ParmParse::PP_entry & | pe, | |||
bool | recordQ | |||
) | [static] |
References ParmParse::PP_entry::m_name, and ParmParse::PP_entry::m_table.
Referenced by ParmParse::contains(), ParmParse::countname(), ParmParse::countRecords(), and ppindex().
const ParmParse::PP_entry* @50::ppindex | ( | const ParmParse::Table & | table, | |
int | n, | |||
const std::string & | name, | |||
bool | recordQ | |||
) | [static] |
References ParmParse::LAST, ParmParse::PP_entry::m_queried, and ppfound().
Referenced by ParmParse::countval(), ParmParse::getRecord(), squeryarr(), and squeryval().
void @50::ppinit | ( | int | argc, | |
char ** | argv, | |||
const char * | parfile, | |||
ParmParse::Table & | table | |||
) | [static] |
static void @50::read_file | ( | const char * | fname, | |
std::list< ParmParse::PP_entry > & | tab | |||
) | [static] |
void @50::@50::sgetarr | ( | const ParmParse::Table & | table, | |
const std::string & | name, | |||
std::vector< Box > & | ptr, | |||
int | start_ix, | |||
int | num_val, | |||
int | occurence | |||
) | [static] |
References BoxLib::Abort(), ParmParse::dumpTable(), and squeryarr().
void @50::@50::sgetarr | ( | const ParmParse::Table & | table, | |
const std::string & | name, | |||
std::vector< IntVect > & | ptr, | |||
int | start_ix, | |||
int | num_val, | |||
int | occurence | |||
) | [static] |
References BoxLib::Abort(), ParmParse::dumpTable(), and squeryarr().
void @50::@50::sgetarr | ( | const ParmParse::Table & | table, | |
const std::string & | name, | |||
std::vector< std::string > & | ptr, | |||
int | start_ix, | |||
int | num_val, | |||
int | occurence | |||
) | [static] |
References BoxLib::Abort(), ParmParse::dumpTable(), and squeryarr().
void @50::@50::sgetarr | ( | const ParmParse::Table & | table, | |
const std::string & | name, | |||
std::vector< double > & | ptr, | |||
int | start_ix, | |||
int | num_val, | |||
int | occurence | |||
) | [static] |
References BoxLib::Abort(), ParmParse::dumpTable(), and squeryarr().
void @50::@50::sgetarr | ( | const ParmParse::Table & | table, | |
const std::string & | name, | |||
std::vector< float > & | ptr, | |||
int | start_ix, | |||
int | num_val, | |||
int | occurence | |||
) | [static] |
References BoxLib::Abort(), ParmParse::dumpTable(), and squeryarr().
void @50::@50::sgetarr | ( | const ParmParse::Table & | table, | |
const std::string & | name, | |||
std::vector< int > & | ptr, | |||
int | start_ix, | |||
int | num_val, | |||
int | occurence | |||
) | [static] |
References BoxLib::Abort(), ParmParse::dumpTable(), and squeryarr().
Referenced by ParmParse::getarr(), and ParmParse::getktharr().
void @50::@50::sgetval | ( | const ParmParse::Table & | table, | |
const std::string & | name, | |||
T & | ptr, | |||
int | ival, | |||
int | occurence | |||
) | [inline, static] |
References BoxLib::Abort(), ParmParse::dumpTable(), and squeryval().
Referenced by ParmParse::get(), and ParmParse::getkth().
bool @50::@50::squeryarr | ( | const ParmParse::Table & | table, | |
const std::string & | name, | |||
std::vector< Box > & | ptr, | |||
int | start_ix, | |||
int | num_val, | |||
int | occurence | |||
) | [static] |
bool @50::@50::squeryarr | ( | const ParmParse::Table & | table, | |
const std::string & | name, | |||
std::vector< IntVect > & | ptr, | |||
int | start_ix, | |||
int | num_val, | |||
int | occurence | |||
) | [static] |
bool @50::@50::squeryarr | ( | const ParmParse::Table & | table, | |
const std::string & | name, | |||
std::vector< std::string > & | ptr, | |||
int | start_ix, | |||
int | num_val, | |||
int | occurence | |||
) | [static] |
bool @50::@50::squeryarr | ( | const ParmParse::Table & | table, | |
const std::string & | name, | |||
std::vector< double > & | ptr, | |||
int | start_ix, | |||
int | num_val, | |||
int | occurence | |||
) | [static] |
bool @50::@50::squeryarr | ( | const ParmParse::Table & | table, | |
const std::string & | name, | |||
std::vector< float > & | ptr, | |||
int | start_ix, | |||
int | num_val, | |||
int | occurence | |||
) | [static] |
bool @50::@50::squeryarr | ( | const ParmParse::Table & | table, | |
const std::string & | name, | |||
std::vector< int > & | ptr, | |||
int | start_ix, | |||
int | num_val, | |||
int | occurence | |||
) | [static] |
References BoxLib::Abort(), ParmParse::ALL, is(), ParmParse::LAST, ParmParse::PP_entry::m_name, ParmParse::PP_entry::m_vals, ppindex(), and tok_name().
Referenced by ParmParse::queryarr(), ParmParse::queryktharr(), and sgetarr().
bool @50::@50::squeryval | ( | const ParmParse::Table & | table, | |
const std::string & | name, | |||
T & | ptr, | |||
int | ival, | |||
int | occurence | |||
) | [inline, static] |
References BoxLib::Abort(), is(), ParmParse::LAST, ParmParse::PP_entry::m_name, ParmParse::PP_entry::m_vals, ppindex(), and tok_name().
Referenced by ParmParse::query(), ParmParse::querykth(), and sgetval().
const char* @50::tok_name | ( | std::vector< T > & | ) | [inline, static] |
References tok_name().
const char* @50::tok_name | ( | const T & | ) | [inline, static] |
Referenced by squeryarr(), squeryval(), and tok_name().
bool @50::unused_table_entries_q | ( | const ParmParse::Table & | table | ) | [static] |
Referenced by ParmParse::Finalize().
ParmParse::Table g_table [static] |
Referenced by ParmParse::dumpTable(), ParmParse::Finalize(), and ParmParse::Initialize().
bool initialized = false [static] |
Referenced by ParmParse::Initialize().
const char* const state_name[] [static] |
Initial value:
{ "START", "STRING", "QUOTED_STRING", "IDENTIFIER", "LIST" }