OGLplus  (0.59.0) a C++ wrapper for rendering APIs

eagine::valtree::compound_interface Struct Referenceabstract

Interface for value tree compound implementations. More...

#include <eagine/value_tree/interface.hpp>

Public Member Functions

virtual auto type_id () const noexcept -> identifier_t=0
 Returns the implementation type identifier of this compound.
 
virtual void add_ref (attribute_interface &attr) noexcept=0
 Add usage reference to the specified attribute. More...
 
virtual void release (attribute_interface &attr) noexcept=0
 Release usage reference to the specified attribute. More...
 
virtual auto structure () -> attribute_interface *=0
 Returns the root of attribute hierarch, describing the tree structure.
 
virtual auto attribute_name (attribute_interface &attr) -> string_view=0
 Returns the name of the specified attribute. More...
 
virtual auto canonical_type (attribute_interface &attr) -> value_type=0
 Returns the value type of the specified attribute. More...
 
virtual auto is_link (attribute_interface &attr) -> bool=0
 Indicates if the specified attribute is a reference or link in the tree. More...
 
virtual auto nested_count (attribute_interface &attr) -> span_size_t=0
 Returns the count of nested attributes in an attribute. More...
 
virtual auto nested (attribute_interface &attr, span_size_t index) -> attribute_interface *=0
 Returns the nested attribute of an attribute at given index. More...
 
virtual auto nested (attribute_interface &, string_view name) -> attribute_interface *=0
 Returns the nested attribute of an attribute with specified name. More...
 
virtual auto find (attribute_interface &attr, const basic_string_path &path) -> attribute_interface *
 Finds the nested attribute of an attribute at the given path. More...
 
virtual auto find (attribute_interface &attr, const basic_string_path &, span< const string_view > tags) -> attribute_interface *=0
 Finds the nested attribute of an attribute at path with tags. More...
 
virtual auto value_count (attribute_interface &attr) -> span_size_t=0
 Returns the count of individual values stored in an attribute. More...
 
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.
 
virtual auto fetch_values (attribute_interface &, span_size_t offset, span< char > dest) -> span_size_t=0
 Fetches char values from attribute into dest, starting at offset.
 
virtual auto fetch_values (attribute_interface &, span_size_t offset, span< byte > dest) -> span_size_t=0
 Fetches byte values from attribute into dest, starting at offset.
 
virtual auto fetch_values (attribute_interface &, span_size_t offset, span< std::int16_t > dest) -> span_size_t=0
 Fetches 16-bit int values from attribute into dest, starting at offset.
 
virtual auto fetch_values (attribute_interface &, span_size_t offset, span< std::int32_t > dest) -> span_size_t=0
 Fetches 32-bit int values from attribute into dest, starting at offset.
 
virtual auto fetch_values (attribute_interface &, span_size_t offset, span< std::int64_t > dest) -> span_size_t=0
 Fetches 64-bit int values from attribute into dest, starting at offset.
 
virtual auto fetch_values (attribute_interface &, span_size_t offset, span< std::uint16_t > dest) -> span_size_t=0
 Fetches 16-bit uint values from attribute into dest, starting at offset.
 
virtual auto fetch_values (attribute_interface &, span_size_t offset, span< std::uint32_t > dest) -> span_size_t=0
 Fetches 32-bit uint values from attribute into dest, starting at offset.
 
virtual auto fetch_values (attribute_interface &, span_size_t offset, span< std::uint64_t > dest) -> span_size_t=0
 Fetches 64-bit uint values from attribute into dest, starting at offset.
 
virtual auto fetch_values (attribute_interface &, span_size_t offset, span< float > dest) -> span_size_t=0
 Fetches float values from attribute into dest, starting at offset.
 
virtual auto fetch_values (attribute_interface &, span_size_t offset, span< std::chrono::duration< float >> dest) -> span_size_t=0
 Fetches duration values from attribute into dest, starting at offset.
 
virtual auto fetch_values (attribute_interface &, span_size_t offset, span< std::string > dest) -> span_size_t=0
 Fetches string values from attribute into dest, starting at offset.
 
- Public Member Functions inherited from eagine::interface< compound_interface >
constexpr interface (const interface &)=delete
 Not copyable.
 
auto operator= (interface &&)=delete
 Not move assignable.
 
auto operator= (const interface &)=delete
 Not copy assignable.
 

Additional Inherited Members

- Protected Member Functions inherited from eagine::interface< compound_interface >
constexpr interface () noexcept=default
 Default constructible by derived.
 
constexpr interface (interface &&) noexcept=default
 Move constructible by derived.
 

Detailed Description

Interface for value tree compound implementations.

Note
Do not use directly in client code, use compound instead.
See also
compound
attribute_interface

Member Function Documentation

◆ add_ref()

virtual void eagine::valtree::compound_interface::add_ref ( attribute_interface attr)
pure virtualnoexcept

Add usage reference to the specified attribute.

Precondition
this->type_id() == attr.type_id()

◆ attribute_name()

virtual auto eagine::valtree::compound_interface::attribute_name ( attribute_interface attr) -> string_view
pure virtual

Returns the name of the specified attribute.

Precondition
this->type_id() == attr.type_id()

◆ canonical_type()

virtual auto eagine::valtree::compound_interface::canonical_type ( attribute_interface attr) -> value_type
pure virtual

Returns the value type of the specified attribute.

Precondition
this->type_id() == attr.type_id()

◆ find() [1/2]

virtual auto eagine::valtree::compound_interface::find ( attribute_interface attr,
const basic_string_path ,
span< const string_view tags 
) -> attribute_interface *
pure virtual

Finds the nested attribute of an attribute at path with tags.

Precondition
this->type_id() == attr.type_id()

◆ find() [2/2]

virtual auto eagine::valtree::compound_interface::find ( attribute_interface attr,
const basic_string_path path 
) -> attribute_interface*
inlinevirtual

Finds the nested attribute of an attribute at the given path.

Precondition
this->type_id() == attr.type_id()

◆ is_link()

virtual auto eagine::valtree::compound_interface::is_link ( attribute_interface attr) -> bool
pure virtual

Indicates if the specified attribute is a reference or link in the tree.

Precondition
this->type_id() == attr.type_id()

◆ nested() [1/2]

virtual auto eagine::valtree::compound_interface::nested ( attribute_interface ,
string_view  name 
) -> attribute_interface *
pure virtual

Returns the nested attribute of an attribute with specified name.

Precondition
this->type_id() == attr.type_id()

◆ nested() [2/2]

virtual auto eagine::valtree::compound_interface::nested ( attribute_interface attr,
span_size_t  index 
) -> attribute_interface *
pure virtual

Returns the nested attribute of an attribute at given index.

Precondition
this->type_id() == attr.type_id()

◆ nested_count()

virtual auto eagine::valtree::compound_interface::nested_count ( attribute_interface attr) -> span_size_t
pure virtual

Returns the count of nested attributes in an attribute.

Precondition
this->type_id() == attr.type_id()

◆ release()

virtual void eagine::valtree::compound_interface::release ( attribute_interface attr)
pure virtualnoexcept

Release usage reference to the specified attribute.

Precondition
this->type_id() == attr.type_id()

◆ value_count()

virtual auto eagine::valtree::compound_interface::value_count ( attribute_interface attr) -> span_size_t
pure virtual

Returns the count of individual values stored in an attribute.

Precondition
this->type_id() == attr.type_id()

The documentation for this struct was generated from the following file:

Copyright © 2015-2021 Matúš Chochlík.
<chochlik -at -gmail.com>
Documentation generated on Tue Apr 13 2021 by Doxygen (version 1.8.17).