WarpX
Loading...
Searching...
No Matches
ParmParse Class Reference

Classes

struct  PP_entry
 

Public Types

typedef std::unordered_map< std::string, PP_entryTable
 

Public Member Functions

 ParmParse (std::string prefix=std::string(), std::string parser_prefix=std::string())
 
bool contains (std::string_view name) const
 
int countval (std::string_view name, int n=LAST) const
 
int countname (std::string_view name) const
 
void getkth (std::string_view name, int k, bool &ref, int ival=FIRST) const
 
void getkth (std::string_view name, int k, int &ref, int ival=FIRST) const
 
void getkth (std::string_view name, int k, long &ref, int ival=FIRST) const
 
void getkth (std::string_view name, int k, long long &ref, int ival=FIRST) const
 
void getkth (std::string_view name, int k, float &ref, int ival=FIRST) const
 
void getkth (std::string_view name, int k, double &ref, int ival=FIRST) const
 
void getkth (std::string_view name, int k, std::string &ref, int ival=FIRST) const
 
void getkth (std::string_view name, int k, IntVect &ref, int ival=FIRST) const
 
void getkth (std::string_view name, int k, Box &ref, int ival=FIRST) const
 
void get (std::string_view name, bool &ref, int ival=FIRST) const
 
void get (std::string_view name, int &ref, int ival=FIRST) const
 
void get (std::string_view name, long &ref, int ival=FIRST) const
 
void get (std::string_view name, long long &ref, int ival=FIRST) const
 
void get (std::string_view name, float &ref, int ival=FIRST) const
 
void get (std::string_view name, double &ref, int ival=FIRST) const
 
void get (std::string_view name, std::string &ref, int ival=FIRST) const
 
void get (std::string_view name, IntVect &ref, int ival=FIRST) const
 
void get (std::string_view name, Box &ref, int ival=FIRST) const
 
void get (std::string_view name, std::array< T, N > &ref) const
 
void get (const char *new_name, const char *old_name, T &ref)
 
void get (std::string_view name, T &ref, int ival=FIRST) const
 
int querykth (std::string_view name, int k, bool &ref, int ival=FIRST) const
 
int querykth (std::string_view name, int k, int &ref, int ival=FIRST) const
 
int querykth (std::string_view name, int k, long &ref, int ival=FIRST) const
 
int querykth (std::string_view name, int k, long long &ref, int ival=FIRST) const
 
int querykth (std::string_view name, int k, float &ref, int ival=FIRST) const
 
int querykth (std::string_view name, int k, double &ref, int ival=FIRST) const
 
int querykth (std::string_view name, int k, std::string &ref, int ival=FIRST) const
 
int querykth (std::string_view name, int k, IntVect &ref, int ival=FIRST) const
 
int querykth (std::string_view name, int k, Box &ref, int ival=FIRST) const
 
int query (std::string_view name, bool &ref, int ival=FIRST) const
 
int query (std::string_view name, int &ref, int ival=FIRST) const
 
int query (std::string_view name, long &ref, int ival=FIRST) const
 
int query (std::string_view name, long long &ref, int ival=FIRST) const
 
int query (std::string_view name, float &ref, int ival=FIRST) const
 
int query (std::string_view name, double &ref, int ival=FIRST) const
 
int query (std::string_view name, std::string &ref, int ival=FIRST) const
 
int query (std::string_view name, IntVect &ref, int ival=FIRST) const
 
int query (std::string_view name, Box &ref, int ival=FIRST) const
 
int query (std::string_view name, std::array< T, N > &ref) const
 
int query (const char *new_name, const char *old_name, T &ref)
 
int query (std::string_view name, T &ref, int ival=FIRST) const
 
void add (std::string_view name, bool val)
 
void add (std::string_view name, int val)
 
void add (std::string_view name, long val)
 
void add (std::string_view name, long long val)
 
void add (std::string_view name, float val)
 
void add (std::string_view name, double val)
 
void add (std::string_view name, const std::string &val)
 
void add (std::string_view name, const IntVect &val)
 
void add (std::string_view name, const Box &val)
 
void add (std::string_view name, T const &val)
 
void getline (std::string_view name, std::string &ref) const
 
int queryline (std::string_view name, std::string &ref) const
 
void getktharr (std::string_view name, int k, std::vector< int > &ref, int start_ix=FIRST, int num_val=ALL) const
 
void getktharr (std::string_view name, int k, std::vector< long > &ref, int start_ix=FIRST, int num_val=ALL) const
 
void getktharr (std::string_view name, int k, std::vector< long long > &ref, int start_ix=FIRST, int num_val=ALL) const
 
void getktharr (std::string_view name, int k, std::vector< float > &ref, int start_ix=FIRST, int num_val=ALL) const
 
void getktharr (std::string_view name, int k, std::vector< double > &ref, int start_ix=FIRST, int num_val=ALL) const
 
void getktharr (std::string_view name, int k, std::vector< std::string > &ref, int start_ix=FIRST, int num_val=ALL) const
 
void getktharr (std::string_view name, int k, std::vector< IntVect > &ref, int start_ix=FIRST, int num_val=ALL) const
 
void getktharr (std::string_view name, int k, std::vector< Box > &ref, int start_ix=FIRST, int num_val=ALL) const
 
void getarr (std::string_view name, std::vector< int > &ref, int start_ix=FIRST, int num_val=ALL) const
 
void getarr (std::string_view name, std::vector< long > &ref, int start_ix=FIRST, int num_val=ALL) const
 
void getarr (std::string_view name, std::vector< long long > &ref, int start_ix=FIRST, int num_val=ALL) const
 
void getarr (std::string_view name, std::vector< float > &ref, int start_ix=FIRST, int num_val=ALL) const
 
void getarr (std::string_view name, std::vector< double > &ref, int start_ix=FIRST, int num_val=ALL) const
 
void getarr (std::string_view name, std::vector< std::string > &ref, int start_ix=FIRST, int num_val=ALL) const
 
void getarr (std::string_view name, std::vector< IntVect > &ref, int start_ix=FIRST, int num_val=ALL) const
 
void getarr (std::string_view name, std::vector< Box > &ref, int start_ix=FIRST, int num_val=ALL) const
 
void getarr (std::string_view name, IntVect &ref) const
 
void getarr (std::string_view name, RealVect &ref) const
 
void getarr (std::string_view name, std::vector< T > &ref, int start_ix=FIRST, int num_val=ALL) const
 
int queryktharr (std::string_view name, int k, std::vector< int > &ref, int start_ix=FIRST, int num_val=ALL) const
 
int queryktharr (std::string_view name, int k, std::vector< long > &ref, int start_ix=FIRST, int num_val=ALL) const
 
int queryktharr (std::string_view name, int k, std::vector< long long > &ref, int start_ix=FIRST, int num_val=ALL) const
 
int queryktharr (std::string_view name, int k, std::vector< float > &ref, int start_ix=FIRST, int num_val=ALL) const
 
int queryktharr (std::string_view name, int k, std::vector< double > &ref, int start_ix=FIRST, int num_val=ALL) const
 
int queryktharr (std::string_view name, int k, std::vector< std::string > &ref, int start_ix=FIRST, int num_val=ALL) const
 
int queryktharr (std::string_view name, int k, std::vector< IntVect > &ref, int start_ix=FIRST, int num_val=ALL) const
 
int queryktharr (std::string_view name, int k, std::vector< Box > &ref, int start_ix=FIRST, int num_val=ALL) const
 
int queryarr (std::string_view name, std::vector< int > &ref, int start_ix=FIRST, int num_val=ALL) const
 
int queryarr (std::string_view name, std::vector< long > &ref, int start_ix=FIRST, int num_val=ALL) const
 
int queryarr (std::string_view name, std::vector< long long > &ref, int start_ix=FIRST, int num_val=ALL) const
 
int queryarr (std::string_view name, std::vector< float > &ref, int start_ix=FIRST, int num_val=ALL) const
 
int queryarr (std::string_view name, std::vector< double > &ref, int start_ix=FIRST, int num_val=ALL) const
 
int queryarr (std::string_view name, std::vector< std::string > &ref, int start_ix=FIRST, int num_val=ALL) const
 
int queryarr (std::string_view name, std::vector< IntVect > &ref, int start_ix=FIRST, int num_val=ALL) const
 
int queryarr (std::string_view name, std::vector< Box > &ref, int start_ix=FIRST, int num_val=ALL) const
 
int queryarr (std::string_view name, IntVect &ref) const
 
int queryarr (std::string_view name, RealVect &ref) const
 
int queryarr (std::string_view name, std::vector< T > &ref, int start_ix=FIRST, int num_val=ALL) const
 
void addarr (std::string_view name, const std::vector< int > &ref)
 
void addarr (std::string_view name, const std::vector< long > &ref)
 
void addarr (std::string_view name, const std::vector< long long > &ref)
 
void addarr (std::string_view name, const std::vector< float > &ref)
 
void addarr (std::string_view name, const std::vector< double > &ref)
 
void addarr (std::string_view name, const std::vector< std::string > &ref)
 
void addarr (std::string_view name, const std::vector< IntVect > &ref)
 
void addarr (std::string_view name, const std::vector< Box > &ref)
 
int queryAdd (std::string_view name, T &ref)
 
int queryAdd (std::string_view name, std::string &ref)
 
int queryAdd (std::string_view name, std::vector< T > &ref)
 
int queryAdd (std::string_view name, std::vector< T > &ref, int num_val)
 
int queryAdd (std::string_view name, std::array< T, N > &ref)
 
int queryWithParser (std::string_view name, bool &ref) const
 
int queryWithParser (std::string_view name, int &ref) const
 
int queryWithParser (std::string_view name, long &ref) const
 
int queryWithParser (std::string_view name, long long &ref) const
 
int queryWithParser (std::string_view name, float &ref) const
 
int queryWithParser (std::string_view name, double &ref) const
 
int queryarrWithParser (std::string_view name, int nvals, bool *ptr) const
 
int queryarrWithParser (std::string_view name, int nvals, int *ptr) const
 
int queryarrWithParser (std::string_view name, int nvals, long *ptr) const
 
int queryarrWithParser (std::string_view name, int nvals, long long *ptr) const
 
int queryarrWithParser (std::string_view name, int nvals, float *ptr) const
 
int queryarrWithParser (std::string_view name, int nvals, double *ptr) const
 
int queryarrWithParser (std::string_view name, int nvals, std::vector< T > &ref) const
 
int queryAddWithParser (std::string_view name, T &ref)
 
void getWithParser (std::string_view name, T &ref) const
 
void getarrWithParser (std::string_view name, int nvals, T *ptr) const
 
void getarrWithParser (std::string_view name, int nvals, std::vector< T > &ref) const
 
eval (std::string const &expr) const
 
int query_enum_case_insensitive (std::string_view name, T &ref, int ival=FIRST) const
 
void get_enum_case_insensitive (std::string_view name, T &ref, int ival=FIRST) const
 
int query_enum_sloppy (std::string_view name, T &ref, std::string_view const &ignores, int ival=FIRST) const
 
void get_enum_sloppy (std::string_view name, T &ref, std::string_view const &ignores, int ival=FIRST) const
 
int queryAsDouble (std::string_view name, T &ref) const
 
int queryarrAsDouble (std::string_view name, int nvals, T *ptr) const
 
void getAsDouble (std::string_view name, T &ref) const
 
void getarrAsDouble (std::string_view name, int nvals, T *ptr) const
 
int remove (std::string_view name)
 
Parser makeParser (std::string const &func, Vector< std::string > const &vars) const
 
IParser makeIParser (std::string const &func, Vector< std::string > const &vars) const
 
int querytable (std::string_view name, std::vector< std::vector< double > > &ref) const
 
int querytable (std::string_view name, std::vector< std::vector< float > > &ref) const
 
int querytable (std::string_view name, std::vector< std::vector< int > > &ref) const
 
void gettable (std::string_view name, std::vector< std::vector< T > > &ref) const
 
const Tabletable () const
 
std::string const & getPrefix () const
 
std::string prefixedName (std::string_view str) const
 

Static Public Member Functions

static void Initialize (int argc, char **argv, const char *parfile)
 
static void Initialize (int argc, char **argv, const std::string &parfile)
 
static void Finalize ()
 
static void SetParserPrefix (std::string a_prefix)
 
static int Verbose ()
 
static void SetVerbose (int v)
 
static void dumpTable (std::ostream &os, bool prettyPrint=false)
 
static void prettyPrintTable (std::ostream &os)
 
static void prettyPrintUnusedInputs (std::ostream &os)
 
static void prettyPrintUsedInputs (std::ostream &os)
 
static void addfile (std::string const &filename)
 
static bool QueryUnusedInputs ()
 
static bool hasUnusedInputs (const std::string &prefix=std::string())
 
static std::vector< std::string > getUnusedInputs (const std::string &prefix=std::string())
 
static std::set< std::string > getEntries (const std::string &prefix=std::string())
 

Public Attributes

 LAST
 
 FIRST
 
 ALL
 

Static Public Attributes

static std::string const FileKeyword
 
static std::string ParserPrefix
 

Protected Attributes

std::string m_prefix
 
std::string m_parser_prefix
 
Tablem_table
 

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