Gambit::IniParser::Parser Class Reference Inifile parser base class. More...
Inheritance diagram for Gambit::IniParser::Parser:
![]()
Detailed DescriptionInifile parser base class. Definition at line 48 of file yaml_parser_base.hpp. Member Function Documentation◆ basicParse()Do the basic parsing of the YAML file. Definition at line 154 of file yaml_parser_base.cpp. References Gambit::Utils::ensure_path_exists(), hasKey(), Gambit::IniParser::inifile_error(), Gambit::Logging::LogMaster::initialise(), keyValuePairNode, LOCAL_INFO, Gambit::logger(), logNode, parametersNode, printerNode, priorsNode, Gambit::IniParser::recursiveImport(), scannerNode, and Gambit::Logging::LogMaster::set_log_debug_messages(). Referenced by getModelParameterEntry(), readFile(), and Gambit::IniParser::IniFile::readFile(). 187 // Postprocessor is currently incompatible with 'print_timing_data', so need to pass this option on for checking 191 scannerNode["model_invalid_for_lnlike_below"] = getValueOrDef<double>(0.9*std::numeric_limits<double>::lowest(), "likelihood", "model_invalid_for_lnlike_below"); 200 for (iter = exception::all_exceptions().begin(); iter != exception::all_exceptions().end(); ++iter) 217 str error_msg = "Unrecognised entry \"" + value + "\" for exceptions key \"" + iter->first + "\" in input file."; YAML::Node parametersNode Definition: yaml_parser_base.hpp:116 void recursiveImport(const YAML::Node &node, const std::string &filename) Definition: yaml_parser_base.cpp:102 YAML::Node keyValuePairNode Definition: yaml_parser_base.hpp:115 void set_log_debug_messages(bool flag) Choose whether "Debug" tagged log messages will be ignored (i.e. not logged) Definition: logmaster.hpp:138 EXPORT_SYMBOLS Logging::LogMaster & logger() Function to retrieve a reference to the Gambit global log object. Definition: logger.cpp:95 EXPORT_SYMBOLS const str & ensure_path_exists(const str &) Ensure that a path exists (and then return the path, for chaining purposes) Definition: util_functions.cpp:227 void initialise(std::vector< std::pair< std::set< std::string >, std::string >> &) Function to construct loggers according to blueprint. Definition: logmaster.cpp:227
Here is the call graph for this function:
![]()
Here is the caller graph for this function:
![]() ◆ filename_to_node()
Read in the actual YAML file. Definition at line 135 of file yaml_parser_base.cpp. References Gambit::IniParser::inifile_error(), and LOCAL_INFO. Referenced by getModelParameterEntry(), readFile(), and Gambit::IniParser::IniFile::readFile().
Here is the call graph for this function:
![]()
Here is the caller graph for this function:
![]() ◆ getKeyValuePairNode()
Definition at line 299 of file yaml_parser_base.cpp. References keyValuePairNode. Referenced by Gambit::IniParser::IniFile::readFile(). YAML::Node keyValuePairNode Definition: yaml_parser_base.hpp:115
Here is the caller graph for this function:
![]() ◆ getLoggerNode()
Definition at line 298 of file yaml_parser_base.cpp. References logNode. Referenced by Gambit::IniParser::IniFile::readFile().
Here is the caller graph for this function:
![]() ◆ getModelNames()
Return list of model names (without "adhoc" model!) Definition at line 310 of file yaml_parser_base.cpp. References parametersNode. Referenced by getModelParameterEntry(), Gambit::Likelihood_Container_Factory::Likelihood_Container_Factory(), and main(). YAML::Node parametersNode Definition: yaml_parser_base.hpp:116
Here is the caller graph for this function:
![]() ◆ getModelParameterEntry()
template<typename TYPE >
Getters for model/parameter section. Definition at line 91 of file yaml_parser_base.hpp. References basicParse(), filename_to_node(), getModelNames(), getModelParameters(), getOptions(), hasModelParameterEntry(), Gambit::IniParser::inifile_error(), LOCAL_INFO, and parametersNode. 93 if (not parametersNode[model][param][key]) inifile_error().raise(LOCAL_INFO,model + "." + param + "." + key + "not found in inifile."); YAML::Node parametersNode Definition: yaml_parser_base.hpp:116
Here is the call graph for this function:
![]() ◆ getModelParameters()
Definition at line 321 of file yaml_parser_base.cpp. References parametersNode. Referenced by getModelParameterEntry(), and Gambit::Likelihood_Container_Factory::Likelihood_Container_Factory(). 326 for (YAML::const_iterator it = parametersNode[model].begin(); it!=parametersNode[model].end(); ++it) YAML::Node parametersNode Definition: yaml_parser_base.hpp:116
Here is the caller graph for this function:
![]() ◆ getOptions()Getter for options. Definition at line 335 of file yaml_parser_base.cpp. References hasKey(), and keyValuePairNode. Referenced by getModelParameterEntry(). YAML::Node keyValuePairNode Definition: yaml_parser_base.hpp:115
Here is the call graph for this function:
![]()
Here is the caller graph for this function:
![]() ◆ getParametersNode()
Getters for key/value section. Definition at line 294 of file yaml_parser_base.cpp. References parametersNode. Referenced by main(). YAML::Node parametersNode Definition: yaml_parser_base.hpp:116
Here is the caller graph for this function:
![]() ◆ getPrinterNode()
Definition at line 296 of file yaml_parser_base.cpp. References printerNode. Referenced by main(), and Gambit::IniParser::IniFile::readFile().
Here is the caller graph for this function:
![]() ◆ getPriorsNode()
Definition at line 295 of file yaml_parser_base.cpp. References priorsNode. Referenced by main().
Here is the caller graph for this function:
![]() ◆ getScannerNode()
Definition at line 297 of file yaml_parser_base.cpp. References scannerNode. Referenced by main(), and Gambit::IniParser::IniFile::readFile().
Here is the caller graph for this function:
![]() ◆ getValue()
template<typename TYPE , typename... args>
Definition at line 71 of file yaml_parser_base.hpp. References Gambit::getVariadicNode(), Gambit::IniParser::inifile_error(), keyValuePairNode, LOCAL_INFO, and Gambit::stringifyVariadic(). 74 if (not node) inifile_error().raise(LOCAL_INFO,"No inifile entry for [" + stringifyVariadic(keys...) + "]");
const std::string stringifyVariadic() Definition: variadic_functions.hpp:316 const YAML::Node getVariadicNode(const YAML::Node &node) Definition: yaml_variadic_functions.hpp:43 YAML::Node keyValuePairNode Definition: yaml_parser_base.hpp:115
Here is the call graph for this function:
![]() ◆ getValueOrDef()
template<typename TYPE , typename... args>
Definition at line 78 of file yaml_parser_base.hpp. References Gambit::LogTags::def, Gambit::getVariadicNode(), and keyValuePairNode. Referenced by Gambit::DRes::DependencyResolver::calcObsLike(), Gambit::DRes::DependencyResolver::generateTree(), main(), Gambit::DRes::DependencyResolver::resolveDependency(), Gambit::DRes::DependencyResolver::resolveDependencyFromRules(), and Gambit::DRes::DependencyResolver::solveRequirement(). const YAML::Node getVariadicNode(const YAML::Node &node) Definition: yaml_variadic_functions.hpp:43 YAML::Node keyValuePairNode Definition: yaml_parser_base.hpp:115 Definition: log_tags.hpp:46
Here is the call graph for this function:
![]()
Here is the caller graph for this function:
![]() ◆ hasKey()
template<typename... args>
Definition at line 66 of file yaml_parser_base.hpp. References Gambit::getVariadicNode(), and keyValuePairNode. Referenced by basicParse(), and getOptions(). const YAML::Node getVariadicNode(const YAML::Node &node) Definition: yaml_variadic_functions.hpp:43 YAML::Node keyValuePairNode Definition: yaml_parser_base.hpp:115
Here is the call graph for this function:
![]()
Here is the caller graph for this function:
![]() ◆ hasModelParameterEntry()Getters for model/parameter section. Definition at line 304 of file yaml_parser_base.cpp. References parametersNode. Referenced by getModelParameterEntry(). YAML::Node parametersNode Definition: yaml_parser_base.hpp:116
Here is the caller graph for this function:
![]() ◆ readFile()Read in the YAML file. Reimplemented in Gambit::IniParser::IniFile. Definition at line 129 of file yaml_parser_base.cpp. References basicParse(), and filename_to_node(). Referenced by main(). void basicParse(YAML::Node, str) Do the basic parsing of the YAML file. Definition: yaml_parser_base.cpp:154
Here is the call graph for this function:
![]()
Here is the caller graph for this function:
![]() Member Data Documentation◆ keyValuePairNode
Definition at line 115 of file yaml_parser_base.hpp. Referenced by basicParse(), getKeyValuePairNode(), getOptions(), getValue(), getValueOrDef(), and hasKey(). ◆ logNode
Definition at line 120 of file yaml_parser_base.hpp. Referenced by basicParse(), getLoggerNode(), and Gambit::IniParser::IniFile::readFile(). ◆ parametersNode
Definition at line 116 of file yaml_parser_base.hpp. Referenced by basicParse(), getModelNames(), getModelParameterEntry(), getModelParameters(), getParametersNode(), and hasModelParameterEntry(). ◆ printerNode
Definition at line 118 of file yaml_parser_base.hpp. Referenced by basicParse(), getPrinterNode(), and Gambit::IniParser::IniFile::readFile(). ◆ priorsNode
Definition at line 117 of file yaml_parser_base.hpp. Referenced by basicParse(), and getPriorsNode(). ◆ scannerNode
Definition at line 119 of file yaml_parser_base.hpp. Referenced by basicParse(), and getScannerNode(). The documentation for this class was generated from the following files:
|