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>
14C4_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;
150 Callbacks
const& callbacks, Location
const& ymlloc={},
151 bool with_brackets=
true);
155C4_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.
basic_substring< char > substr
a mutable string view
basic_substring< const char > csubstr
an immutable string view
uint16_t tag_bits
the integral type necessary to cover all the bits marking node tags
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)
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
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...
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
TagDirective const * begin() const noexcept
id_type size() const noexcept
TagDirective const * end() const noexcept
id_type doc_id
ID of the target document.
TagDirective const * end() const noexcept
TagDirective const * begin() const noexcept
bool redefines_qmrk() const noexcept
TagDirective m_directives[RYML_MAX_TAG_DIRECTIVES]
id_type size() const noexcept
TagDirective * end() noexcept
TagDirectiveRange directives() const noexcept
TagDirective const * add(csubstr handle, csubstr prefix, id_type doc_id) noexcept
TagDirective const * lookup(csubstr tag, id_type id) const noexcept
TagDirective * begin() noexcept