Skip to content

YAMLNode

class YAMLNode

Node in a YAML document.

Variables

Name Description
contents Contents.

Functions

Name Description
has Does this have a given key?
isValue Is this a value?
isValue Is there a value at a given path?
isSequence Is this a sequence?
isSequence Is there a sequence at a given path?
isMapping Is this a mapping?
isMapping Is there a mapping at a given path?
value Get this as a value.
value Get this as a value.
value Get the value at a given path.
value Get the value at a given path.
sequence Get this as a sequence.
sequence Get this as a sequence.
sequence Get the sequence at a given path.
sequence Get the sequence at a given path.
mapping Get this as a mapping.
mapping Get this as a mapping.
mapping Get the mapping at a given path.
mapping Get the mapping at a given path.
set Set the value.
setSequence Set as a sequence.
setMapping Set as a mapping.
push For a sequence, push an uninitialized node onto the end and return it.
insert For a mapping, insert a key with an uninitialized value and return the value.

Variable Details

contents

variant_type contents

Contents.

Function Details

has

bool has(const key_type& key) const

Does this have a given key?

isValue

bool isValue() const

Is this a value?

template<class... Args> bool isValue(const key_type& key, Args&&... keys) const

Is there a value at a given path?

key
Key.
keys...
Keys.

isSequence

bool isSequence() const

Is this a sequence?

template<class... Args> bool isSequence(const key_type& key, Args&&... keys) const

Is there a sequence at a given path?

key
Key.
keys...
Keys.

isMapping

bool isMapping() const

Is this a mapping?

template<class... Args> bool isMapping(const key_type& key, Args&&... keys) const

Is there a mapping at a given path?

key
Key.
keys...
Keys.

value

value_type& value()

Get this as a value.

const value_type& value() const

Get this as a value.

template<class... Args> value_type& value(const key_type& key, Args&&... keys)

Get the value at a given path.

key
Key.
keys...
Keys.
Return
The value.

template<class... Args> const value_type& value(const key_type& key, Args&&... keys) const

Get the value at a given path.

key
Key.
keys...
Keys.
Return
The value.

sequence

sequence_type& sequence()

Get this as a sequence.

const sequence_type& sequence() const

Get this as a sequence.

template<class... Args> sequence_type& sequence(const key_type& key, Args&&... keys)

Get the sequence at a given path.

key
Key.
keys...
Keys.
Return
The sequence.

template<class... Args> const sequence_type& sequence(const key_type& key, Args&&... keys) const

Get the sequence at a given path.

key
Key.
keys...
Keys.
Return
The sequence.

mapping

mapping_type& mapping()

Get this as a mapping.

const mapping_type& mapping() const

Get this as a mapping.

template<class... Args> mapping_type& mapping(const key_type& key, Args&&... keys)

Get the mapping at a given path.

key
Key.
keys...
Keys.
Return
The mapping.

template<class... Args> const mapping_type& mapping(const key_type& key, Args&&... keys) const

Get the mapping at a given path.

key
Key.
keys...
Keys.
Return
The mapping.

set

void set(const variant_type& contents)

Set the value.

setSequence

void setSequence()

Set as a sequence.

setMapping

void setMapping()

Set as a mapping.

push

YAMLNode& push()

For a sequence, push an uninitialized node onto the end and return it.

insert

YAMLNode& insert(const key_type& key)

For a mapping, insert a key with an uninitialized value and return the value.