libyang  2.0.7
libyang is YANG data modelling language parser and toolkit written (and providing API) in C.
Plugins: Extensions printer support
Collaboration diagram for Plugins: Extensions printer support:

Functions

uint16_t * lys_ypr_ctx_get_level (const struct lyspr_ctx *ctx)
 YANG printer context getter for printer indentation level. More...
 
uint32_t * lys_ypr_ctx_get_options (const struct lyspr_ctx *ctx)
 YANG printer context getter for printer options. More...
 
struct ly_out ** lys_ypr_ctx_get_out (const struct lyspr_ctx *ctx)
 YANG printer context getter for output handler. More...
 
void lysc_print_extension_instance (struct lyspr_ctx *ctx, const struct lysc_ext_instance *ext, ly_bool *flag)
 Print substatements of an extension instance. More...
 

Detailed Description

Helper functions to implement extension plugin's sprinter callback.

Function Documentation

◆ lys_ypr_ctx_get_level()

uint16_t* lys_ypr_ctx_get_level ( const struct lyspr_ctx *  ctx)

YANG printer context getter for printer indentation level.

Parameters
[in]ctxYANG printer context.
Returns
pointer to the printer's indentation level to allow modifying its value.

◆ lys_ypr_ctx_get_options()

uint32_t* lys_ypr_ctx_get_options ( const struct lyspr_ctx *  ctx)

YANG printer context getter for printer options.

Parameters
[in]ctxYANG printer context.
Returns
pointer to the printer options to allow modifying them with Schema output options values.

◆ lys_ypr_ctx_get_out()

struct ly_out** lys_ypr_ctx_get_out ( const struct lyspr_ctx *  ctx)

YANG printer context getter for output handler.

Parameters
[in]ctxYANG printer context.
Returns
Output handler where the data are being printed. Note that the address of the handler pointer in the context is returned to allow to modify the handler.

◆ lysc_print_extension_instance()

void lysc_print_extension_instance ( struct lyspr_ctx *  ctx,
const struct lysc_ext_instance ext,
ly_bool flag 
)

Print substatements of an extension instance.

Generic function to access YANG printer functions from the extension plugins (lyplg_ext_schema_printer_clb).

Parameters
[in]ctxYANG printer context to provide output handler and other information for printing.
[in]extThe compiled extension instance to access the extensions and substatements data.
[in,out]flagFlag to be shared with the caller regarding the opening brackets - 0 if the '{' not yet printed, 1 otherwise.