mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 12:41:17 +00:00
Merged aliases branch into trunk, changes r100:150
This commit is contained in:
@@ -38,6 +38,8 @@ namespace YAML
|
||||
const std::string CHAR_IN_ANCHOR = "illegal character found while scanning anchor";
|
||||
const std::string ZERO_INDENT_IN_BLOCK = "cannot set zero indentation for a block scalar";
|
||||
const std::string CHAR_IN_BLOCK = "unexpected character in block scalar";
|
||||
const std::string AMBIGUOUS_ANCHOR = "cannot assign the same alias to multiple nodes";
|
||||
const std::string UNKNOWN_ANCHOR = "the referenced anchor is not defined";
|
||||
|
||||
const std::string INVALID_SCALAR = "invalid scalar";
|
||||
const std::string KEY_NOT_FOUND = "key not found";
|
||||
|
@@ -66,6 +66,11 @@ namespace YAML
|
||||
const Node& operator [] (unsigned u) const;
|
||||
const Node& operator [] (int i) const;
|
||||
|
||||
// for anchors/aliases
|
||||
const Node *Identity() const { return m_pIdentity; }
|
||||
bool IsAlias() const { return m_alias; }
|
||||
bool IsReferenced() const { return m_referenced; }
|
||||
|
||||
// insertion
|
||||
friend std::ostream& operator << (std::ostream& out, const Node& node);
|
||||
|
||||
@@ -89,6 +94,8 @@ namespace YAML
|
||||
std::string m_anchor, m_tag;
|
||||
Content *m_pContent;
|
||||
bool m_alias;
|
||||
const Node *m_pIdentity;
|
||||
mutable bool m_referenced;
|
||||
};
|
||||
|
||||
// templated things we need to keep inline in the header
|
||||
|
Reference in New Issue
Block a user