mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 12:41:17 +00:00
Added IsNull, IsScalar, IsSequence, IsMap functions, so you don't have to query Type()
This commit is contained in:
@@ -29,6 +29,10 @@ namespace YAML
|
||||
~Node();
|
||||
|
||||
NodeType::value Type() const;
|
||||
bool IsNull() const { return Type() == NodeType::Null; }
|
||||
bool IsScalar() const { return Type() == NodeType::Scalar; }
|
||||
bool IsSequence() const { return Type() == NodeType::Sequence; }
|
||||
bool IsMap() const { return Type() == NodeType::Map; }
|
||||
|
||||
// access
|
||||
template<typename T> const T as() const;
|
||||
|
Reference in New Issue
Block a user