|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
Functions a document calls by name, with the function's own parameter names as attributes. More...
#include <CallTable.hpp>
Public Types | |
| using | Maker |
| Decodes a form element and the element holding it into a Placer, or nullopt with an error. | |
| using | Placer = typename FactoryTable<Source, Access>::Placer |
Public Member Functions | |
| bool | contains (std::string_view name) const |
| template<auto Function> requires Reflect::DescribedFunction<Function> | |
| void | expose_form (std::string name={}) |
| Register a described function that returns a Geometry::Form. | |
| const Maker * | find (std::string_view name) const |
| The maker of this name, or nullptr. | |
| bool | merge (const CallTable &other, std::string_view prefix, std::string &error, bool replace=false) |
| Add every call of another table under a name prefix. | |
| std::vector< std::string > | names () const |
| Registered names in sorted order. | |
Private Attributes | |
| Memory::FlatMap< std::string, Maker, std::less<> > | m_makers |
Functions a document calls by name, with the function's own parameter names as attributes.
A plain value like every table here. Registering a function needs nothing written about it: its generated Signature sidecar (MF_DESCRIBE_FUNCTION) supplies the parameter names, its own type supplies their types, and each attribute is decoded with TextCodec. A form element names the function and gives its arguments, as C++ passes them:
A function returning a Geometry::Form of T makes an element whose state is a T, written in the element's state attribute as TextCodec of T reads it, and a T{} when it is absent, as Tend does.
| Source | Element type with a Reflect::RecordAccess specialization. |
Definition at line 181 of file CallTable.hpp.