A plug descriptor to pass to the Registry::register_node() function.
More...
#include <PlugDescriptor.h>
|
| enum | Flags {
none = 0,
cache = 1 << 0,
time_varying = 1 << 1,
serial = 1 << 3,
graph_invisible = 1 << 8,
hidden = 1 << 8,
channel = 1 << 9,
constant = 1 << 10,
cache_exact = 1 << 11,
main = 1 << 12,
background = 1 << 30
} |
| |
|
| | PlugDescriptor (const char *plug_name, const Value &default_value, uint32_t flags=serial, const char *ui="") |
| | Register an input plug. More...
|
| |
| | PlugDescriptor (const char *plug_name, const Value &default_value, uint32_t flags, const char *ui, const std::function< Value(EvalContext &)> &eval_handler, const std::vector< InternalDependencies > &intern_deps, PartialInvalidationPtr(*partial_invalidation_handler)(const Plug &plug, int dep, const PartialInvalidationPtr &pi)=nullptr, int first_extern_deps=-1, const std::vector< ExternalDependencies > &extern_deps={}) |
| | Register an evaluated plug. More...
|
| |
A plug descriptor to pass to the Registry::register_node() function.
◆ Flags
| Enumerator |
|---|
| none | |
| cache | This plug value should be keeped in memory because it takes time to be computed.
|
| time_varying | This plug is never constant.
|
| serial | This plug value should be serialized.
|
| graph_invisible | This plug should not be visible in the graph editor.
|
| hidden | This plug should be hidden in the UI by default.
|
| channel | This plug is a channel.
|
| constant | This plug is not animable (i.e no animation curve, only constant values)
|
| cache_exact | This plug is cached with the exact value.
|
| main | This plug is always visible.
|
| background | This plug is evaluated by the background engine.
|
◆ PlugDescriptor() [1/2]
| maquina::PlugDescriptor::PlugDescriptor |
( |
const char * |
plug_name, |
|
|
const Value & |
default_value, |
|
|
uint32_t |
flags = serial, |
|
|
const char * |
ui = "" |
|
) |
| |
|
inline |
Register an input plug.
An input plug has a value, it is serialized. It can be connected in input or output.
- Parameters
-
| plug_name | in The plug name |
| default_value | in The plug type and default value |
| flags | in A combinaison of PlugDescription::Flags flags |
| ui | in A json string with display options used by the user interface |
◆ PlugDescriptor() [2/2]
| maquina::PlugDescriptor::PlugDescriptor |
( |
const char * |
plug_name, |
|
|
const Value & |
default_value, |
|
|
uint32_t |
flags, |
|
|
const char * |
ui, |
|
|
const std::function< Value(EvalContext &)> & |
eval_handler, |
|
|
const std::vector< InternalDependencies > & |
intern_deps, |
|
|
PartialInvalidationPtr(*)(const Plug &plug, int dep, const PartialInvalidationPtr &pi) |
partial_invalidation_handler = nullptr, |
|
|
int |
first_extern_deps = -1, |
|
|
const std::vector< ExternalDependencies > & |
extern_deps = {} |
|
) |
| |
|
inline |
Register an evaluated plug.
An evaluated plug computes a value using a function, the eval handler. The plug has dependencies to compute the value. The dependencies can be internal or external. It's output can be connected to other plugs.
The internal dependencies are registered, they are not serialized.
The external dependencies connections are serialized. They are organized as an array of structure. Each element of the structure have a name, a type and a default value. The structure can be repeated in an array.
- Parameters
-
| plug_name | in The plug name |
| default_value | in The plug type and default value |
| flags | in A combinaison of PlugDescription::Flags flags |
| ui | in A json string with display options used by the user interface |
| eval_handler | in The evaluation handler to compute the plug value |
| intern_deps | in The external dependencies description |
| partial_invalidation_handler | in The evaluation handler to compute the PartialInvalidation, if required |
| first_extern_deps | in index of the first external dependency |
| extern_deps | in The external dependencies description |
◆ _default_value
| Value maquina::PlugDescriptor::_default_value |
◆ _eval_handler
◆ _extern_deps
◆ _first_extern_deps
| int maquina::PlugDescriptor::_first_extern_deps = -1 |
◆ _flags
| uint32_t maquina::PlugDescriptor::_flags = 0 |
◆ _intern_deps
◆ _partial_invalidation_handler
◆ _plug_name
| std::string maquina::PlugDescriptor::_plug_name |
◆ _ui
| std::string maquina::PlugDescriptor::_ui |
The documentation for this class was generated from the following file: