yumapro  24.10-2
YumaPro SDK
Loading...
Searching...
No Matches
YANG Import Statement (ncx_import_t)

YANG import statement processing. More...

Collaboration diagram for YANG Import Statement (ncx_import_t):

Functions

ncx_import_tncx_new_import (void)
 Malloc and initialize the fields in a ncx_import_t. More...
 
void ncx_free_import (ncx_import_t *import)
 Free an ncx_import_t. More...
 
ncx_import_tncx_find_import (const ncx_module_t *mod, const xmlChar *module)
 Search the importQ for a specified module name. More...
 
ncx_import_tncx_find_import_que (const dlq_hdr_t *importQ, const xmlChar *module)
 Search the specified importQ for a specified module name. More...
 
ncx_import_tncx_find_import_test (const ncx_module_t *mod, const xmlChar *module)
 Search the importQ for a specified module name. More...
 
ncx_import_tncx_find_pre_import (const ncx_module_t *mod, const xmlChar *prefix)
 Search the importQ for a specified prefix value. More...
 
ncx_import_tncx_find_pre_import_que (const dlq_hdr_t *importQ, const xmlChar *prefix)
 Search the specified importQ for a specified prefix value. More...
 
ncx_import_tncx_find_pre_import_test (const ncx_module_t *mod, const xmlChar *prefix)
 Search the importQ for a specified prefix value. More...
 
boolean ncx_import_match_mod (const ncx_import_t *imp, const xmlChar *module, const xmlChar *revision)
 Check if the import matches the specified module. More...
 
void * ncx_locate_modqual_import (yang_pcb_t *pcb, ncx_import_t *imp, const xmlChar *defname, ncx_node_t *deftyp)
 Search the specific module for the specified definition name. More...
 

Detailed Description

YANG import statement processing.

Consume and resolve import statements by loading the module inline.

Function Documentation

◆ ncx_find_import()

ncx_import_t * ncx_find_import ( const ncx_module_t mod,
const xmlChar *  module 
)

Search the importQ for a specified module name.

Parameters
modmodule to search (mod->importQ)
modulemodule name to find
Returns
pointer to the node if found, NULL if not found
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ncx_find_import_que()

ncx_import_t * ncx_find_import_que ( const dlq_hdr_t *  importQ,
const xmlChar *  module 
)

Search the specified importQ for a specified module name.

Parameters
importQQ of ncx_import_t to search
modulemodule name to find
Returns
pointer to the node if found, NULL if not found
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ncx_find_import_test()

ncx_import_t * ncx_find_import_test ( const ncx_module_t mod,
const xmlChar *  module 
)

Search the importQ for a specified module name.

Do not set used flag

Parameters
modmodule to search (mod->importQ)
modulemodule name to find
Returns
pointer to the node if found, NULL if not found
Here is the call graph for this function:

◆ ncx_find_pre_import()

ncx_import_t * ncx_find_pre_import ( const ncx_module_t mod,
const xmlChar *  prefix 
)

Search the importQ for a specified prefix value.

Parameters
modmodule to search (mod->importQ)
prefixprefix string to find
Returns
pointer to the node if found, NULL if not found
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ncx_find_pre_import_que()

ncx_import_t * ncx_find_pre_import_que ( const dlq_hdr_t *  importQ,
const xmlChar *  prefix 
)

Search the specified importQ for a specified prefix value.

Parameters
importQQ of ncx_import_t to search
prefixprefix string to find
Returns
pointer to the node if found, NULL if not found
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ncx_find_pre_import_test()

ncx_import_t * ncx_find_pre_import_test ( const ncx_module_t mod,
const xmlChar *  prefix 
)

Search the importQ for a specified prefix value.

Test only, do not set used flag

Parameters
modmodule to search (mod->importQ)
prefixprefix string to find
Returns
pointer to the node if found, NULL if not found
Here is the call graph for this function:

◆ ncx_free_import()

void ncx_free_import ( ncx_import_t import)

Free an ncx_import_t.

Scrub the memory in a ncx_import_t by freeing all the sub-fields and then freeing the entire struct itself The struct must be removed from any queue it is in before this function is called.

Parameters
importncx_import_t data structure to free
Here is the call graph for this function:

◆ ncx_import_match_mod()

boolean ncx_import_match_mod ( const ncx_import_t imp,
const xmlChar *  module,
const xmlChar *  revision 
)

Check if the import matches the specified module.

Parameters
impncx_import_t to check
modulemodule name to check
revisionrevision date to check (may be NULL)
Returns
true if match; false if not
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ncx_locate_modqual_import()

void * ncx_locate_modqual_import ( yang_pcb_t pcb,
ncx_import_t imp,
const xmlChar *  defname,
ncx_node_t deftyp 
)

Search the specific module for the specified definition name.

Okay for YANG or NCX

Parameters
pcbparser control block to use
[in,out]impNCX import struct to use
  • imp->mod may get set if not already
defnamename of definition to find
[out]deftypspecified type or NCX_NT_NONE if any will do
  • *deftyp type retrieved if NO_ERR
Returns
pointer to the located definition or NULL if not found
Here is the caller graph for this function:

◆ ncx_new_import()

ncx_import_t * ncx_new_import ( void  )

Malloc and initialize the fields in a ncx_import_t.

Returns
pointer to the malloced and initialized struct or NULL if an error
Here is the call graph for this function: