Go to the documentation of this file.
9 #ifndef EAGINE_VALUE_TREE_INTERFACE_HPP
10 #define EAGINE_VALUE_TREE_INTERFACE_HPP
12 #include "../identifier_t.hpp"
13 #include "../interface.hpp"
14 #include "../reflect/map_enumerators.hpp"
15 #include "../string_path.hpp"
16 #include "../string_span.hpp"
17 #include "../tags.hpp"
50 template <
typename Selector>
52 return enumerator_map_type<value_type, 10>{
65 struct compound_interface;
129 return find(attr, path, {});
214 #endif // EAGINE_VALUE_TREE_INTERFACE_HPP
@ string_type
string value type.
value_type
Value tree value element data type enumeration.
Definition: interface.hpp:27
virtual auto fetch_values(attribute_interface &, span_size_t offset, span< bool > dest) -> span_size_t=0
Fetches boolean values from attribute into dest, starting at offset.
std::ptrdiff_t span_size_t
Signed span size type used by eagine.
Definition: types.hpp:36
@ int16_type
16-bit integer value type.
@ int32_type
32-bit integer value type.
@ byte_type
Byte/BLOB value type.
@ composite
composite structure type.
virtual auto nested(attribute_interface &attr, span_size_t index) -> attribute_interface *=0
Returns the nested attribute of an attribute at given index.
@ unknown
Unknown value type.
basic_span< T, T *, S > span
Default alias for basic memory spans with native pointer type.
Definition: span.hpp:415
Basic class storing paths made of string elements.
Definition: string_path.hpp:27
@ int64_type
64-bit integer value type.
Base template for abstract interfaces, implements common functionality.
Definition: interface.hpp:18
virtual auto attribute_name(attribute_interface &attr) -> string_view=0
Returns the name of the specified attribute.
virtual auto type_id() const noexcept -> identifier_t=0
Returns the implementation type identifier of this attribute.
virtual auto structure() -> attribute_interface *=0
Returns the root of attribute hierarch, describing the tree structure.
@ float_type
floating-point number value type.
Interface for value tree attribute implementations.
Definition: interface.hpp:72
virtual auto type_id() const noexcept -> identifier_t=0
Returns the implementation type identifier of this compound.
virtual auto is_link(attribute_interface &attr) -> bool=0
Indicates if the specified attribute is a reference or link in the tree.
@ bool_type
Boolean value type.
virtual void add_ref(attribute_interface &attr) noexcept=0
Add usage reference to the specified attribute.
virtual auto canonical_type(attribute_interface &attr) -> value_type=0
Returns the value type of the specified attribute.
std::uint64_t identifier_t
The underlying integer type for eagine::identifier.
Definition: identifier_t.hpp:19
Template type used mostly for function type-tag dispatching.
Definition: type_identity.hpp:19
@ duration_type
time duration value type.
Interface for value tree compound implementations.
Definition: interface.hpp:83
virtual void release(attribute_interface &attr) noexcept=0
Release usage reference to the specified attribute.
Value-tree code is placed in this namespace.
Definition: eagine.hpp:53
virtual auto value_count(attribute_interface &attr) -> span_size_t=0
Returns the count of individual values stored in an attribute.
virtual auto find(attribute_interface &attr, const basic_string_path &path) -> attribute_interface *
Finds the nested attribute of an attribute at the given path.
Definition: interface.hpp:127
virtual auto nested_count(attribute_interface &attr) -> span_size_t=0
Returns the count of nested attributes in an attribute.