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(); }
128 bool redefines_qmrk() const noexcept;
130 void clear() noexcept;
150 Callbacks
const& callbacks, Location
const& ymlloc={},
151 bool with_brackets=
true);
155 C4_SUPPRESS_WARNING_MSVC_POP
bool is_valid_tag_handle(csubstr handle)
uint16_t tag_bits
the integral type necessary to cover all the bits marking node tags
detail::stack< Entry > Entries
TagDirective const * end() const noexcept
!!float Mathematical integers.
LookupResult find(csubstr tag, id_type doc_id, id_type linear_threshold=Entries::sso_size) const noexcept
!!bool Mathematical Booleans.
A c-style callbacks class to customize behavior on errors or allocation.
TagDirective * end() noexcept
TagDirective const * begin() const noexcept
a non-owning string-view, consisting of a character pointer and a length.
TagDirective const * begin() const noexcept
Accelerator structure to reduce memory requirements by enabling reuse of resolved tags...
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...
id_type size() const noexcept
!!merge Specify one or more mapping to be merged with the current one.
Common utilities and infrastructure used by ryml.
csubstr from_tag(YamlTag_e tag)
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...
TagDirective const * end() const noexcept
#define RYML_MAX_TAG_DIRECTIVES
the maximum number of tag directives in a Tree
csubstr normalize_tag_long(csubstr tag)
!!binary A sequence of zero or more octets (8 bit values).
csubstr from_tag_long(YamlTag_e tag)
TagDirectiveRange directives() const noexcept
csubstr normalize_tag(csubstr tag)
#define RYML_NOEXCEPT
Conditionally expands to noexcept when RYML_USE_ASSERT is 0 and is empty otherwise.
YamlTag_e
a bit mask for marking tags for types
!!timestamp A point in time https://yaml.org/type/timestamp.html
holds a source or yaml file position, for example when an error is detected; See also location_format...
!!set Unordered set of non-equal values.
size_t len
the length of the substring
!!yaml Specify the default value of a mapping https://yaml.org/type/yaml.html
void add(csubstr tag, csubstr resolved, id_type doc_id, const_iterator pos) RYML_NOEXCEPT
!!float Floating-point approximation to real numbers.
!!map Unordered set of key: value pairs without duplicates.
!!seq Sequence of arbitrary values.
bool is_custom_tag(csubstr tag)
is a tag of the form !handle!tag?
!!value Specify the default value of a mapping https://yaml.org/type/value.html
!!pairs Ordered sequence of key: value pairs allowing duplicates.
id_type doc_id
ID of the target document.
YamlTag_e to_tag(csubstr tag)
!!str A sequence of zero or more Unicode characters.
!!omap Ordered sequence of key: value pairs without duplicates.