libyang  2.0.194
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

LIBYANG_API_DECL uint16_t * lys_ypr_ctx_get_level (const struct lyspr_ctx *ctx)
 YANG printer context getter for printer indentation level. More...
 
LIBYANG_API_DECL uint32_t * lys_ypr_ctx_get_options (const struct lyspr_ctx *ctx)
 YANG printer context getter for printer options. More...
 
LIBYANG_API_DECL struct ly_out ** lys_ypr_ctx_get_out (const struct lyspr_ctx *ctx)
 YANG printer context getter for output handler. More...
 
LIBYANG_API_DECL 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()

LIBYANG_API_DECL 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()

LIBYANG_API_DECL 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()

LIBYANG_API_DECL 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()

LIBYANG_API_DECL 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.