class Gambit::IniParser::Parser

Inifile parser base class.

#include <yaml_parser_base.hpp>

Inherited by Gambit::IniParser::IniFile

Public Functions

Name
YAML::NodegetParametersNode() const
YAML::NodegetPriorsNode() const
YAML::NodegetPrinterNode() const
YAML::NodegetScannerNode() const
YAML::NodegetLoggerNode() const
YAML::NodegetKeyValuePairNode() const
template <typename… args>
bool
hasKey(args… keys) const
template <typename TYPE ,typename… args>
TYPE
getValue(args… keys) const
template <typename TYPE ,typename… args>
TYPE
getValueOrDef(TYPE def, const args &… keys) const
template <typename TYPE >
TYPE
getModelParameterEntry(str model, str param, str key) const
boolhasModelParameterEntry(str model, str param, str key) const
const std::set< str >getModelNames() const
Return list of model names (without “adhoc” model!)
const std::vector< str >getModelParameters(str model) const
const OptionsgetOptions(str key) const
Getter for options.
virtual voidreadFile(str filename)
Read in the YAML file.
YAML::NodegetYAMLNode() const
Getter for the full YAML node.

Protected Functions

Name
YAML::Nodefilename_to_node(str filename)
Read in the actual YAML file.
voidbasicParse(YAML::Node root, str filename)
Do the basic parsing of the YAML file.
voidprintNode(YAML::Node node, str filename, bool replace_yaml_file)
Print a node to file.

Public Functions Documentation

function getParametersNode

YAML::Node getParametersNode() const

Getters for key/value section

function getPriorsNode

YAML::Node getPriorsNode() const

function getPrinterNode

YAML::Node getPrinterNode() const

function getScannerNode

YAML::Node getScannerNode() const

function getLoggerNode

YAML::Node getLoggerNode() const

function getKeyValuePairNode

YAML::Node getKeyValuePairNode() const

function hasKey

template <typename... args>
inline bool hasKey(
    args... keys
) const

function getValue

template <typename TYPE ,
typename... args>
inline TYPE getValue(
    args... keys
) const

function getValueOrDef

template <typename TYPE ,
typename... args>
inline TYPE getValueOrDef(
    TYPE def,
    const args &... keys
) const

function getModelParameterEntry

template <typename TYPE >
inline TYPE getModelParameterEntry(
    str model,
    str param,
    str key
) const

Getters for model/parameter section

function hasModelParameterEntry

bool hasModelParameterEntry(
    str model,
    str param,
    str key
) const

Getters for model/parameter section

function getModelNames

const std::set< str > getModelNames() const

Return list of model names (without “adhoc” model!)

function getModelParameters

const std::vector< str > getModelParameters(
    str model
) const

function getOptions

const Options getOptions(
    str key
) const

Getter for options.

function readFile

virtual void readFile(
    str filename
)

Read in the YAML file.

Reimplemented by: Gambit::IniParser::IniFile::readFile

function getYAMLNode

YAML::Node getYAMLNode() const

Getter for the full YAML node.

Getter for the full YAML Node.

Protected Functions Documentation

function filename_to_node

YAML::Node filename_to_node(
    str filename
)

Read in the actual YAML file.

function basicParse

void basicParse(
    YAML::Node root,
    str filename
)

Do the basic parsing of the YAML file.

function printNode

void printNode(
    YAML::Node node,
    str filename,
    bool replace_yaml_file
)

Print a node to file.

Print a yaml node to file.


Updated on 2024-07-18 at 13:53:31 +0000