|
Alamo
|
#include <ParmParse.H>
Data Structures | |
| struct | ForwardArgs |
| struct | HasSelectName |
| struct | HasSelectName< T, std::void_t< decltype(T::name)> > |
Public Types | |
| using | InputNode = InputScraper::InputNode |
| template<typename Arg > | |
| using | ForwardArgStorage = std::conditional_t< std::is_lvalue_reference_v< Arg >, Arg, std::remove_cvref_t< Arg > > |
Public Member Functions | |
| ParmParse (std::string arg) | |
| ParmParse () | |
| std::string | getPrefix () const |
| void | ignore (std::string name, const std::source_location &location=std::source_location::current()) |
| void | pushPrefix (const std::string prefix) |
| void | popPrefix () |
| void | forbid (std::string name, std::string explanation, const std::source_location &location=std::source_location::current()) |
| bool | contains (std::string name, const std::source_location &location=std::source_location::current()) |
| template<typename T > | |
| int | query (std::string name, T &value, const std::source_location &location=std::source_location::current()) |
| int | queryunit (std::string name, Unit &value, const std::source_location &location=std::source_location::current()) |
| int | queryunit (std::string name, Unit &value, const Unit type, const std::source_location &location=std::source_location::current()) |
| int | queryunit (std::string name, Set::Scalar &value, const Unit type, const std::source_location &location=std::source_location::current()) |
| template<typename T > | |
| int | query_required (std::string name, T &value, const std::source_location &location=std::source_location::current()) |
| template<typename T > | |
| int | query_required (std::string name, T &value, const Unit type, const std::source_location &location=std::source_location::current()) |
| template<typename T > | |
| int | query_default (std::string name, T &value, T defaultvalue, const std::source_location &location=std::source_location::current()) |
| template<typename T > | |
| int | query_default (std::string name, T &value, std::string defaultvalue, const Unit type, const std::source_location &location=std::source_location::current()) |
| int | query_validate (std::string name, int &value, std::vector< int > possibleintvals, const std::source_location &location=std::source_location::current()) |
| int | query_validate (std::string name, std::string &value, std::vector< const char * > possiblecharvals, bool firstbydefault, const std::source_location &location=std::source_location::current()) |
| int | query_validate (std::string name, std::string &value, std::vector< const char * > possiblecharvals, const std::source_location &location=std::source_location::current()) |
| int | query_switch (std::string name, std::initializer_list< std::pair< std::string, std::function< void()> > > cases, const std::source_location &location=std::source_location::current()) |
| template<typename Action > | |
| int | query_if (std::string name, Action &&action, const std::source_location &location=std::source_location::current()) |
| template<typename TrueAction , typename FalseAction > | |
| int | query_if_else (std::string name, TrueAction &&true_action, FalseAction &&false_action, const std::source_location &location=std::source_location::current()) |
| int | query_default (std::string name, std::string &value, const char *defaultvalue, const std::source_location &location=std::source_location::current()) |
| int | query_default (std::string name, int &value, bool defaultvalue, const std::source_location &location=std::source_location::current()) |
| int | query_file (std::string name, std::string &value, bool copyfile, bool checkfile, const std::source_location &location=std::source_location::current()) |
| int | query_file (std::string name, std::string &value, bool copyfile, const std::source_location &location=std::source_location::current()) |
| int | query_file (std::string name, std::string &value, std::source_location loc=std::source_location::current()) |
| template<typename T > | |
| int | queryarr (std::string name, std::vector< T > &value, const std::source_location &location=std::source_location::current()) |
| int | queryarr (std::string name, std::vector< Set::Scalar > &value, Unit unit=Unit::Less(), const std::source_location &location=std::source_location::current()) |
| int | queryarr (std::string name, Set::Vector &value, Unit unit=Unit::Less(), const std::source_location &location=std::source_location::current()) |
| int | queryarr (std::string name, Set::Matrix &value, Unit unit=Unit::Less(), const std::source_location &location=std::source_location::current()) |
| template<typename T > | |
| int | queryarr_required (std::string name, std::vector< T > &value, const std::source_location &location=std::source_location::current()) |
| int | queryarr_required (std::string name, std::vector< Set::Scalar > &value, Unit unit=Unit::Less(), const std::source_location &location=std::source_location::current()) |
| int | queryarr_required (std::string name, Set::Vector &value, Unit unit=Unit::Less(), const std::source_location &location=std::source_location::current()) |
| int | queryarr_default (std::string name, std::vector< std::string > &value, std::vector< std::string > defaultvalue, const std::source_location &location=std::source_location::current()) |
| int | queryarr_default (std::string name, Set::Vector &value, std::string defaultvalue, Unit unit, const std::source_location &location=std::source_location::current()) |
| int | queryarr_default (std::string name, Set::Vector &value, Set::Vector defaultvalue, const std::source_location &location=std::source_location::current()) |
| int | queryarr_default (std::string name, Set::Matrix &value, Set::Matrix def, const std::source_location &location=std::source_location::current()) |
| int | queryarr_default (std::string name, std::vector< double > &value, std::vector< double > defaultvalue, const std::source_location &location=std::source_location::current()) |
| int | queryarr_default (std::string name, std::vector< double > &value, std::vector< std::string > defaultvalue, Unit unit, const std::source_location &location=std::source_location::current()) |
| template<typename T > | |
| int | queryclass_enumerate (std::string a_name, std::vector< T > &value, int number=1, const std::source_location &location=std::source_location::current()) |
| template<typename T > | |
| int | query_enumerate (std::string a_name, std::vector< T > &value, int number=1, const std::source_location &location=std::source_location::current()) |
| template<typename T > | |
| int | queryarr_enumerate (std::string a_name, std::vector< std::vector< T > > &value, int number=1, const std::source_location &location=std::source_location::current()) |
| int | AnyUnusedInputs (bool inscopeonly=true, bool verbose=false) |
| std::vector< std::string > | GetUnusedInputs () |
| std::string | prefix () |
| std::string | full (std::string name) |
| template<class T > | |
| void | queryclass (std::string name, T *value, const std::source_location &location=std::source_location::current()) |
| template<class T > | |
| void | queryclass (std::string name, T &value, const std::source_location &location=std::source_location::current()) |
| template<class T > | |
| void | queryclass (T *value, const std::source_location &location=std::source_location::current()) |
| template<class T > | |
| void | queryclass (T &value, const std::source_location &location=std::source_location::current()) |
| template<typename... IC, typename PTRTYPE > | |
| void | select (std::string name, PTRTYPE *&ic_eta, const std::source_location &location=std::source_location::current()) |
| template<typename... IC, typename... Args, typename PTRTYPE > | |
| void | select (std::string name, PTRTYPE *&ic_eta, ForwardArgs< Args... > args, const std::source_location &location=std::source_location::current()) |
| template<typename FirstIC , typename... IC, typename PTRTYPE > | |
| void | select_default (std::string name, PTRTYPE *&ic_eta, const std::source_location &location=std::source_location::current()) |
| template<typename FirstIC , typename... IC, typename... Args, typename PTRTYPE > | |
| void | select_default (std::string name, PTRTYPE *&ic_eta, ForwardArgs< Args... > args, const std::source_location &location=std::source_location::current()) |
| template<typename... IC, typename PTRTYPE > | |
| void | select_enumerate (std::string a_name, std::vector< PTRTYPE * > &value, const std::source_location &location=std::source_location::current()) |
| template<typename... IC, typename... Args, typename PTRTYPE > | |
| void | select_enumerate (std::string a_name, std::vector< PTRTYPE * > &value, ForwardArgs< Args... > args, const std::source_location &location=std::source_location::current()) |
| template<typename... INTEGRATOR, typename... Args, typename PTRTYPE > | |
| void | select_main (PTRTYPE *&ic_eta, Args &&... args) |
| template<typename INTEGRATOR , typename Args , typename PTRTYPE > | |
| void | select_only (PTRTYPE *&ic_eta, Args &&args) |
| template<typename INTEGRATOR , typename PTRTYPE > | |
| void | select_only (PTRTYPE *&ic_eta) |
| template<typename... OBJ, typename CLASS > requires (!std::is_pointer_v<std::remove_reference_t<CLASS>>) | |
| void | select (std::string name, CLASS &value, const std::source_location &location=std::source_location::current()) |
| template<typename... OBJ, typename CLASS , typename... Args> requires (!std::is_pointer_v<std::remove_reference_t<CLASS>>) | |
| void | select (std::string name, CLASS &value, ForwardArgs< Args... > args, const std::source_location &location=std::source_location::current()) |
| template<int N> | |
| void | query_exactly (std::vector< std::string > names, std::pair< std::string, Set::Scalar > values[N], std::vector< Unit > units=std::vector< Unit >(), const std::source_location &location=std::source_location::current()) |
Static Public Member Functions | |
| template<typename... Args> | |
| static ForwardArgs< ForwardArgStorage< Args >... > | forward_args (Args &&... args) |
| static void | SetTraversalMode (bool enabled) |
| static bool | InTraversalMode () |
| static bool | ShouldExecute () |
| static const InputNode & | InputTree () |
| static void | ClearInputTree () |
| static void | SetTraversalOutputFile (std::string path) |
| static const std::string & | TraversalOutputFile () |
| static void | WriteInputTreeJson (std::ostream &os) |
| static void | WriteInputTreeJsonFile (const std::string &path) |
| static bool | IgnoreInTraversalMode (std::string note="This input parser is not yet compliant with traversal mode; its inputs are not fully documented.", const std::source_location &location=std::source_location::current()) |
| static int | AllUnusedInputs () |
Private Types | |
| using | TraversalBranchScope = InputScraper::TraversalBranchScope |
Private Member Functions | |
| void | Define () |
| void | RecordInput (std::string name, std::string directive, const std::source_location &location, std::vector< std::string > options={}, std::optional< std::string > default_value=std::nullopt, bool has_unnamed_default=false) |
| void | RecordConstraint (std::string kind, int count, std::vector< std::string > members, std::vector< std::string > units, const std::source_location &location) |
| void | PrintTraversalBranch (std::string name, const std::string &value) |
| void | RecordInputAndContinue (std::string name, const std::source_location &location, std::vector< std::string > options={}, std::optional< std::string > default_value=std::nullopt, bool has_unnamed_default=false, const std::source_location &handler_location=std::source_location::current()) |
| template<typename CLASS , int N, typename... OBJ, typename... Args> | |
| void | static_polymorphism_traverser (CLASS &value, ForwardArgs< Args... > &args) |
| template<typename CLASS , int N, typename... OBJ, typename... Args> | |
| void | static_polymorphism_parser (CLASS &value, ForwardArgs< Args... > &args) |
Static Private Member Functions | |
| template<typename T , typename... Args> | |
| static T * | ConstructSelected (ForwardArgs< Args... > &args, ParmParse &pp, const std::string &name) |
| template<typename T , typename... Args> | |
| static T * | ConstructSelectDefault (ForwardArgs< Args... > &args) |
| template<typename T , typename... Args> | |
| static void | AppendSelectName (std::vector< std::string > &names, ForwardArgs< Args... > &) |
| template<typename T , typename... Args, typename PTRTYPE > | |
| static bool | TrySelectNamed (const std::string &type, const std::string &name, PTRTYPE *&value, ForwardArgs< Args... > &args, ParmParse &pp) |
Static Private Attributes | |
| static bool | checked_for_input_files = false |
| template<typename T , typename... Args> | |
| static constexpr bool | HasSelectedConstructor |
Friends | |
| class | InputScraper |
Definition at line 136 of file ParmParse.H.
| using IO::ParmParse::ForwardArgStorage = std::conditional_t< std::is_lvalue_reference_v<Arg>, Arg, std::remove_cvref_t<Arg> > |
Definition at line 149 of file ParmParse.H.
Definition at line 139 of file ParmParse.H.
Definition at line 199 of file ParmParse.H.
|
inline |
Definition at line 273 of file ParmParse.H.
|
inline |
Definition at line 274 of file ParmParse.H.
|
inlinestatic |
Definition at line 1740 of file ParmParse.H.
|
inline |
Definition at line 1702 of file ParmParse.H.
|
inlinestaticprivate |
Definition at line 237 of file ParmParse.H.
|
static |
Definition at line 32 of file ParmParse.cpp.
|
inlinestaticprivate |
Definition at line 224 of file ParmParse.H.
|
inlinestaticprivate |
Definition at line 202 of file ParmParse.H.
|
inline |
Definition at line 318 of file ParmParse.H.
|
inlineprivate |
Definition at line 160 of file ParmParse.H.
|
inline |
Definition at line 301 of file ParmParse.H.
|
inlinestatic |
Definition at line 153 of file ParmParse.H.
|
inline |
Definition at line 1758 of file ParmParse.H.
|
inline |
Definition at line 275 of file ParmParse.H.
|
inline |
Definition at line 1727 of file ParmParse.H.
|
inline |
Definition at line 276 of file ParmParse.H.
|
static |
Definition at line 62 of file ParmParse.cpp.
|
static |
Definition at line 26 of file ParmParse.cpp.
|
static |
Definition at line 14 of file ParmParse.cpp.
|
inline |
Definition at line 291 of file ParmParse.H.
|
inline |
Definition at line 1754 of file ParmParse.H.
|
private |
Definition at line 71 of file ParmParse.cpp.
|
inline |
Definition at line 283 of file ParmParse.H.
|
inline |
Definition at line 340 of file ParmParse.H.
|
inline |
Definition at line 937 of file ParmParse.H.
|
inline |
Definition at line 917 of file ParmParse.H.
|
inline |
Definition at line 530 of file ParmParse.H.
|
inline |
Definition at line 492 of file ParmParse.H.
|
inline |
Definition at line 1582 of file ParmParse.H.
|
inline |
Definition at line 2326 of file ParmParse.H.
|
inline |
Definition at line 961 of file ParmParse.H.
|
inline |
Definition at line 1012 of file ParmParse.H.
|
inline |
Definition at line 1017 of file ParmParse.H.
|
inline |
Definition at line 817 of file ParmParse.H.
|
inline |
Definition at line 862 of file ParmParse.H.
|
inline |
Definition at line 421 of file ParmParse.H.
|
inline |
Definition at line 456 of file ParmParse.H.
|
inline |
Definition at line 714 of file ParmParse.H.
|
inline |
Definition at line 569 of file ParmParse.H.
|
inline |
Definition at line 628 of file ParmParse.H.
|
inline |
Definition at line 694 of file ParmParse.H.
|
inline |
Definition at line 1157 of file ParmParse.H.
|
inline |
Definition at line 1107 of file ParmParse.H.
|
inline |
Definition at line 1046 of file ParmParse.H.
|
inline |
Definition at line 1024 of file ParmParse.H.
|
inline |
Definition at line 1399 of file ParmParse.H.
|
inline |
Definition at line 1359 of file ParmParse.H.
|
inline |
Definition at line 1321 of file ParmParse.H.
|
inline |
Definition at line 1439 of file ParmParse.H.
|
inline |
Definition at line 1466 of file ParmParse.H.
|
inline |
Definition at line 1303 of file ParmParse.H.
|
inline |
Definition at line 1652 of file ParmParse.H.
|
inline |
Definition at line 1273 of file ParmParse.H.
|
inline |
Definition at line 1242 of file ParmParse.H.
|
inline |
Definition at line 1223 of file ParmParse.H.
|
inline |
Definition at line 1798 of file ParmParse.H.
|
inline |
Definition at line 1767 of file ParmParse.H.
|
inline |
Definition at line 1854 of file ParmParse.H.
|
inline |
Definition at line 1834 of file ParmParse.H.
|
inline |
Definition at line 1503 of file ParmParse.H.
|
inline |
Definition at line 400 of file ParmParse.H.
|
inline |
Definition at line 351 of file ParmParse.H.
|
inline |
Definition at line 376 of file ParmParse.H.
|
private |
Definition at line 90 of file ParmParse.cpp.
|
private |
Definition at line 77 of file ParmParse.cpp.
|
inlineprivate |
Definition at line 186 of file ParmParse.H.
|
inline |
Definition at line 2194 of file ParmParse.H.
|
inline |
Definition at line 2207 of file ParmParse.H.
|
inline |
Definition at line 1883 of file ParmParse.H.
|
inline |
Definition at line 1891 of file ParmParse.H.
|
inline |
Definition at line 1978 of file ParmParse.H.
|
inline |
Definition at line 1986 of file ParmParse.H.
|
inline |
Definition at line 2069 of file ParmParse.H.
|
inline |
Definition at line 2077 of file ParmParse.H.
|
inline |
Definition at line 2153 of file ParmParse.H.
|
inline |
Definition at line 2181 of file ParmParse.H.
|
inline |
Definition at line 2175 of file ParmParse.H.
|
static |
Definition at line 8 of file ParmParse.cpp.
|
static |
Definition at line 38 of file ParmParse.cpp.
|
static |
Definition at line 20 of file ParmParse.cpp.
|
inlineprivate |
Definition at line 2281 of file ParmParse.H.
|
inlineprivate |
Definition at line 2252 of file ParmParse.H.
|
static |
Definition at line 44 of file ParmParse.cpp.
|
inlinestaticprivate |
Definition at line 244 of file ParmParse.H.
|
static |
Definition at line 50 of file ParmParse.cpp.
|
static |
Definition at line 56 of file ParmParse.cpp.
|
friend |
Definition at line 159 of file ParmParse.H.
|
staticprivate |
Definition at line 173 of file ParmParse.H.
|
staticconstexprprivate |
Definition at line 219 of file ParmParse.H.