39 template <
typename T,
typename U>
41 std::ostringstream oss; oss << a << b;
_msg = oss.str();
44 template <
typename T,
typename U,
typename V>
46 std::ostringstream oss; oss << a << b << c;
_msg = oss.str();
50 virtual const char*
what()
const throw() {
return _msg.c_str(); }
97 const int size()
const {
return int(
_data.size()); }
107 const std::map<std::string, YamlNode*>&
getData()
const {
return _data; }
113 std::map<std::string, YamlNode*>
_data;
std::string _msg
Definition: yamlast.h:53
YamlException(const std::string &msg)
Definition: yamlast.h:36
YamlException(const char *msg)
Definition: yamlast.h:35
YamlException(const std::ostringstream &msg)
Definition: yamlast.h:37
YamlException(const T &a, const U &b)
Definition: yamlast.h:40
YamlException(const T &a, const U &b, const V &c)
Definition: yamlast.h:45
virtual const char * what() const
Definition: yamlast.h:50
virtual ~YamlException()
Definition: yamlast.h:49
Definition: yamlast.h:105
void add(const std::string &key, YamlNode *value)
Definition: yamlast.h:108
const std::map< std::string, YamlNode * > & getData() const
Definition: yamlast.h:107
virtual ~YamlMappingNode()
std::map< std::string, YamlNode * > _data
Definition: yamlast.h:113
const int size() const
Definition: yamlast.h:110
const YamlScalarType & getType() const
Definition: yamlast.h:79
float _floatDS
Definition: yamlast.h:74
const float & toFloat() const
Definition: yamlast.h:85
YamlScalarNode(const float &f)
Definition: yamlast.h:77
virtual ~YamlScalarNode()
Definition: yamlast.h:80
YamlScalarType
Definition: yamlast.h:66
@ FLOAT
Definition: yamlast.h:68
@ STRING
Definition: yamlast.h:67
YamlScalarNode(const std::string &s)
Definition: yamlast.h:78
YamlScalarType _tp
Definition: yamlast.h:72
std::string _strDS
Definition: yamlast.h:73
const std::string & toString() const
Definition: yamlast.h:81
virtual ~YamlSequenceNode()
std::vector< YamlNode * > _data
Definition: yamlast.h:101
const bool empty() const
Definition: yamlast.h:98
const std::vector< YamlNode * > & getData() const
Definition: yamlast.h:94
const int size() const
Definition: yamlast.h:97
void add(YamlNode *n)
Definition: yamlast.h:95
Definition: algorithm.h:28
YamlNode * parseYaml(FILE *, const std::string &fileString=std::string())