3 #ifndef SE2EZ_CORE_YAML_UTILITY_ 4 #define SE2EZ_CORE_YAML_UTILITY_ 8 #include <yaml-cpp/yaml.h> 20 bool isNode(
const YAML::Node &node);
26 Eigen::VectorXd
toVector(
const YAML::Node &node);
32 YAML::Node
toVector(
const Eigen::Ref<const Eigen::VectorXd> &vec);
41 template <
typename... Args>
44 const auto &mark = node.Mark();
46 log::format(
"[line: %1%][col: %2%] YAML Error: %3%", mark.line, mark.column, fmt);
Eigen::VectorXd toVector(const YAML::Node &node)
Convert a sequence of doubles in YAML to an Eigen vector.
void throwParsingError(const YAML::Node &node, const std::string &fmt, Args &&... args)
Convenience function to print out a YAML error message with line and column information.
std::string format(const std::string &fmt, Args &&... args)
bool isNode(const YAML::Node &node)
Returns true if node is a valid YAML node.