1 #ifndef _C4_YML_TAG_HPP_
2 #define _C4_YML_TAG_HPP_
4 #ifndef _C4_YML_COMMON_HPP_
7 #ifndef _C4_YML_DETAIL_STACK_HPP_
8 #include <c4/yml/detail/stack.hpp>
14 C4_SUPPRESS_WARNING_MSVC_WITH_PUSH(4251)
24 #ifndef RYML_MAX_TAG_DIRECTIVES
26 #define RYML_MAX_TAG_DIRECTIVES 4
84 operator bool() const noexcept {
return resolved.len > 0; }
93 void clear() noexcept { m_entries.clear(); }
130 void clear() noexcept;
144 csubstr resolve(substr buf,
size_t *bufsz, csubstr tag,
id_type doc_id,
Location const& ymlloc,
Callbacks const& callbacks,
bool with_brackets=
true)
const;
150 Callbacks
const& callbacks, Location
const& ymlloc={},
151 bool with_brackets=
true);
155 C4_SUPPRESS_WARNING_MSVC_POP
Common utilities and infrastructure used by ryml.
#define RYML_NOEXCEPT
Conditionally expands to noexcept when RYML_USE_ASSERT is 0 and is empty otherwise.
csubstr from_tag_long(YamlTag_e tag)
bool is_valid_tag_handle(csubstr handle)
bool is_custom_tag(csubstr tag)
is a tag of the form !handle!tag?
csubstr normalize_tag_long(csubstr tag)
YamlTag_e
a bit mask for marking tags for types
size_t transform_tag(substr output, csubstr handle, csubstr prefix, csubstr tag, Callbacks const &callbacks, Location const &ymlloc, bool with_brackets)
returns the length of the transformed tag, or 0 to signal that the tag is local and cannot be resolve...
csubstr normalize_tag(csubstr tag)
uint16_t tag_bits
the integral type necessary to cover all the bits marking node tags
csubstr from_tag(YamlTag_e tag)
YamlTag_e to_tag(csubstr tag)
#define RYML_MAX_TAG_DIRECTIVES
the maximum number of tag directives in a Tree
@ TAG_SET
!!set Unordered set of non-equal values.
@ TAG_MERGE
!!merge Specify one or more mapping to be merged with the current one.
@ TAG_INT
!!float Mathematical integers.
@ TAG_SEQ
!!seq Sequence of arbitrary values.
@ TAG_NULL
!!null Devoid of value.
@ TAG_YAML
!!yaml Specify the default value of a mapping https://yaml.org/type/yaml.html
@ TAG_TIMESTAMP
!!timestamp A point in time https://yaml.org/type/timestamp.html
@ TAG_STR
!!str A sequence of zero or more Unicode characters.
@ TAG_BOOL
!!bool Mathematical Booleans.
@ TAG_MAP
!!map Unordered set of key: value pairs without duplicates.
@ TAG_BINARY
!!binary A sequence of zero or more octets (8 bit values).
@ TAG_PAIRS
!!pairs Ordered sequence of key: value pairs allowing duplicates.
@ TAG_VALUE
!!value Specify the default value of a mapping https://yaml.org/type/value.html
@ TAG_OMAP
!!omap Ordered sequence of key: value pairs without duplicates.
@ TAG_FLOAT
!!float Floating-point approximation to real numbers.
RYML_ID_TYPE id_type
The type of a node id in the YAML tree; to override the default type, define the macro RYML_ID_TYPE t...
(Undefined by default) Use shorter error message from checks/asserts: do not show the check condition...
A c-style callbacks class to customize behavior on errors or allocation.
holds a source or yaml file position, for example when an error is detected; See also location_format...
Accelerator structure to reduce memory requirements by enabling reuse of resolved tags.
detail::stack< Entry > Entries
LookupResult find(csubstr tag, id_type doc_id, id_type linear_threshold=Entries::sso_size) const noexcept
void add(csubstr tag, csubstr resolved, id_type doc_id, const_iterator pos) RYML_NOEXCEPT
id_type size() const noexcept
TagDirective const * begin() const noexcept
TagDirective const * end() const noexcept
id_type doc_id
ID of the target document.
bool redefines_qmrk() const noexcept
TagDirective const * begin() const noexcept
TagDirective * end() noexcept
TagDirectiveRange directives() const noexcept
TagDirective const * end() const noexcept