MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
MayaFlux::Portal::Forma::Detail::DocumentWalk< Source, Access > Class Template Reference

#include <Instantiate.hpp>

Collaboration diagram for MayaFlux::Portal::Forma::Detail::DocumentWalk< Source, Access >:

Classes

struct  ActionSpec
struct  InstanceInfo
struct  PreparedInstance
struct  SurfaceInstances

Public Types

using Actions = ActionTable<Source, Access>
using Calls = CallTable<Source, Access>
using Placer = typename Table::Placer
using Prepared = std::vector<PreparedInstance>
using Table = FactoryTable<Source, Access>

Public Member Functions

 DocumentWalk (const Table &table, const Source &root, std::string &error, const Actions *actions=nullptr, const Calls *calls=nullptr)
std::optional< Prepared > prepare (SurfaceMap &surfaces)
std::optional< std::vector< Placer > > prepare_bulk (std::string_view template_id, const Kakshya::CompositeArray &rows)
bool read_structure ()

Static Public Member Functions

static bool apply (const Prepared &prepared, const std::vector< uint32_t > &elements, std::string &error)
 Names every placed element after its instance, then applies the document's Layer attributes: relations first, so a later front or back moves the whole group, then visibility, interaction and clip.

Private Member Functions

bool check_form (const Source &form)
 A form either calls a registered function or gives vertices to draw, as C++ either passes a function's Form to Tend or submits vertices to a slice.
bool check_instances ()
bool check_relations (const SurfaceInstances &entry)
bool check_version ()
std::optional< std::string > claim_id (const Source &source)
std::optional< std::string > claim_name (const Source &source)
bool fail (const Source &at, std::string message)
bool only_attributes (const Source &source, std::initializer_list< std::string_view > allowed, std::string_view allowed_prefix={})
bool read_action (const Source &on, InstanceInfo &info)
bool read_actions (const Source &instance, InstanceInfo &info)
bool read_element (const Source &element, InstanceInfo &info)
 An element declares what C++ declares for one placed form: its name, the initial state, the Layer calls that follow placement (visible, interactive, relate, front, back, clip, spelled as the Layer and Element members are), one form that calls a registered function, and the actions on its events.
bool read_flag (const Source &instance, std::string_view name, std::string_view value, bool &out)
bool read_layer_attributes (const Source &instance, LayerAttributes &out)
bool read_surface (const Source &surface)
bool read_template (const Source &definition)
bool read_templates (const Source &section)
std::optional< Placer > vertex_placer (const Source &form, const Source &element, const ElementHit &hit)
 The placement of vertices written in a form element, which have no state.

Static Private Member Functions

static void wire (Surface &surface, uint32_t element, const std::string &instance, const ActionBinding &binding)

Private Attributes

const Actions * m_actions
const Calls * m_calls
std::string & m_error
Reflect::AttributeIndex< Source, Access > m_ids { std::string(reserved_id_attribute) }
Reflect::AttributeIndex< Source, Access > m_names { std::string(element_name_attribute) }
const Source & m_root
std::vector< SurfaceInstances > m_surfaces
const Table & m_table
std::unordered_map< std::string, Source > m_templates

Detailed Description

template<typename Source, typename Access>
class MayaFlux::Portal::Forma::Detail::DocumentWalk< Source, Access >

Definition at line 58 of file Instantiate.hpp.


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