Function emitrs
Summary
#include <src/c4/yml/emit.hpp>
(1) template <class CharOwningContainer>
substr emitrs(Tree const &t, size_t id, CharOwningContainer *cont)
(2) template <class CharOwningContainer>
CharOwningContainer emitrs(Tree const &t, size_t id)
(3) template <class CharOwningContainer>
substr emitrs(Tree const &t, CharOwningContainer *cont)
(4) template <class CharOwningContainer>
CharOwningContainer emitrs(Tree const &t)
(5) template <class CharOwningContainer>
substr emitrs(NodeRef const &n, CharOwningContainer *cont)
(6) template <class CharOwningContainer>
CharOwningContainer emitrs(NodeRef const &n)
Function overload
Synopsis
#include <src/c4/yml/emit.hpp>
template <class CharOwningContainer>
substr emitrs(Tree const &t, size_t id, CharOwningContainer *cont)
Description
emit+resize: YAML to the given std::string/std::vector-like container, resizing it as needed to fit the emitted YAML.
Mentioned in
- Getting Started / Quick start
Source
Lines 252-264 in src/c4/yml/emit.hpp.
template<class CharOwningContainer>
substr emitrs(Tree const& t, size_t id, CharOwningContainer * cont)
{
substr buf = to_substr(*cont);
substr ret = emit(t, id, buf, /*error_on_excess*/false);
if(ret.str == nullptr && ret.len > 0)
{
cont->resize(ret.len);
buf = to_substr(*cont);
ret = emit(t, id, buf, /*error_on_excess*/true);
}
return ret;
}
Synopsis
#include <src/c4/yml/emit.hpp>
template <class CharOwningContainer>
CharOwningContainer emitrs(Tree const &t, size_t id)
Description
emit+resize: YAML to the given std::string/std::vector-like container, resizing it as needed to fit the emitted YAML.
Mentioned in
- Getting Started / Quick start
Source
Lines 283-289 in src/c4/yml/emit.hpp.
template<class CharOwningContainer>
CharOwningContainer emitrs(Tree const& t, size_t id)
{
CharOwningContainer c;
emitrs(t, id, &c);
return c;
}
Synopsis
#include <src/c4/yml/emit.hpp>
template <class CharOwningContainer>
substr emitrs(Tree const &t, CharOwningContainer *cont)
Description
emit+resize: YAML to the given std::string/std::vector-like container, resizing it as needed to fit the emitted YAML.
Mentioned in
- Getting Started / Quick start
Source
Lines 302-306 in src/c4/yml/emit.hpp.
template<class CharOwningContainer>
substr emitrs(Tree const& t, CharOwningContainer * cont)
{
return emitrs(t, t.root_id(), cont);
}
Synopsis
#include <src/c4/yml/emit.hpp>
template <class CharOwningContainer>
CharOwningContainer emitrs(Tree const &t)
Description
emit+resize: YAML to the given std::string/std::vector-like container, resizing it as needed to fit the emitted YAML.
Mentioned in
- Getting Started / Quick start
Source
Lines 317-323 in src/c4/yml/emit.hpp.
template<class CharOwningContainer>
CharOwningContainer emitrs(Tree const& t)
{
CharOwningContainer c;
emitrs(t, t.root_id(), &c);
return c;
}
Synopsis
#include <src/c4/yml/emit.hpp>
template <class CharOwningContainer>
substr emitrs(NodeRef const &n, CharOwningContainer *cont)
Description
emit+resize: YAML to the given std::string/std::vector-like container, resizing it as needed to fit the emitted YAML.
Mentioned in
- Getting Started / Quick start
Source
Lines 336-340 in src/c4/yml/emit.hpp.
template<class CharOwningContainer>
substr emitrs(NodeRef const& n, CharOwningContainer * cont)
{
return emitrs(*n.tree(), n.id(), cont);
}
Synopsis
#include <src/c4/yml/emit.hpp>
template <class CharOwningContainer>
CharOwningContainer emitrs(NodeRef const &n)
Description
emit+resize: YAML to the given std::string/std::vector-like container, resizing it as needed to fit the emitted YAML.
Mentioned in
- Getting Started / Quick start
Source
Lines 351-357 in src/c4/yml/emit.hpp.
template<class CharOwningContainer>
CharOwningContainer emitrs(NodeRef const& n)
{
CharOwningContainer c;
emitrs(*n.tree(), n.id(), &c);
return c;
}