refactor(ltm): rename loops to nested
This commit is contained in:
parent
ba320a4250
commit
0ef51ccada
5 changed files with 112 additions and 54 deletions
|
|
@ -28,4 +28,33 @@ ltm_err ltm_template_compile(ltm_template **out, const char *template);
|
|||
ltm_err ltm_template_compile_n(ltm_template **out, const char *template,
|
||||
size_t len);
|
||||
|
||||
/**
|
||||
* Represents a specific instance of a template.
|
||||
*/
|
||||
typedef struct ltm_instance ltm_instance;
|
||||
|
||||
/**
|
||||
* Create a new instance of the given template.
|
||||
*/
|
||||
ltm_err ltm_template_instantiate(ltm_instance **out,
|
||||
const ltm_template *template);
|
||||
|
||||
typedef enum ltm_instance_block_type {
|
||||
ltm_instance_block_type_buf = 0,
|
||||
} ltm_instance_block_type;
|
||||
|
||||
/**
|
||||
* Add a new variable to the template.
|
||||
*/
|
||||
ltm_err ltm_instance_block_add_var(ltm_instance *instance, const char *name,
|
||||
ltm_instance_block_type type, void *data,
|
||||
size_t len);
|
||||
|
||||
/**
|
||||
* Add a new nested instance to the instance, returning a handle to the nested
|
||||
* instance.
|
||||
*/
|
||||
ltm_err ltm_instance_block_add_nested(ltm_instance **out,
|
||||
ltm_instance *instance, const char *name);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue