Function operator[]

Summary

#include <src/c4/yml/tree.hpp>

(1) NodeRef operator[](csubstr key)

(2) NodeRef const operator[](csubstr key) const

(3) NodeRef operator[](size_t i)

(4) NodeRef const operator[](size_t i) const

Function overload

Synopsis

#include <src/c4/yml/tree.hpp>

NodeRef operator[](csubstr key)

Description

find a root child by name, return it as a NodeRef

Note
requires the root to be a map.

Source

Line 533 in src/c4/yml/tree.hpp.

Synopsis

#include <src/c4/yml/tree.hpp>

NodeRef const operator[](csubstr key) const

Description

find a root child by name, return it as a NodeRef

Note
requires the root to be a map.

Source

Line 536 in src/c4/yml/tree.hpp.

Synopsis

#include <src/c4/yml/tree.hpp>

NodeRef operator[](size_t i)

Description

find a root child by index: return the root node's i-th child as a NodeRef

Note
@i is NOT the node id, but the child's position

Source

Line 540 in src/c4/yml/tree.hpp.

Synopsis

#include <src/c4/yml/tree.hpp>

NodeRef const operator[](size_t i) const

Description

find a root child by index: return the root node's i-th child as a NodeRef

Note
@i is NOT the node id, but the child's position

Source

Line 543 in src/c4/yml/tree.hpp.






Add Discussion as Guest

Log in