The Flow Parser is used to transform a textual description (either FBP or other metatypes) into node types that can be used in a flow.
More...
|
| struct sol_flow_node_type * | sol_flow_parse_buffer (struct sol_flow_parser *parser, const struct sol_buffer *buf, const char *filename) |
| | Parses a flow description contained in buf and returns the resulting node type. More...
|
| |
| struct sol_flow_node_type * | sol_flow_parse_buffer_metatype (struct sol_flow_parser *parser, const char *metatype, const struct sol_buffer *buf, const char *filename) |
| | Parsers a buf of a given metatype and returns the resulting node type. More...
|
| |
| struct sol_flow_node_type * | sol_flow_parse_string (struct sol_flow_parser *parser, const char *str, const char *filename) |
| | Similar to sol_flow_parse_buffer but accepts C string. More...
|
| |
| struct sol_flow_node_type * | sol_flow_parse_string_metatype (struct sol_flow_parser *parser, const char *metatype, const char *str, const char *filename) |
| | Similar to sol_flow_parse_buffer_metatype but accepts C string. More...
|
| |
| int | sol_flow_parser_del (struct sol_flow_parser *parser) |
| | Destroy a sol_flow_parser instance. More...
|
| |
| struct sol_flow_parser * | sol_flow_parser_new (const struct sol_flow_parser_client *client, const struct sol_flow_resolver *resolver) |
| | Creates a new instance of sol_flow_parser. More...
|
| |
The Flow Parser is used to transform a textual description (either FBP or other metatypes) into node types that can be used in a flow.
The node types created are owned by the parser object, so the parser can only be deleted after all its types are not used anymore.
Flow Parser's client structure.
Parses a flow description contained in buf and returns the resulting node type.
- Parameters
-
| parser | The Flow Parser handle |
| buf | Flow description to be parsed. The buffer will be initialized in this function. |
| filename | Name of the file which content is in buf |
- Returns
- Resulting node type of the parsed FBP on success,
NULL otherwise.
Parsers a buf of a given metatype and returns the resulting node type.
- Parameters
-
| parser | The Flow Parser handle |
| metatype | Content's type (e.g. "fbp", or "js") |
| buf | Content to be parsed |
| filename | Name of the file which content is in buf |
- Returns
- Resulting node type of the parsed FBP on success,
NULL otherwise.
Similar to sol_flow_parse_buffer but accepts C string.
It will calculate the size of str and call sol_flow_parse_buffer with the equivalent parameters.
- Parameters
-
| parser | The Flow Parser handle |
| str | Flow description to be parsed |
| filename | Name of the file which content is in str |
- Returns
- Resulting node type of the parsed FBP on success,
NULL otherwise.
Similar to sol_flow_parse_buffer_metatype but accepts C string.
It will calculate the size of str and call sol_flow_parse_buffer with the equivalent parameters.
- Parameters
-
| parser | The Flow Parser handle |
| metatype | Content's type (e.g. "fbp", or "js") |
| str | Content to be parsed |
| filename | Name of the file which content is in str |
- Returns
- Resulting node type of the parsed FBP on success,
NULL otherwise.
Destroy a sol_flow_parser instance.
- Parameters
-
| parser | Flow parser to be destroyed |
- Returns
0 on success, error code (always negative) otherwise
Creates a new instance of sol_flow_parser.
- Parameters
-
| client | Parser's client |
| resolver | Resolver to be used |
- Note
- Passing
NULL to resolver will set the default resolver.
- Returns
- A new Flow Parser instance,
NULL on error.