Soletta™ Framework
|
A Resolver matches type names to an actual node_type and possibly a companion options. More...
Data Structures | |
struct | sol_flow_resolver |
Resolver's structure. More... | |
Typedefs | |
typedef struct sol_flow_resolver | sol_flow_resolver |
Resolver's structure. More... | |
Functions | |
const struct sol_flow_resolver * | sol_flow_get_builtins_resolver (void) |
Resolver for built-in node types. More... | |
const struct sol_flow_resolver * | sol_flow_get_default_resolver (void) |
The default resolver set at compile time. More... | |
int | sol_flow_resolve (const struct sol_flow_resolver *resolver, const char *id, const struct sol_flow_node_type **type, struct sol_flow_node_named_options *named_opts) |
Function used to resolve id into a node type. More... | |
A Resolver matches type names to an actual node_type and possibly a companion options.
Typically, it would match type names directly, but other uses exist, e.g. a resolver could match IDs from a configuration file to concrete types.
It's possible to have different Resolvers by using different heuristics to implement the revolve
callback.
typedef struct sol_flow_resolver sol_flow_resolver |
Resolver's structure.
const struct sol_flow_resolver* sol_flow_get_builtins_resolver | ( | void | ) |
Resolver for built-in node types.
A Resolver implementation that interprets IDs as node type names and return the appropriate built-in node type.
Referenced by show_resolved_type().
const struct sol_flow_resolver* sol_flow_get_default_resolver | ( | void | ) |
The default resolver set at compile time.
int sol_flow_resolve | ( | const struct sol_flow_resolver * | resolver, |
const char * | id, | ||
const struct sol_flow_node_type ** | type, | ||
struct sol_flow_node_named_options * | named_opts | ||
) |
Function used to resolve id into a node type.
It uses resolver to translate id into a node type (returned in type) and its options if available after resolution.
When resolver is NULL
, the default resolver is used.
sol_flow_node_named_options_fini() must be used to delete members in case of success.
resolver | The resolver to be used to solve this id. |
id | Id to be resolved |
type | The node type for id if success, NULL otherwise |
named_opts | Options for the resolved node type if available, NULL otherwise |
0
in case of success, error code (always negative) otherwise Referenced by show_resolved_type().