Soletta™ Framework
|
Meta type context. More...
#include <sol-flow-metatype.h>
Data Fields | |
struct sol_str_slice | contents |
Parameters for the metatype that is being created. More... | |
struct sol_str_slice | name |
The node name that is being created. More... | |
int(* | read_file )(const struct sol_flow_metatype_context *ctx, const char *name, struct sol_buffer *buf) |
Opens a file for the meta type. More... | |
int(* | store_type )(const struct sol_flow_metatype_context *ctx, struct sol_flow_node_type *type) |
Stores the meta type in the Soletta infrastructure. More... | |
Meta type context.
This is used when the meta type is being created or its code is being generated. It contains useful information like the the node name, the parameters for the meta type and some helper functions.
struct sol_str_slice sol_flow_metatype_context::contents |
Parameters for the metatype that is being created.
struct sol_str_slice sol_flow_metatype_context::name |
The node name that is being created.
int(* sol_flow_metatype_context::read_file)(const struct sol_flow_metatype_context *ctx, const char *name, struct sol_buffer *buf) |
Opens a file for the meta type.
ctx | The metatype context. |
name | The file path. |
buf | Where the file contents should be stored. The buffer will be initiliazed inside the function. |
int(* sol_flow_metatype_context::store_type)(const struct sol_flow_metatype_context *ctx, struct sol_flow_node_type *type) |
Stores the meta type in the Soletta infrastructure.
Any node types produced by the creator function should be stored using this function, it takes ownership of the type. This means that one does not need to worry about freeing the node, because Soletta will do that for one.
ctx | The metatype context. |
type | The type to be stored. |