Alamo
Data Structures | Public Types | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Static Private Attributes | Friends
IO::ParmParse Class Reference

#include <ParmParse.H>

Inheritance diagram for IO::ParmParse:

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 InputNodeInputTree ()
 
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
 

Detailed Description

Definition at line 136 of file ParmParse.H.

Member Typedef Documentation

◆ ForwardArgStorage

template<typename Arg >
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.

◆ InputNode

Definition at line 139 of file ParmParse.H.

◆ TraversalBranchScope

Definition at line 199 of file ParmParse.H.

Constructor & Destructor Documentation

◆ ParmParse() [1/2]

IO::ParmParse::ParmParse ( std::string  arg)
inline

Definition at line 273 of file ParmParse.H.

◆ ParmParse() [2/2]

IO::ParmParse::ParmParse ( )
inline

Definition at line 274 of file ParmParse.H.

Member Function Documentation

◆ AllUnusedInputs()

static int IO::ParmParse::AllUnusedInputs ( )
inlinestatic

Definition at line 1740 of file ParmParse.H.

◆ AnyUnusedInputs()

int IO::ParmParse::AnyUnusedInputs ( bool  inscopeonly = true,
bool  verbose = false 
)
inline

Definition at line 1702 of file ParmParse.H.

◆ AppendSelectName()

template<typename T , typename... Args>
static void IO::ParmParse::AppendSelectName ( std::vector< std::string > &  names,
ForwardArgs< Args... > &   
)
inlinestaticprivate

Definition at line 237 of file ParmParse.H.

◆ ClearInputTree()

void IO::ParmParse::ClearInputTree ( )
static

Definition at line 32 of file ParmParse.cpp.

◆ ConstructSelectDefault()

template<typename T , typename... Args>
static T * IO::ParmParse::ConstructSelectDefault ( ForwardArgs< Args... > &  args)
inlinestaticprivate

Definition at line 224 of file ParmParse.H.

◆ ConstructSelected()

template<typename T , typename... Args>
static T * IO::ParmParse::ConstructSelected ( ForwardArgs< Args... > &  args,
ParmParse pp,
const std::string &  name 
)
inlinestaticprivate

Definition at line 202 of file ParmParse.H.

◆ contains()

bool IO::ParmParse::contains ( std::string  name,
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 318 of file ParmParse.H.

◆ Define()

void IO::ParmParse::Define ( )
inlineprivate

Definition at line 160 of file ParmParse.H.

◆ forbid()

void IO::ParmParse::forbid ( std::string  name,
std::string  explanation,
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 301 of file ParmParse.H.

◆ forward_args()

template<typename... Args>
static ForwardArgs< ForwardArgStorage< Args >... > IO::ParmParse::forward_args ( Args &&...  args)
inlinestatic

Definition at line 153 of file ParmParse.H.

◆ full()

std::string IO::ParmParse::full ( std::string  name)
inline

Definition at line 1758 of file ParmParse.H.

◆ getPrefix()

std::string IO::ParmParse::getPrefix ( ) const
inline

Definition at line 275 of file ParmParse.H.

◆ GetUnusedInputs()

std::vector< std::string > IO::ParmParse::GetUnusedInputs ( )
inline

Definition at line 1727 of file ParmParse.H.

◆ ignore()

void IO::ParmParse::ignore ( std::string  name,
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 276 of file ParmParse.H.

◆ IgnoreInTraversalMode()

bool IO::ParmParse::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

Definition at line 62 of file ParmParse.cpp.

◆ InputTree()

const ParmParse::InputNode & IO::ParmParse::InputTree ( )
static

Definition at line 26 of file ParmParse.cpp.

◆ InTraversalMode()

bool IO::ParmParse::InTraversalMode ( )
static

Definition at line 14 of file ParmParse.cpp.

◆ popPrefix()

void IO::ParmParse::popPrefix ( )
inline

Definition at line 291 of file ParmParse.H.

◆ prefix()

std::string IO::ParmParse::prefix ( )
inline

Definition at line 1754 of file ParmParse.H.

◆ PrintTraversalBranch()

void IO::ParmParse::PrintTraversalBranch ( std::string  name,
const std::string &  value 
)
private

Definition at line 71 of file ParmParse.cpp.

◆ pushPrefix()

void IO::ParmParse::pushPrefix ( const std::string  prefix)
inline

Definition at line 283 of file ParmParse.H.

◆ query()

template<typename T >
int IO::ParmParse::query ( std::string  name,
T &  value,
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 340 of file ParmParse.H.

◆ query_default() [1/4]

int IO::ParmParse::query_default ( std::string  name,
int &  value,
bool  defaultvalue,
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 937 of file ParmParse.H.

◆ query_default() [2/4]

int IO::ParmParse::query_default ( std::string  name,
std::string &  value,
const char *  defaultvalue,
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 917 of file ParmParse.H.

◆ query_default() [3/4]

template<typename T >
int IO::ParmParse::query_default ( std::string  name,
T &  value,
std::string  defaultvalue,
const Unit  type,
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 530 of file ParmParse.H.

◆ query_default() [4/4]

template<typename T >
int IO::ParmParse::query_default ( std::string  name,
T &  value,
defaultvalue,
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 492 of file ParmParse.H.

◆ query_enumerate()

template<typename T >
int IO::ParmParse::query_enumerate ( std::string  a_name,
std::vector< T > &  value,
int  number = 1,
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 1582 of file ParmParse.H.

◆ query_exactly()

template<int N>
void IO::ParmParse::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() 
)
inline

Definition at line 2326 of file ParmParse.H.

◆ query_file() [1/3]

int IO::ParmParse::query_file ( std::string  name,
std::string &  value,
bool  copyfile,
bool  checkfile,
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 961 of file ParmParse.H.

◆ query_file() [2/3]

int IO::ParmParse::query_file ( std::string  name,
std::string &  value,
bool  copyfile,
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 1012 of file ParmParse.H.

◆ query_file() [3/3]

int IO::ParmParse::query_file ( std::string  name,
std::string &  value,
std::source_location  loc = std::source_location::current() 
)
inline

Definition at line 1017 of file ParmParse.H.

◆ query_if()

template<typename Action >
int IO::ParmParse::query_if ( std::string  name,
Action &&  action,
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 817 of file ParmParse.H.

◆ query_if_else()

template<typename TrueAction , typename FalseAction >
int IO::ParmParse::query_if_else ( std::string  name,
TrueAction &&  true_action,
FalseAction &&  false_action,
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 862 of file ParmParse.H.

◆ query_required() [1/2]

template<typename T >
int IO::ParmParse::query_required ( std::string  name,
T &  value,
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 421 of file ParmParse.H.

◆ query_required() [2/2]

template<typename T >
int IO::ParmParse::query_required ( std::string  name,
T &  value,
const Unit  type,
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 456 of file ParmParse.H.

◆ query_switch()

int IO::ParmParse::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() 
)
inline

Definition at line 714 of file ParmParse.H.

◆ query_validate() [1/3]

int IO::ParmParse::query_validate ( std::string  name,
int &  value,
std::vector< int >  possibleintvals,
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 569 of file ParmParse.H.

◆ query_validate() [2/3]

int IO::ParmParse::query_validate ( std::string  name,
std::string &  value,
std::vector< const char * >  possiblecharvals,
bool  firstbydefault,
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 628 of file ParmParse.H.

◆ query_validate() [3/3]

int IO::ParmParse::query_validate ( std::string  name,
std::string &  value,
std::vector< const char * >  possiblecharvals,
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 694 of file ParmParse.H.

◆ queryarr() [1/4]

int IO::ParmParse::queryarr ( std::string  name,
Set::Matrix value,
Unit  unit = Unit::Less(),
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 1157 of file ParmParse.H.

◆ queryarr() [2/4]

int IO::ParmParse::queryarr ( std::string  name,
Set::Vector value,
Unit  unit = Unit::Less(),
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 1107 of file ParmParse.H.

◆ queryarr() [3/4]

int IO::ParmParse::queryarr ( std::string  name,
std::vector< Set::Scalar > &  value,
Unit  unit = Unit::Less(),
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 1046 of file ParmParse.H.

◆ queryarr() [4/4]

template<typename T >
int IO::ParmParse::queryarr ( std::string  name,
std::vector< T > &  value,
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 1024 of file ParmParse.H.

◆ queryarr_default() [1/6]

int IO::ParmParse::queryarr_default ( std::string  name,
Set::Matrix value,
Set::Matrix  def,
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 1399 of file ParmParse.H.

◆ queryarr_default() [2/6]

int IO::ParmParse::queryarr_default ( std::string  name,
Set::Vector value,
Set::Vector  defaultvalue,
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 1359 of file ParmParse.H.

◆ queryarr_default() [3/6]

int IO::ParmParse::queryarr_default ( std::string  name,
Set::Vector value,
std::string  defaultvalue,
Unit  unit,
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 1321 of file ParmParse.H.

◆ queryarr_default() [4/6]

int IO::ParmParse::queryarr_default ( std::string  name,
std::vector< double > &  value,
std::vector< double >  defaultvalue,
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 1439 of file ParmParse.H.

◆ queryarr_default() [5/6]

int IO::ParmParse::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() 
)
inline

Definition at line 1466 of file ParmParse.H.

◆ queryarr_default() [6/6]

int IO::ParmParse::queryarr_default ( std::string  name,
std::vector< std::string > &  value,
std::vector< std::string >  defaultvalue,
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 1303 of file ParmParse.H.

◆ queryarr_enumerate()

template<typename T >
int IO::ParmParse::queryarr_enumerate ( std::string  a_name,
std::vector< std::vector< T > > &  value,
int  number = 1,
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 1652 of file ParmParse.H.

◆ queryarr_required() [1/3]

int IO::ParmParse::queryarr_required ( std::string  name,
Set::Vector value,
Unit  unit = Unit::Less(),
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 1273 of file ParmParse.H.

◆ queryarr_required() [2/3]

int IO::ParmParse::queryarr_required ( std::string  name,
std::vector< Set::Scalar > &  value,
Unit  unit = Unit::Less(),
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 1242 of file ParmParse.H.

◆ queryarr_required() [3/3]

template<typename T >
int IO::ParmParse::queryarr_required ( std::string  name,
std::vector< T > &  value,
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 1223 of file ParmParse.H.

◆ queryclass() [1/4]

template<class T >
void IO::ParmParse::queryclass ( std::string  name,
T &  value,
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 1798 of file ParmParse.H.

◆ queryclass() [2/4]

template<class T >
void IO::ParmParse::queryclass ( std::string  name,
T *  value,
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 1767 of file ParmParse.H.

◆ queryclass() [3/4]

template<class T >
void IO::ParmParse::queryclass ( T &  value,
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 1854 of file ParmParse.H.

◆ queryclass() [4/4]

template<class T >
void IO::ParmParse::queryclass ( T *  value,
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 1834 of file ParmParse.H.

◆ queryclass_enumerate()

template<typename T >
int IO::ParmParse::queryclass_enumerate ( std::string  a_name,
std::vector< T > &  value,
int  number = 1,
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 1503 of file ParmParse.H.

◆ queryunit() [1/3]

int IO::ParmParse::queryunit ( std::string  name,
Set::Scalar value,
const Unit  type,
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 400 of file ParmParse.H.

◆ queryunit() [2/3]

int IO::ParmParse::queryunit ( std::string  name,
Unit value,
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 351 of file ParmParse.H.

◆ queryunit() [3/3]

int IO::ParmParse::queryunit ( std::string  name,
Unit value,
const Unit  type,
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 376 of file ParmParse.H.

◆ RecordConstraint()

void IO::ParmParse::RecordConstraint ( std::string  kind,
int  count,
std::vector< std::string >  members,
std::vector< std::string >  units,
const std::source_location &  location 
)
private

Definition at line 90 of file ParmParse.cpp.

◆ RecordInput()

void IO::ParmParse::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 
)
private

Definition at line 77 of file ParmParse.cpp.

◆ RecordInputAndContinue()

void IO::ParmParse::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() 
)
inlineprivate

Definition at line 186 of file ParmParse.H.

◆ select() [1/4]

template<typename... OBJ, typename CLASS >
requires (!std::is_pointer_v<std::remove_reference_t<CLASS>>)
void IO::ParmParse::select ( std::string  name,
CLASS &  value,
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 2194 of file ParmParse.H.

◆ select() [2/4]

template<typename... OBJ, typename CLASS , typename... Args>
requires (!std::is_pointer_v<std::remove_reference_t<CLASS>>)
void IO::ParmParse::select ( std::string  name,
CLASS &  value,
ForwardArgs< Args... >  args,
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 2207 of file ParmParse.H.

◆ select() [3/4]

template<typename... IC, typename PTRTYPE >
void IO::ParmParse::select ( std::string  name,
PTRTYPE *&  ic_eta,
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 1883 of file ParmParse.H.

◆ select() [4/4]

template<typename... IC, typename... Args, typename PTRTYPE >
void IO::ParmParse::select ( std::string  name,
PTRTYPE *&  ic_eta,
ForwardArgs< Args... >  args,
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 1891 of file ParmParse.H.

◆ select_default() [1/2]

template<typename FirstIC , typename... IC, typename PTRTYPE >
void IO::ParmParse::select_default ( std::string  name,
PTRTYPE *&  ic_eta,
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 1978 of file ParmParse.H.

◆ select_default() [2/2]

template<typename FirstIC , typename... IC, typename... Args, typename PTRTYPE >
void IO::ParmParse::select_default ( std::string  name,
PTRTYPE *&  ic_eta,
ForwardArgs< Args... >  args,
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 1986 of file ParmParse.H.

◆ select_enumerate() [1/2]

template<typename... IC, typename PTRTYPE >
void IO::ParmParse::select_enumerate ( std::string  a_name,
std::vector< PTRTYPE * > &  value,
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 2069 of file ParmParse.H.

◆ select_enumerate() [2/2]

template<typename... IC, typename... Args, typename PTRTYPE >
void IO::ParmParse::select_enumerate ( std::string  a_name,
std::vector< PTRTYPE * > &  value,
ForwardArgs< Args... >  args,
const std::source_location &  location = std::source_location::current() 
)
inline

Definition at line 2077 of file ParmParse.H.

◆ select_main()

template<typename... INTEGRATOR, typename... Args, typename PTRTYPE >
void IO::ParmParse::select_main ( PTRTYPE *&  ic_eta,
Args &&...  args 
)
inline

Definition at line 2153 of file ParmParse.H.

◆ select_only() [1/2]

template<typename INTEGRATOR , typename PTRTYPE >
void IO::ParmParse::select_only ( PTRTYPE *&  ic_eta)
inline

Definition at line 2181 of file ParmParse.H.

◆ select_only() [2/2]

template<typename INTEGRATOR , typename Args , typename PTRTYPE >
void IO::ParmParse::select_only ( PTRTYPE *&  ic_eta,
Args &&  args 
)
inline

Definition at line 2175 of file ParmParse.H.

◆ SetTraversalMode()

void IO::ParmParse::SetTraversalMode ( bool  enabled)
static

Definition at line 8 of file ParmParse.cpp.

◆ SetTraversalOutputFile()

void IO::ParmParse::SetTraversalOutputFile ( std::string  path)
static

Definition at line 38 of file ParmParse.cpp.

◆ ShouldExecute()

bool IO::ParmParse::ShouldExecute ( )
static

Definition at line 20 of file ParmParse.cpp.

◆ static_polymorphism_parser()

template<typename CLASS , int N, typename... OBJ, typename... Args>
void IO::ParmParse::static_polymorphism_parser ( CLASS &  value,
ForwardArgs< Args... > &  args 
)
inlineprivate

Definition at line 2281 of file ParmParse.H.

◆ static_polymorphism_traverser()

template<typename CLASS , int N, typename... OBJ, typename... Args>
void IO::ParmParse::static_polymorphism_traverser ( CLASS &  value,
ForwardArgs< Args... > &  args 
)
inlineprivate

Definition at line 2252 of file ParmParse.H.

◆ TraversalOutputFile()

const std::string & IO::ParmParse::TraversalOutputFile ( )
static

Definition at line 44 of file ParmParse.cpp.

◆ TrySelectNamed()

template<typename T , typename... Args, typename PTRTYPE >
static bool IO::ParmParse::TrySelectNamed ( const std::string &  type,
const std::string &  name,
PTRTYPE *&  value,
ForwardArgs< Args... > &  args,
ParmParse pp 
)
inlinestaticprivate

Definition at line 244 of file ParmParse.H.

◆ WriteInputTreeJson()

void IO::ParmParse::WriteInputTreeJson ( std::ostream &  os)
static

Definition at line 50 of file ParmParse.cpp.

◆ WriteInputTreeJsonFile()

void IO::ParmParse::WriteInputTreeJsonFile ( const std::string &  path)
static

Definition at line 56 of file ParmParse.cpp.

Friends And Related Symbol Documentation

◆ InputScraper

friend class InputScraper
friend

Definition at line 159 of file ParmParse.H.

Field Documentation

◆ checked_for_input_files

bool IO::ParmParse::checked_for_input_files = false
staticprivate

Definition at line 173 of file ParmParse.H.

◆ HasSelectedConstructor

template<typename T , typename... Args>
constexpr bool IO::ParmParse::HasSelectedConstructor
staticconstexprprivate
Initial value:
=
std::is_constructible_v<T, std::add_lvalue_reference_t<Args>...,
ParmParse &, std::string>

Definition at line 219 of file ParmParse.H.


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