rapidyaml 0.15.2
parse and emit YAML, and do it fast
Loading...
Searching...
No Matches
IntsResult Struct Reference

Public Member Functions

void reset_yaml (c4::csubstr yaml_)
void resize_buffers (c4::yml::extra::evt_size esz, size_t arena_size)
void resize_buffers (c4::yml::extra::EventHandlerInts const &handler)

Public Attributes

std::vector< char > yaml = {}
 source buffer
std::vector< char > arena = {}
 arena to place out-of-source filtered scalars or tags
std::vector< evt_bitsevents = {}
 result buffer with events

Detailed Description

Definition at line 27 of file quickstart-ints.cpp.

Member Function Documentation

◆ reset_yaml()

void IntsResult::reset_yaml ( c4::csubstr yaml_)
inline

Definition at line 32 of file quickstart-ints.cpp.

33 {
34 yaml.assign(yaml_.begin(), yaml_.end());
35 }
std::vector< char > yaml
source buffer
iterator begin() noexcept
Definition substr.hpp:360
iterator end() noexcept
Definition substr.hpp:361

Referenced by IntsParser::parse_or_resize_and_then_parse().

◆ resize_buffers() [1/2]

void IntsResult::resize_buffers ( c4::yml::extra::evt_size esz,
size_t arena_size )
inline

Definition at line 36 of file quickstart-ints.cpp.

37 {
38 events.resize(static_cast<size_t>(esz));
39 arena.resize(arena_size);
40 }
std::vector< evt_bits > events
result buffer with events
std::vector< char > arena
arena to place out-of-source filtered scalars or tags

Referenced by IntsParser::parse_in_place(), IntsParser::parse_or_resize_and_then_parse(), and resize_buffers().

◆ resize_buffers() [2/2]

void IntsResult::resize_buffers ( c4::yml::extra::EventHandlerInts const & handler)
inline

Definition at line 41 of file quickstart-ints.cpp.

42 {
43 resize_buffers(handler.required_size_events(), handler.required_size_arena());
44 }
void resize_buffers(c4::yml::extra::evt_size esz, size_t arena_size)

Member Data Documentation

◆ yaml

std::vector<char> IntsResult::yaml = {}

source buffer

Definition at line 29 of file quickstart-ints.cpp.

29{}; ///< source buffer

Referenced by IntsParser::parse_or_resize_and_then_parse(), and reset_yaml().

◆ arena

std::vector<char> IntsResult::arena = {}

arena to place out-of-source filtered scalars or tags

Definition at line 30 of file quickstart-ints.cpp.

30{}; ///< arena to place out-of-source filtered scalars or tags

Referenced by IntsParser::parse_in_place(), and resize_buffers().

◆ events

std::vector<evt_bits> IntsResult::events = {}

result buffer with events

Definition at line 31 of file quickstart-ints.cpp.

31{}; ///< result buffer with events

Referenced by IntsParser::parse_in_place(), and resize_buffers().


The documentation for this struct was generated from the following file:
  • /home/docs/checkouts/readthedocs.org/user_builds/rapidyaml/checkouts/latest/samples/quickstart-ints.cpp