|
Libecoli 0.11.1
Extensible COmmand LIne library
|
A node that matches names from a dynamic list. More...
Typedefs | |
| typedef struct ec_strvec *(* | ec_node_dynlist_get_t) (struct ec_pnode *pstate, void *opaque) |
Enumerations | |
| enum | ec_node_dynlist_flags { DYNLIST_MATCH_LIST = 1 << 0 , DYNLIST_MATCH_REGEXP = 1 << 1 , DYNLIST_EXCLUDE_LIST = 1 << 2 } |
Functions | |
| struct ec_node * | ec_node_dynlist (const char *id, ec_node_dynlist_get_t get, void *opaque, const char *re_str, enum ec_node_dynlist_flags flags) |
A node that matches names from a dynamic list.
This node is able to parse a list of object names, returned by a user-defined function as a string vector.
Some flags can alter the behavior of parsing and completion:
Configuration Schema
No configuration schema.
Callback invoked by parse() or complete() to build the strvec containing the list of object names.
| pstate | The current parsing state. |
| opaque | The user pointer passed at node creation. |
Definition at line 1 of file node_dynlist.h.
Flags passed at ec_node_dynlist creation.
Definition at line 42 of file node_dynlist.h.
| struct ec_node * ec_node_dynlist | ( | const char * | id, |
| ec_node_dynlist_get_t | get, | ||
| void * | opaque, | ||
| const char * | re_str, | ||
| enum ec_node_dynlist_flags | flags ) |
Create a dynlist node.
The parsing and completion depend on a list returned by a user-provided callback, a regular expression, and flags.
| id | The node identifier. |
| get | The function that returns the list of object names as a string vector. |
| opaque | A user pointer passed to the get function. |
| re_str | The regular expression defining the valid pattern for object names. |
| flags | Customize parsing and completion behavior. |