yumapro  24.10-3
YumaPro SDK
Loading...
Searching...
No Matches
Core Functions for YANG Types

APIs to access compiler data strctures during compilation. More...

Collaboration diagram for Core Functions for YANG Types:

Functions

status_t typ_load_basetypes (void)
 Create typ_template_t structs for the base types. More...
 
void typ_unload_basetypes (void)
 Unload and destroy the typ_template_t structs for the base types unload the typ_template_t structs for the ncx_btype_t types. More...
 
typ_template_ttyp_new_template (void)
 Malloc and initialize the fields in a typ_template_t. More...
 
void typ_free_template (typ_template_t *typ)
 Scrub the memory in a typ_template_t by freeing all the sub-fields and then freeing the entire struct itself. More...
 
typ_def_ttyp_new_typdef (void)
 Malloc and initialize the fields in a typ_def_t. More...
 
void typ_init_typdef (typ_def_t *typdef)
 init a pre-allocated typdef (done first) More...
 
void typ_init_simple (typ_def_t *tdef, ncx_btype_t btyp)
 Init a typ_simple_t struct inside a typ_def_t. More...
 
void typ_init_named (typ_def_t *tdef)
 Init a typ_named_t struct inside a typ_def_t. More...
 
void typ_free_typdef (typ_def_t *typdef)
 Scrub the memory in a typ_def_t by freeing all Then free the typdef itself. More...
 
void typ_clean_typdef (typ_def_t *typdef)
 Clean a typ_def_t struct, but do not delete it. More...
 
void typ_set_named_typdef (typ_def_t *typdef, typ_template_t *imptyp)
 Set the fields in a named typedef (used by YANG parser) More...
 
void typ_unset_named_typdef (typ_def_t *typdef)
 UnSet the typ link in a named typedef (used by YANG parser) More...
 
const xmlChar * typ_get_named_typename (const typ_def_t *typdef)
 Get the type name of the named typ. More...
 
const xmlChar * typ_get_named_type_modname (const typ_def_t *typdef)
 Get the module name of the named typ. More...
 
uint32 typ_get_named_type_linenum (const typ_def_t *typdef)
 Get the line number of the type template of the named type. More...
 
status_t typ_set_new_named (typ_def_t *typdef, ncx_btype_t btyp)
 Create a new typdef inside a typ_named_t struct inside a typ_def_t. More...
 
typ_def_ttyp_get_new_named (typ_def_t *typdef)
 Access the new typdef inside a typ_named_t struct inside a typ_def_t. More...
 
const typ_def_ttyp_cget_new_named (const typ_def_t *typdef)
 Access the new typdef inside a typ_named_t struct inside a typ_def_t. More...
 
void typ_set_simple_typdef (typ_template_t *typ, ncx_btype_t btyp)
 Set the fields in a simple typedef (used by YANG parser) More...
 
typ_enum_ttyp_new_enum (const xmlChar *name)
 Alloc and Init a typ_enum_t struct. More...
 
typ_enum_ttyp_new_enum2 (xmlChar *name)
 Alloc and Init a typ_enum_t struct. More...
 
void typ_free_enum (typ_enum_t *en)
 Free a typ_enum_t struct. More...
 
typ_rangedef_ttyp_new_rangedef (void)
 Alloc and Init a typ_rangedef_t struct (range-stmt) More...
 
void typ_free_rangedef (typ_rangedef_t *rv, ncx_btype_t btyp)
 Free a typ_rangedef_t struct (range-stmt) More...
 
void typ_normalize_rangeQ (dlq_hdr_t *rangeQ, ncx_btype_t btyp)
 Start with a valid rangedef chain. More...
 
dlq_hdr_t * typ_get_rangeQ (typ_def_t *typdef)
 Return the rangeQ for the given typdef. More...
 
dlq_hdr_t * typ_get_rangeQ_con (typ_def_t *typdef)
 Return the rangeQ for the given typdef Do not follow typdef chains. More...
 
const dlq_hdr_t * typ_get_crangeQ (const typ_def_t *typdef)
 Return the rangeQ for the given typdef. More...
 
const dlq_hdr_t * typ_get_crangeQ_con (const typ_def_t *typdef)
 Return the rangeQ for the given typdef Do not follow typdef chains. More...
 
typ_range_ttyp_get_range_con (typ_def_t *typdef)
 Return the range struct for the given typdef Do not follow typdef chains. More...
 
const typ_range_ttyp_get_crange_con (const typ_def_t *typdef)
 Return the range struct for the given typdef Do not follow typdef chains. More...
 
const xmlChar * typ_get_rangestr (const typ_def_t *typdef)
 Return the range string for the given typdef chain. More...
 
const typ_rangedef_ttyp_first_rangedef (const typ_def_t *typdef)
 Return the lower bound range definition struct. More...
 
const typ_rangedef_ttyp_first_rangedef_con (const typ_def_t *typdef)
 Return the lower bound range definition struct Constrain search to this typdef. More...
 
status_t typ_get_rangebounds_con (const typ_def_t *typdef, ncx_btype_t *btyp, const ncx_num_t **lb, const ncx_num_t **ub)
 Return the lower and upper bound range number. More...
 
ncx_strrest_t typ_get_strrest (const typ_def_t *typdef)
 Get the string restrinvtion type set for this typdef. More...
 
void typ_set_strrest (typ_def_t *typdef, ncx_strrest_t strrest)
 Set the string restrinvtion type set for this typdef. More...
 
typ_sval_ttyp_new_sval (const xmlChar *str, ncx_btype_t btyp)
 Alloc and Init a typ_sval_t struct malloc and init a string descriptor. More...
 
void typ_free_sval (typ_sval_t *sv)
 Free a typ_sval_t struct free a string descriptor. More...
 
typ_listval_ttyp_new_listval (void)
 Alloc and Init a typ_listval_t struct malloc and init a list descriptor. More...
 
void typ_free_listval (typ_listval_t *lv)
 Free a typ_listval_t struct free a list descriptor. More...
 
ncx_btype_t typ_get_range_type (ncx_btype_t btyp)
 Get the correct typ_rangedef_t data type for the indicated base type. More...
 
ncx_btype_t typ_get_basetype (const typ_def_t *typdef)
 Get the final base type of the specified typ_def_t. More...
 
ncx_btype_t typ_get_basetype2 (typ_def_t *typdef)
 Get the final base type of the specified typ_def_t. More...
 
const xmlChar * typ_get_name (const typ_def_t *typdef)
 Get the name for the specified typdef. More...
 
const xmlChar * typ_get_basetype_name (const typ_template_t *typ)
 Get the name of the final base type of the specified typ_template_t. More...
 
const xmlChar * typ_get_parenttype_name (const typ_template_t *typ)
 Get the final base type of the specified typ_def_t. More...
 
ncx_tclass_t typ_get_base_class (const typ_def_t *typdef)
 Follow any typdef links and get the class of the base typdef for the specified typedef. More...
 
typ_template_ttyp_get_basetype_typ (ncx_btype_t btyp)
 Get the default typ_template_t for the specified base type. More...
 
typ_def_ttyp_get_basetype_typdef (ncx_btype_t btyp)
 Get the default typdef for the specified base type. More...
 
typ_def_ttyp_get_parent_typdef (typ_def_t *typdef)
 Get the next typ_def_t in a chain – for NCX_CL_NAMED chained typed. More...
 
const typ_template_ttyp_get_parent_type (const typ_template_t *typ)
 Get the next typ_template_t in a chain – for NCX_CL_NAMED only. More...
 
const typ_def_ttyp_get_cparent_typdef (const typ_def_t *typdef)
 Get the next typ_def_t in a chain – for NCX_CL_NAMED chained typed. More...
 
typ_def_ttyp_get_next_typdef (typ_def_t *typdef)
 Get the next typ_def_t in a chain – for NCX_CL_NAMED chained typed. More...
 
typ_def_ttyp_get_base_typdef (typ_def_t *typdef)
 Get the base typ_def_t in a chain – for NCX_CL_NAMED chained typed. More...
 
typ_def_ttyp_get_userdef_typdef (typ_def_t *typdef)
 Get the base typ_def_t in a chain – for NCX_CL_NAMED chained typed. More...
 
const typ_def_ttyp_get_cuserdef_typdef (const typ_def_t *typdef)
 Get the base typ_def_t in a chain – for NCX_CL_NAMED chained typed. More...
 
const typ_def_ttyp_get_cbase_typdef (const typ_def_t *typdef)
 Get the base typ_def_t in a chain – for NCX_CL_NAMED chained typed Also NCX_CL_REF pointer typdefs. More...
 
typ_def_ttyp_get_qual_typdef (typ_def_t *typdef, ncx_squal_t squal)
 Get the final typ_def_t of the specified typ_def_t based on the qualifier. More...
 
const typ_def_ttyp_get_cqual_typdef (const typ_def_t *typdef, ncx_squal_t squal)
 Get the final typ_def_t of the specified typ_def_t based on the qualifier. More...
 
const ncx_appinfo_ttyp_find_appinfo (const typ_def_t *typdef, const xmlChar *prefix, const xmlChar *name)
 Find the specified appinfo variable by its prefix and name. More...
 
const ncx_appinfo_ttyp_find_appinfo_con (const typ_def_t *typdef, const xmlChar *prefix, const xmlChar *name)
 Find the specified appinfo name, constrained to the current typdef. More...
 
boolean typ_is_xpath_string (const typ_def_t *typdef)
 Find the ncx:xpath extension within the specified typdef chain. More...
 
boolean typ_is_qname_string (const typ_def_t *typdef)
 Find the ncx:qname extension within the specified typdef chain. More...
 
boolean typ_is_schema_instance_string (const typ_def_t *typdef)
 Find the ncx:schema-instance extension within the specified typdef chain. More...
 
const xmlChar * typ_get_defval (const typ_template_t *typ)
 Find the default value string for the specified type template get default from template. More...
 
const xmlChar * typ_get_default (const typ_def_t *typdef)
 Check if this typdef has a default value defined get default from typdef. More...
 
ncx_iqual_t typ_get_iqualval (const typ_template_t *typ)
 Find the instance qualifier value enum for the specified type template. More...
 
ncx_iqual_t typ_get_iqualval_def (const typ_def_t *typdef)
 Find the instance qualifier value enum for the specified type template. More...
 
const xmlChar * typ_get_units (const typ_template_t *typ)
 Find the units string for the specified type template. More...
 
const xmlChar * typ_get_units_from_typdef (const typ_def_t *typdef)
 Find the units string for the specified typdef template. More...
 
boolean typ_has_children (ncx_btype_t btyp)
 Check if this is a data type that uses the val.v.childQ. More...
 
boolean typ_has_index (ncx_btype_t btyp)
 Check if this is a data type that has an index. More...
 
boolean typ_is_simple (ncx_btype_t btyp)
 Check if this is a simple data type. More...
 
boolean typ_is_xsd_simple (ncx_btype_t btyp)
 Check if this is a simple data type in XSD encoding. More...
 
typ_enum_ttyp_first_enumdef (typ_def_t *typdef)
 Get the first enum def struct looks past named typedefs to base typedef. More...
 
typ_enum_ttyp_next_enumdef (typ_enum_t *enumdef)
 Get the next enum def struct. More...
 
typ_enum_ttyp_get_enumdef_n (typ_def_t *typdef, uint32 num)
 Get the enum defs defined based on enum order. More...
 
const typ_enum_ttyp_first_con_enumdef (const typ_def_t *typdef)
 Get the first enum def struct constrained to this typdef. More...
 
typ_enum_ttyp_find_enumdef (dlq_hdr_t *ebQ, const xmlChar *name)
 Get the specified enum def struct. More...
 
uint32 typ_enumdef_count (const typ_def_t *typdef)
 Get the number of typ_enum_t Q entries. More...
 
boolean typ_enumdef_conditional (typ_def_t *typdef, const xmlChar *valstr)
 Check if the specified enumdef value is conditional on if-feature. More...
 
typ_def_ttyp_get_correct_enumdef (typ_def_t *typdef)
 Get the typ_enum_t to use. More...
 
typ_enum_ttyp_get_enumdef (typ_def_t *typdef, const xmlChar *valstr)
 Get the typ_enum_t. More...
 
const typ_sval_ttyp_first_strdef (const typ_def_t *typdef)
 Get the first string def struct. More...
 
uint32 typ_get_maxrows (const typ_def_t *typdef)
 Get the maxrows value if it exists or zero if not. More...
 
ncx_access_t typ_get_maxaccess (const typ_def_t *typdef)
 Find the max-access value for the specified typdef. More...
 
ncx_data_class_t typ_get_dataclass (const typ_def_t *typdef)
 Find the data-class value for the specified typdef. More...
 
ncx_merge_t typ_get_mergetype (const typ_def_t *typdef)
 Get the merge type for a specified type def. More...
 
xmlns_id_t typ_get_nsid (const typ_template_t *typ)
 Return the namespace ID. More...
 
typ_template_ttyp_get_listtyp (typ_def_t *typdef)
 Return the typ_template for the list type, if the supplied. More...
 
const typ_template_ttyp_get_clisttyp (const typ_def_t *typdef)
 Return the typ_template for the list type, if the supplied. More...
 
typ_unionnode_ttyp_new_unionnode (typ_template_t *typ)
 Alloc and Init a typ_unionnode_t struct. More...
 
void typ_free_unionnode (typ_unionnode_t *un)
 Free a typ_unionnode_t struct. More...
 
typ_def_ttyp_get_unionnode_ptr (typ_unionnode_t *un)
 Get the proper typdef pointer from a unionnode. More...
 
typ_unionnode_ttyp_first_unionnode (typ_def_t *typdef)
 Get the first union node in the queue for a given typdef. More...
 
const typ_unionnode_ttyp_first_con_unionnode (const typ_def_t *typdef)
 Get the first union node in the queue for a given typdef constrained. More...
 
boolean typ_is_number (ncx_btype_t btyp)
 Check if the base type is numeric. More...
 
boolean typ_is_string (ncx_btype_t btyp)
 Check if the base type is a simple string (not list) More...
 
boolean typ_is_enum (ncx_btype_t btyp)
 Check if the base type is an enumeration. More...
 
typ_pattern_ttyp_new_pattern (const xmlChar *pat_str, boolean ocmode)
 Malloc and init a pattern struct. More...
 
void typ_free_pattern (typ_pattern_t *pat)
 Free a pattern struct. More...
 
status_t typ_compile_pattern (typ_pattern_t *pat)
 Compile a pattern as into a regex_t struct. More...
 
typ_pattern_ttyp_get_first_pattern (typ_def_t *typdef)
 Get the first pattern struct for a typdef. More...
 
typ_pattern_ttyp_get_next_pattern (typ_pattern_t *curpat)
 Get the next pattern struct for a typdef. More...
 
const typ_pattern_ttyp_get_first_cpattern (const typ_def_t *typdef)
 Get the first pattern struct for a typdef Const version. More...
 
const typ_pattern_ttyp_get_next_cpattern (const typ_pattern_t *curpat)
 Get the next pattern struct for a typdef Const version. More...
 
uint32 typ_get_pattern_count (const typ_def_t *typdef)
 Get the number of pattern structs in a typdef. More...
 
ncx_errinfo_ttyp_get_range_errinfo (typ_def_t *typdef)
 Get the range errinfo for a typdef. More...
 
void typ_clean_typeQ (dlq_hdr_t *que)
 Clean a queue of typ_template_t structs. More...
 
boolean typ_ok_for_inline_index (ncx_yang_version_t langver, ncx_btype_t btyp)
 Check if the base type is okay to use in an inline index decl. More...
 
boolean typ_ok_for_metadata (ncx_btype_t btyp)
 Check if the base type is okay to use in an XML attribute. More...
 
boolean typ_ok_for_union (ncx_yang_version_t langver, ncx_btype_t btyp)
 Check if the base type is okay to use in an union decl. More...
 
boolean typ_ok (const typ_def_t *typdef)
 Check if the typdef chain has any errors. More...
 
boolean typ_ok_for_xsdlist (ncx_btype_t btyp)
 Check if the base type is okay to use in an ncx:xsdlist typedef. More...
 
const xmlChar * typ_get_leafref_path (const typ_def_t *typdef)
 Get the path argument for the leafref data type. More...
 
const void * typ_get_leafref_path_addr (const typ_def_t *typdef)
 Get the address of the path argument for the leafref data type. More...
 
struct xpath_pcb_t_ * typ_get_leafref_pcb (typ_def_t *typdef)
 Get the XPath parser control block for the leafref data type returns xpath_pcb_t but cannot import due to H file loop. More...
 
ncx_leafref_class_t typ_get_leafref_class (typ_def_t *typdef)
 Get the leafref class for the leafref type. More...
 
void typ_set_leafref_class_key (typ_def_t *typdef)
 Change the leafref class for the type to NCX_LEAFREF_CLASS_KEY. More...
 
boolean typ_get_constrained (const typ_def_t *typdef)
 Get the constrained true/false field for the data type leafref or instance-identifier constrained flag. More...
 
boolean typ_get_constrained_set (const typ_def_t *typdef)
 Return TRUE if the require-instance stmt is set. More...
 
void typ_set_xref_typdef (typ_def_t *typdef, typ_def_t *target)
 Set the target typdef for a leafref or instance-identifier NCX_BT_LEAFREF or NCX_BT_INSTANCE_ID. More...
 
typ_def_ttyp_get_xref_typdef (typ_def_t *typdef)
 Get the xrefdef target typdef from a leafref or instance-identifier. More...
 
boolean typ_has_subclauses (const typ_def_t *typdef)
 Check if the specified typdef has any sub-clauses. More...
 
typ_idref_ttyp_get_first_idref (typ_def_t *typdef)
 Get the first idref field if this is an NCX_BT_IDREF typdef. More...
 
typ_idref_ttyp_get_next_idref (typ_def_t *typdef, typ_idref_t *curdef)
 Get the next idref field if this is an NCX_BT_IDREF typdef. More...
 
const typ_idref_ttyp_get_first_cidref (typ_def_t *typdef)
 Get the idref field if this is an NCX_BT_IDREF typdef Const version. More...
 
const typ_idref_ttyp_get_next_cidref (const typ_def_t *typdef, const typ_idref_t *curdef)
 Get the next idref field if this is an NCX_BT_IDREF typdef. More...
 
uint8 typ_get_fraction_digits (const typ_def_t *typdef)
 Get the fraction-digits field from the typdef chain typdef must be an NCX_BT_DECIMAL64 or 0 will be returned valid values are 1..18. More...
 
status_t typ_set_fraction_digits (typ_def_t *typdef, uint8 digits)
 Set the fraction-digits field from the typdef chain. More...
 
uint32 typ_get_typ_linenum (const typ_template_t *typ)
 Get the line number for the typ_template_t. More...
 
uint32 typ_get_typdef_linenum (const typ_def_t *typdef)
 Get the line number for the typ_def_t. More...
 
void typ_get_union_types (typ_def_t *typdef, typ_union_walker_fn_t walkerfn, void *cookie)
 Walk the union type nodes to print the names. More...
 
void typ_get_union_basetypes (typ_def_t *typdef, typ_union_walker2_fn_t walkerfn, void *cookie)
 Walk the union type nodes to print the base type names. More...
 
void typ_get_union_typdefs (typ_def_t *typdef, typ_union_walker3_fn_t walkerfn, void *cookie)
 
  • Walk the union type nodes to get the member typedefs
More...
 
const xmlChar * typ_get_yang_typename (const typ_def_t *typdef)
 Get the YANG type name for this typdef if there is one. More...
 
boolean typ_union_needs_xpath_check (typ_def_t *checkdef)
 Walk the union type nodes to check if there are any unconstrained leafref or instance-identifier nodes that need validation. More...
 
typ_idref_ttyp_new_idref (void)
 Malloc a new idref. More...
 
void typ_free_idref (typ_idref_t *idref)
 Clean and freec an idref. More...
 

Detailed Description

APIs to access compiler data strctures during compilation.

Function Documentation

◆ typ_cget_new_named()

const typ_def_t * typ_cget_new_named ( const typ_def_t typdef)

Access the new typdef inside a typ_named_t struct inside a typ_def_t.

Parameters
typdefpointer to the typ_def_t struct to check
Returns
pointer to new typ_def_t or NULL if none

◆ typ_clean_typdef()

void typ_clean_typdef ( typ_def_t typdef)

Clean a typ_def_t struct, but do not delete it.

Parameters
typdefpointer to the typ_def_t struct to clean
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_clean_typeQ()

void typ_clean_typeQ ( dlq_hdr_t *  que)

Clean a queue of typ_template_t structs.

Parameters
queQ of typ_template_t to clean
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_compile_pattern()

status_t typ_compile_pattern ( typ_pattern_t pat)

Compile a pattern as into a regex_t struct.

Parameters
[in,out]patpattern to compile
  • pat->pattern is set if return NO_ERR
Returns
status

◆ typ_enumdef_conditional()

boolean typ_enumdef_conditional ( typ_def_t typdef,
const xmlChar *  valstr 
)

Check if the specified enumdef value is conditional on if-feature.

Parameters
typdeftyp def struct to check
valstrvalue string to check (1 enum or 1 bit)
Returns
true if conditional; false if not found or not conditional
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_enumdef_count()

uint32 typ_enumdef_count ( const typ_def_t typdef)

Get the number of typ_enum_t Q entries.

Parameters
typdeftyp def struct to check
Returns
number of entries
Here is the call graph for this function:

◆ typ_find_appinfo()

const ncx_appinfo_t * typ_find_appinfo ( const typ_def_t typdef,
const xmlChar *  prefix,
const xmlChar *  name 
)

Find the specified appinfo variable by its prefix and name.

Parameters
typdeftypedef to check
prefixmodule prefix (may be NULL)
namename of the appinfo var to find
Returns
pointer to found appinfo struct or NULL if not found
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_find_appinfo_con()

const ncx_appinfo_t * typ_find_appinfo_con ( const typ_def_t typdef,
const xmlChar *  prefix,
const xmlChar *  name 
)

Find the specified appinfo name, constrained to the current typdef.

Parameters
typdeftypedef to check
prefixappinfo module prefix (may be NULL)
namename of the appinfo var to find
Returns
pointer to found appinfo struct or NULL if not found
Here is the call graph for this function:

◆ typ_find_enumdef()

typ_enum_t * typ_find_enumdef ( dlq_hdr_t *  ebQ,
const xmlChar *  name 
)

Get the specified enum def struct.

Parameters
ebQenum/bits Q to check
namename of the enum to find
Returns
pointer to the specified enum def of NULL if none
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_first_con_enumdef()

const typ_enum_t * typ_first_con_enumdef ( const typ_def_t typdef)

Get the first enum def struct constrained to this typdef.

Parameters
typdeftyp def struct to check
Returns
pointer to the first enum def of NULL if none

◆ typ_first_con_unionnode()

const typ_unionnode_t * typ_first_con_unionnode ( const typ_def_t typdef)

Get the first union node in the queue for a given typdef constrained.

Parameters
typdefpointer to type definition for the union node
Returns
pointer to first typ_unionnode struct or NULL if none
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_first_enumdef()

typ_enum_t * typ_first_enumdef ( typ_def_t typdef)

Get the first enum def struct looks past named typedefs to base typedef.

Parameters
typdeftyp def struct to check
Returns
pointer to the first enum def of NULL if none
Here is the caller graph for this function:

◆ typ_first_rangedef()

const typ_rangedef_t * typ_first_rangedef ( const typ_def_t typdef)

Return the lower bound range definition struct.

Follow typdef chains if needed until first range found

Parameters
typdeftype def struct to check
Returns
pointer to the first rangedef struct or NULL if none
Here is the call graph for this function:

◆ typ_first_rangedef_con()

const typ_rangedef_t * typ_first_rangedef_con ( const typ_def_t typdef)

Return the lower bound range definition struct Constrain search to this typdef.

Parameters
typdeftyp def struct to check
Returns
pointer to the first rangedef struct or NULL if none

◆ typ_first_strdef()

const typ_sval_t * typ_first_strdef ( const typ_def_t typdef)

Get the first string def struct.

Parameters
typdeftyp def struct to check
Returns
pointer to the first string def of NULL if none
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_first_unionnode()

typ_unionnode_t * typ_first_unionnode ( typ_def_t typdef)

Get the first union node in the queue for a given typdef.

Parameters
typdefpointer to type definition for the union node
Returns
pointer to first typ_unionnode struct or NULL if none
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_free_enum()

void typ_free_enum ( typ_enum_t en)

Free a typ_enum_t struct.

free an enumeration descriptor

Parameters
enenum struct to free
Here is the call graph for this function:

◆ typ_free_idref()

void typ_free_idref ( typ_idref_t idref)

Clean and freec an idref.

Parameters
idrefstruct to free

◆ typ_free_listval()

void typ_free_listval ( typ_listval_t lv)

Free a typ_listval_t struct free a list descriptor.

Parameters
lvtyp_listval_t struct to free
Here is the call graph for this function:

◆ typ_free_pattern()

void typ_free_pattern ( typ_pattern_t pat)

Free a pattern struct.

Must be freed from any Q before calling this function

Parameters
pattyp_pattern_t struct to free
Here is the call graph for this function:

◆ typ_free_rangedef()

void typ_free_rangedef ( typ_rangedef_t rv,
ncx_btype_t  btyp 
)

Free a typ_rangedef_t struct (range-stmt)

Parameters
rvrangeval struct to delete
btypbase type of range (float and double have malloced strings)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_free_sval()

void typ_free_sval ( typ_sval_t sv)

Free a typ_sval_t struct free a string descriptor.

Parameters
svtyp_sval_t struct to free
Here is the caller graph for this function:

◆ typ_free_template()

void typ_free_template ( typ_template_t typ)

Scrub the memory in a typ_template_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
typtyp_template_t to delete
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_free_typdef()

void typ_free_typdef ( typ_def_t typdef)

Scrub the memory in a typ_def_t by freeing all Then free the typdef itself.

Parameters
typdeftyp_def_t to delete
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_free_unionnode()

void typ_free_unionnode ( typ_unionnode_t un)

Free a typ_unionnode_t struct.

Parameters
ununion node to free
Here is the call graph for this function:

◆ typ_get_base_class()

ncx_tclass_t typ_get_base_class ( const typ_def_t typdef)

Follow any typdef links and get the class of the base typdef for the specified typedef.

Parameters
typdeftypdef to check
Returns
base class of final typ_def_t
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_get_base_typdef()

typ_def_t * typ_get_base_typdef ( typ_def_t typdef)

Get the base typ_def_t in a chain – for NCX_CL_NAMED chained typed.

Also NCX_CL_REF pointer typdefs get the real typdef that describes the type, if the input is one of the 'pointer' typdef classes. Otherwise, just return the input typdef

Parameters
typdeftypdef to check
Returns
pointer to base typ_def_t
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_get_basetype()

ncx_btype_t typ_get_basetype ( const typ_def_t typdef)

Get the final base type of the specified typ_def_t.

Follow any typdef links and get the actual base type of the specified typedef

Parameters
typdeftypdef to check
Returns
base type of final typ_def_t
Here is the call graph for this function:

◆ typ_get_basetype2()

ncx_btype_t typ_get_basetype2 ( typ_def_t typdef)

Get the final base type of the specified typ_def_t.

Follow any typdef links and get the actual base type of the specified typedef WILL SET final_type is btyp is set but not final_type

Parameters
typdeftypdef to check
Returns
base type of final typ_def_t
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_get_basetype_name()

const xmlChar * typ_get_basetype_name ( const typ_template_t typ)

Get the name of the final base type of the specified typ_template_t.

Parameters
typtemplate containing the typdef to check
Returns
base type name of final embedded typ_def_t
Here is the call graph for this function:

◆ typ_get_basetype_typ()

typ_template_t * typ_get_basetype_typ ( ncx_btype_t  btyp)

Get the default typ_template_t for the specified base type.

Parameters
btypbase type to get
Returns
pointer to the type template for the specified basetype

◆ typ_get_basetype_typdef()

typ_def_t * typ_get_basetype_typdef ( ncx_btype_t  btyp)

Get the default typdef for the specified base type.

Parameters
btypbase type to get
Returns
pointer to the typdef for the specified basetype
Here is the caller graph for this function:

◆ typ_get_cbase_typdef()

const typ_def_t * typ_get_cbase_typdef ( const typ_def_t typdef)

Get the base typ_def_t in a chain – for NCX_CL_NAMED chained typed Also NCX_CL_REF pointer typdefs.

Parameters
typdeftypdef to check
Returns
pointer to base typ_def_t
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_get_clisttyp()

const typ_template_t * typ_get_clisttyp ( const typ_def_t typdef)

Return the typ_template for the list type, if the supplied.

typ_template contains a list typ_def, or named type chain leads to a NCX_BT_SLIST typdef (CONST version)

Parameters
typdeftyp_template_t struct to check
Returns
type template that has the list typdef
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_get_constrained()

boolean typ_get_constrained ( const typ_def_t typdef)

Get the constrained true/false field for the data type leafref or instance-identifier constrained flag.

Parameters
typdeftypdef for the the leafref or instance-identifier
Returns
TRUE if constrained; FALSE if not
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_get_constrained_set()

boolean typ_get_constrained_set ( const typ_def_t typdef)

Return TRUE if the require-instance stmt is set.

Parameters
typdeftypdef to check
Returns
TRUE if required-instance-stmt was present
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_get_correct_enumdef()

typ_def_t * typ_get_correct_enumdef ( typ_def_t typdef)

Get the typ_enum_t to use.

Parameters
typdeftyp def struct to check
Returns
pointer to found entry
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_get_cparent_typdef()

const typ_def_t * typ_get_cparent_typdef ( const typ_def_t typdef)

Get the next typ_def_t in a chain – for NCX_CL_NAMED chained typed.

Also NCX_CL_REF pointer typdefs Ignores current named type even if if has new restrictions

Parameters
typdeftypdef to check
Returns
pointer to next non-empty typ_def_t

◆ typ_get_cqual_typdef()

const typ_def_t * typ_get_cqual_typdef ( const typ_def_t typdef,
ncx_squal_t  squal 
)

Get the final typ_def_t of the specified typ_def_t based on the qualifier.

Parameters
typdeftypdef to check
squaltype of search qualifier desired
           NCX_SQUAL_NONE == get first non-empty typdef
           NCX_SQUAL_RANGE == find the first w/ range definition
           NCX_SQUAL_VAL == find the first w/ stringval/pattern def
           NCX_SQUAL_META == find the first typdef w/ meta-data def
Returns
pointer to found typ_def_t or NULL if none found
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_get_crange_con()

const typ_range_t * typ_get_crange_con ( const typ_def_t typdef)

Return the range struct for the given typdef Do not follow typdef chains.

Parameters
typdeftyp def struct to check
Returns
pointer to the range struct for this typdef

◆ typ_get_crangeQ()

const dlq_hdr_t * typ_get_crangeQ ( const typ_def_t typdef)

Return the rangeQ for the given typdef.

Follow typdef chains if needed until first range found

Parameters
typdeftyp def struct to check
Returns
pointer to the first rangedef struct or NULL if none
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_get_crangeQ_con()

const dlq_hdr_t * typ_get_crangeQ_con ( const typ_def_t typdef)

Return the rangeQ for the given typdef Do not follow typdef chains.

Parameters
typdeftyp def struct to check
Returns
pointer to the rangeQ from this typdef, or NULL if none

◆ typ_get_cuserdef_typdef()

const typ_def_t * typ_get_cuserdef_typdef ( const typ_def_t typdef)

Get the base typ_def_t in a chain – for NCX_CL_NAMED chained typed.

Also NCX_CL_REF pointer typdefs Stop if the userdef field is set CONST VERSION

Parameters
typdeftypdef to check
Returns
pointer to userdef typ_def_t or NLL if not found
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_get_dataclass()

ncx_data_class_t typ_get_dataclass ( const typ_def_t typdef)

Find the data-class value for the specified typdef.

Follow named types to see if any parent typdef has a data-class clause, if none found in the parameter

Parameters
typdeftyp_def_t struct to check
Returns
data class enumeration
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_get_default()

const xmlChar * typ_get_default ( const typ_def_t typdef)

Check if this typdef has a default value defined get default from typdef.

Parameters
typdeftyp_def_t struct to check
Returns
pointer to default or NULL if there is none
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_get_defval()

const xmlChar * typ_get_defval ( const typ_template_t typ)

Find the default value string for the specified type template get default from template.

Parameters
typtyp_template_t struct to check
Returns
pointer to found defval string or NULL if none
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_get_enumdef()

typ_enum_t * typ_get_enumdef ( typ_def_t typdef,
const xmlChar *  valstr 
)

Get the typ_enum_t.

Parameters
typdeftyp def struct to check
valstrvalue string to find (1 enum or 1 bit)
Returns
pointer to found entry
Here is the call graph for this function:

◆ typ_get_enumdef_n()

typ_enum_t * typ_get_enumdef_n ( typ_def_t typdef,
uint32  num 
)

Get the enum defs defined based on enum order.

Parameters
typdeftyp def struct to check
numenum # [ 0 to N-1 based ]
Returns
pointer to Nth enumdef or NULL if none

◆ typ_get_first_cidref()

const typ_idref_t * typ_get_first_cidref ( typ_def_t typdef)

Get the idref field if this is an NCX_BT_IDREF typdef Const version.

Parameters
typdeftypdef to check
Returns
pointer to idref field or NULL if wrong type
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_get_first_cpattern()

const typ_pattern_t * typ_get_first_cpattern ( const typ_def_t typdef)

Get the first pattern struct for a typdef Const version.

Parameters
typdeftyp_def_t to check
Returns
pointer to pattern string or NULL if none
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_get_first_idref()

typ_idref_t * typ_get_first_idref ( typ_def_t typdef)

Get the first idref field if this is an NCX_BT_IDREF typdef.

Parameters
typdeftypdef to check
Returns
pointer to idref field or NULL if wrong type
Here is the call graph for this function:

◆ typ_get_first_pattern()

typ_pattern_t * typ_get_first_pattern ( typ_def_t typdef)

Get the first pattern struct for a typdef.

Parameters
typdeftyp_def_t to check
Returns
pointer to pattern string or NULL if none
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_get_fraction_digits()

uint8 typ_get_fraction_digits ( const typ_def_t typdef)

Get the fraction-digits field from the typdef chain typdef must be an NCX_BT_DECIMAL64 or 0 will be returned valid values are 1..18.

Parameters
typdeftypdef to check
Returns
number of fixed decimal digits expected (1..18) 0 if some error
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_get_iqualval()

ncx_iqual_t typ_get_iqualval ( const typ_template_t typ)

Find the instance qualifier value enum for the specified type template.

Parameters
typtyp_template_t struct to check
Returns
iqual value enum
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_get_iqualval_def()

ncx_iqual_t typ_get_iqualval_def ( const typ_def_t typdef)

Find the instance qualifier value enum for the specified type template.

Parameters
typdeftyp_def_t struct to check
Returns
iqual value enum
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_get_leafref_class()

ncx_leafref_class_t typ_get_leafref_class ( typ_def_t typdef)

Get the leafref class for the leafref type.

Parameters
typdeftypdef for the leafref
Returns
class enumeration
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_get_leafref_path()

const xmlChar * typ_get_leafref_path ( const typ_def_t typdef)

Get the path argument for the leafref data type.

Parameters
typdeftypdef for the the leafref
Returns
pointer to the path argument or NULL if some error
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_get_leafref_path_addr()

const void * typ_get_leafref_path_addr ( const typ_def_t typdef)

Get the address of the path argument for the leafref data type.

Parameters
typdeftypdef for the the leafref
Returns
pointer to the path argument or NULL if some error
Here is the call graph for this function:

◆ typ_get_leafref_pcb()

struct xpath_pcb_t_ * typ_get_leafref_pcb ( typ_def_t typdef)

Get the XPath parser control block for the leafref data type returns xpath_pcb_t but cannot import due to H file loop.

Parameters
typdeftypdef for the the leafref
Returns
pointer to the PCB struct or NULL if some error
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_get_listtyp()

typ_template_t * typ_get_listtyp ( typ_def_t typdef)

Return the typ_template for the list type, if the supplied.

typ_template contains a list typ_def, or named type chain leads to a NCX_BT_SLIST or NCX_BT_BITS typdef

Parameters
typdeftyp_template_t struct to check
Returns
type template that has the list typdef
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_get_maxaccess()

ncx_access_t typ_get_maxaccess ( const typ_def_t typdef)

Find the max-access value for the specified typdef.

Follow named types to see if any parent typdef has a maxaccess clause, if none found in the parameter

Parameters
typdeftyp_def_t struct to check
Returns
maxaccess enumeration
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_get_maxrows()

uint32 typ_get_maxrows ( const typ_def_t typdef)

Get the maxrows value if it exists or zero if not.

Parameters
typdeftypdef to check
Returns
max number of rows or zero if not applicable
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_get_mergetype()

ncx_merge_t typ_get_mergetype ( const typ_def_t typdef)

Get the merge type for a specified type def.

Parameters
typdeftyp_def_t struct to check
Returns
merge type enumeration
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_get_name()

const xmlChar * typ_get_name ( const typ_def_t typdef)

Get the name for the specified typdef.

Parameters
typdeftype definition to check
Returns
type name or empty string if some error
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_get_named_type_linenum()

uint32 typ_get_named_type_linenum ( const typ_def_t typdef)

Get the line number of the type template of the named type.

Parameters
typdefpointer to the typ_def_t struct to check
Returns
pointer to type name, NULL if some error
Here is the call graph for this function:

◆ typ_get_named_type_modname()

const xmlChar * typ_get_named_type_modname ( const typ_def_t typdef)

Get the module name of the named typ.

Parameters
typdefpointer to the typ_def_t struct to check
Returns
pointer to module name, NULL if some error
Here is the caller graph for this function:

◆ typ_get_named_typename()

const xmlChar * typ_get_named_typename ( const typ_def_t typdef)

Get the type name of the named typ.

Parameters
typdefpointer to the typ_def_t struct to check
Returns
pointer to type name, NULL if some error

◆ typ_get_new_named()

typ_def_t * typ_get_new_named ( typ_def_t typdef)

Access the new typdef inside a typ_named_t struct inside a typ_def_t.

Parameters
typdefpointer to the typ_def_t struct to check
Returns
pointer to new typ_def_t or NULL if none
Here is the caller graph for this function:

◆ typ_get_next_cidref()

const typ_idref_t * typ_get_next_cidref ( const typ_def_t typdef,
const typ_idref_t curdef 
)

Get the next idref field if this is an NCX_BT_IDREF typdef.

Parameters
typdeftypdef to check
curdefcurrent idref
Returns
pointer to idref field or NULL if wrong type

◆ typ_get_next_cpattern()

const typ_pattern_t * typ_get_next_cpattern ( const typ_pattern_t curpat)

Get the next pattern struct for a typdef Const version.

Parameters
curpatcurrent typ_pattern_t to check
Returns
pointer to next pattern struct or NULL if none
Here is the caller graph for this function:

◆ typ_get_next_idref()

typ_idref_t * typ_get_next_idref ( typ_def_t typdef,
typ_idref_t curdef 
)

Get the next idref field if this is an NCX_BT_IDREF typdef.

Parameters
typdeftypdef to check
curdefcurrent idref
Returns
pointer to idref field or NULL if wrong type

◆ typ_get_next_pattern()

typ_pattern_t * typ_get_next_pattern ( typ_pattern_t curpat)

Get the next pattern struct for a typdef.

Parameters
curpatcurrent typ_pattern_t to check
Returns
pointer to next pattern struct or NULL if none
Here is the caller graph for this function:

◆ typ_get_next_typdef()

typ_def_t * typ_get_next_typdef ( typ_def_t typdef)

Get the next typ_def_t in a chain – for NCX_CL_NAMED chained typed.

Also NCX_CL_REF pointer typdefs Get the next typdef in the chain for NCX_CL_NAMED or NCX_CL_REF Returns the input typdef for all other typdef classes

Parameters
typdeftypdef to check
Returns
pointer to next non-empty typ_def_t
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_get_nsid()

xmlns_id_t typ_get_nsid ( const typ_template_t typ)

Return the namespace ID.

Parameters
typtyp_template_t struct to check
Returns
namespace ID of the type

◆ typ_get_parent_typdef()

typ_def_t * typ_get_parent_typdef ( typ_def_t typdef)

Get the next typ_def_t in a chain – for NCX_CL_NAMED chained typed.

Also NCX_CL_REF pointer typdefs Ignores current named type even if if has new restrictions Get the parent typdef for NCX_CL_NAMED and NCX_CL_REF Returns NULL for all other classes

Parameters
typdeftypdef to check
Returns
pointer to next non-empty typ_def_t
Here is the caller graph for this function:

◆ typ_get_parent_type()

const typ_template_t * typ_get_parent_type ( const typ_template_t typ)

Get the next typ_template_t in a chain – for NCX_CL_NAMED only.

Parameters
typtype template to check
Returns
pointer to next non-empty typ_template_t for a named type

◆ typ_get_parenttype_name()

const xmlChar * typ_get_parenttype_name ( const typ_template_t typ)

Get the final base type of the specified typ_def_t.

Parameters
typtyp template to check
Returns
base type name string of final typ_def_t

◆ typ_get_pattern_count()

uint32 typ_get_pattern_count ( const typ_def_t typdef)

Get the number of pattern structs in a typdef.

Parameters
typdeftyp_def_t to check
Returns
count of the typ_pattern_t structs found
Here is the call graph for this function:

◆ typ_get_qual_typdef()

typ_def_t * typ_get_qual_typdef ( typ_def_t typdef,
ncx_squal_t  squal 
)

Get the final typ_def_t of the specified typ_def_t based on the qualifier.

Get the next typdef in the chain for NCX_CL_NAMED or NCX_CL_REF Skip any named types without the specific restriction defined

Returns the input typdef for simple typdef classes

Parameters
typdeftypdef to check
squaltype of search qualifier desired
           NCX_SQUAL_NONE == get first non-empty typdef
           NCX_SQUAL_RANGE == find the first w/ range definition
           NCX_SQUAL_VAL == find the first w/ stringval/pattern def
           NCX_SQUAL_META == find the first typdef w/ meta-data def
Returns
pointer to found typ_def_t or NULL if none found
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_get_range_con()

typ_range_t * typ_get_range_con ( typ_def_t typdef)

Return the range struct for the given typdef Do not follow typdef chains.

Parameters
typdeftyp def struct to check
Returns
pointer to the range struct for this typdef

◆ typ_get_range_errinfo()

ncx_errinfo_t * typ_get_range_errinfo ( typ_def_t typdef)

Get the range errinfo for a typdef.

Parameters
typdeftyp_def_t to check
Returns
pointer to pattern string or NULL if none
Here is the caller graph for this function:

◆ typ_get_range_type()

ncx_btype_t typ_get_range_type ( ncx_btype_t  btyp)

Get the correct typ_rangedef_t data type for the indicated base type.

get the proper range base type to use for a given base type

Parameters
btypbase type enum
Returns
base type enum of the range data type
Here is the caller graph for this function:

◆ typ_get_rangebounds_con()

status_t typ_get_rangebounds_con ( const typ_def_t typdef,
ncx_btype_t btyp,
const ncx_num_t **  lb,
const ncx_num_t **  ub 
)

Return the lower and upper bound range number.

Constrain search to this typdef deprecated – does not support multi-part ranges

Parameters
typdeftyp def struct to check
[out]btyppointer to output range number type
*btyp the type of number in the return type, if non-NULL
[out]lbpointer to output lower bound number
*lb lower bound number
[out]ubpointer to output upper bound number
*ub upper bound number
Returns
status, NO_ERR == something found

◆ typ_get_rangeQ()

dlq_hdr_t * typ_get_rangeQ ( typ_def_t typdef)

Return the rangeQ for the given typdef.

Follow typdef chains if needed until first range found

Parameters
typdeftyp def struct to check
Returns
pointer to the first rangedef struct or NULL if none
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_get_rangeQ_con()

dlq_hdr_t * typ_get_rangeQ_con ( typ_def_t typdef)

Return the rangeQ for the given typdef Do not follow typdef chains.

Parameters
typdeftyp def struct to check
Returns
pointer to the rangeQ from this typdef, or NULL if none
Here is the caller graph for this function:

◆ typ_get_rangestr()

const xmlChar * typ_get_rangestr ( const typ_def_t typdef)

Return the range string for the given typdef chain.

Parameters
typdeftyp def struct to check
Returns
pointer to the range string for this typdef, NULL if none
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_get_strrest()

ncx_strrest_t typ_get_strrest ( const typ_def_t typdef)

Get the string restrinvtion type set for this typdef.

Parameters
typdeftypdef to check
Returns
string restrinction enumeration value
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_get_typ_linenum()

uint32 typ_get_typ_linenum ( const typ_template_t typ)

Get the line number for the typ_template_t.

Parameters
typtype template to check
Returns
line number
Here is the caller graph for this function:

◆ typ_get_typdef_linenum()

uint32 typ_get_typdef_linenum ( const typ_def_t typdef)

Get the line number for the typ_def_t.

Parameters
typdeftypdef to check
Returns
line number

◆ typ_get_union_basetypes()

void typ_get_union_basetypes ( typ_def_t typdef,
typ_union_walker2_fn_t  walkerfn,
void *  cookie 
)

Walk the union type nodes to print the base type names.

Parameters
typdeftyp_def_t for the designated union type
walkerfnunion node walker fn
cookiepointer to pass to walkerfn
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_get_union_typdefs()

void typ_get_union_typdefs ( typ_def_t typdef,
typ_union_walker3_fn_t  walkerfn,
void *  cookie 
)

  • Walk the union type nodes to get the member typedefs

Parameters
typdeftyp_def_t for the designated union type
walkerfnunion node walker fn
cookiepointer to pass to walkerfn
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_get_union_types()

void typ_get_union_types ( typ_def_t typdef,
typ_union_walker_fn_t  walkerfn,
void *  cookie 
)

Walk the union type nodes to print the names.

Parameters
typdeftyp_def_t for the designated union type
walkerfnunion node walker fn
cookiepointer to pass to walkerfn
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_get_unionnode_ptr()

typ_def_t * typ_get_unionnode_ptr ( typ_unionnode_t un)

Get the proper typdef pointer from a unionnode.

Parameters
ununion node to check
Returns
pointer to the typ_def_t inside

◆ typ_get_units()

const xmlChar * typ_get_units ( const typ_template_t typ)

Find the units string for the specified type template.

Parameters
typtyp_template_t struct to check
Returns
pointer to found units string or NULL if none
Here is the call graph for this function:

◆ typ_get_units_from_typdef()

const xmlChar * typ_get_units_from_typdef ( const typ_def_t typdef)

Find the units string for the specified typdef template.

Follow any NCX_CL_NAMED typdefs and check for a units clause in the the nearest ancestor typdef get units from named type if any

Parameters
typdeftyp_def_t struct to check
Returns
pointer to found units string or NULL if none
Here is the caller graph for this function:

◆ typ_get_userdef_typdef()

typ_def_t * typ_get_userdef_typdef ( typ_def_t typdef)

Get the base typ_def_t in a chain – for NCX_CL_NAMED chained typed.

Also NCX_CL_REF pointer typdefs Stop if the userdef field is set

Parameters
typdeftypdef to check
Returns
pointer to userdef typ_def_t or NLL if not found
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_get_xref_typdef()

typ_def_t * typ_get_xref_typdef ( typ_def_t typdef)

Get the xrefdef target typdef from a leafref or instance-identifier.

NCX_BT_LEAFREF or NCX_BT_INSTANCE_ID

Parameters
typdeftypdef for the the leafref or instance-identifier
Returns
pointer to the typdef or NULL if not found
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_get_yang_typename()

const xmlChar * typ_get_yang_typename ( const typ_def_t typdef)

Get the YANG type name for this typdef if there is one.

Parameters
typdefpointer to the typ_def_t struct to check
Returns
pointer to YANG type name, NULL if some error
Here is the caller graph for this function:

◆ typ_has_children()

boolean typ_has_children ( ncx_btype_t  btyp)

Check if this is a data type that uses the val.v.childQ.

Parameters
btypbase type enum
Returns
TRUE if the childQ is used, FALSE otherwise
Here is the caller graph for this function:

◆ typ_has_index()

boolean typ_has_index ( ncx_btype_t  btyp)

Check if this is a data type that has an index.

Parameters
btypbase type enum
Returns
TRUE if the indexQ is used, FALSE otherwise

◆ typ_has_subclauses()

boolean typ_has_subclauses ( const typ_def_t typdef)

Check if the specified typdef has any sub-clauses.

Used by yangdump to reverse-engineer the YANG from the typdef If any appinfo clauses present, then the result will be TRUE

Parameters
typdeftypdef to check
Returns
TRUE if any sub-clauses, FALSE otherwise

◆ typ_init_named()

void typ_init_named ( typ_def_t tdef)

Init a typ_named_t struct inside a typ_def_t.

init a named data type after typ_init_typdef

INPUTS: typdef == pointer to the typ_def_t struct to init as a NCX_CL_SIMPLE variant

◆ typ_init_simple()

void typ_init_simple ( typ_def_t tdef,
ncx_btype_t  btyp 
)

Init a typ_simple_t struct inside a typ_def_t.

init a simple data type after typ_init_typdef

Parameters
tdefpointer to the typ_def_t struct to init as a NCX_CL_SIMPLE variant
btypbase type to use for type
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_init_typdef()

void typ_init_typdef ( typ_def_t typdef)

init a pre-allocated typdef (done first)

Initialize the fields in a typ_def_t

  !! Still need to call typ_init_simple
  !! when the actual builting type is determined
Parameters
typdefpointer to the struct to initialize
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_is_enum()

boolean typ_is_enum ( ncx_btype_t  btyp)

Check if the base type is an enumeration.

Parameters
btypbase type enum to check
Returns
TRUE if base type is an enumeration
FALSE if some other type

◆ typ_is_number()

boolean typ_is_number ( ncx_btype_t  btyp)

Check if the base type is numeric.

Parameters
btypbasetype enum to check
Returns
TRUE if base type is numeric
FALSE if some other type
Here is the caller graph for this function:

◆ typ_is_qname_string()

boolean typ_is_qname_string ( const typ_def_t typdef)

Find the ncx:qname extension within the specified typdef chain.

Parameters
typdefstart of typ_def_t chain to check
Returns
TRUE if ncx:qname extension found
FALSE otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_is_schema_instance_string()

boolean typ_is_schema_instance_string ( const typ_def_t typdef)

Find the ncx:schema-instance extension within the specified typdef chain.

Parameters
typdefstart of typ_def_t chain to check
Returns
TRUE if ncx:schema-instance extension found
FALSE otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_is_simple()

boolean typ_is_simple ( ncx_btype_t  btyp)

Check if this is a simple data type.

Parameters
btypbase type enum
Returns
TRUE if this is a simple data type, FALSE otherwise
Here is the caller graph for this function:

◆ typ_is_string()

boolean typ_is_string ( ncx_btype_t  btyp)

Check if the base type is a simple string (not list)

Parameters
btypbase type enum to check
Returns
TRUE if base type is textual
FALSE if some other type
Here is the caller graph for this function:

◆ typ_is_xpath_string()

boolean typ_is_xpath_string ( const typ_def_t typdef)

Find the ncx:xpath extension within the specified typdef chain.

Parameters
typdefstart of typ_def_t chain to check
Returns
TRUE if ncx:xpath extension found
FALSE otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_is_xsd_simple()

boolean typ_is_xsd_simple ( ncx_btype_t  btyp)

Check if this is a simple data type in XSD encoding.

Parameters
btypbase type enum
Returns
TRUE if this is a simple data type, FALSE otherwise

◆ typ_load_basetypes()

status_t typ_load_basetypes ( void  )

Create typ_template_t structs for the base types.

Must be called before any modules are loaded load the typ_template_t structs for the ncx_btype_t types MUST be called during ncx_init startup

Returns
status
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_new_enum()

typ_enum_t * typ_new_enum ( const xmlChar *  name)

Alloc and Init a typ_enum_t struct.

malloc and init an enumeration descriptor, strdup name ptr

Parameters
namename string for the enumeration
Returns
pointer to malloced struct or NULL if memory error Note that the enum integer value is initialized to zero
Here is the call graph for this function:

◆ typ_new_enum2()

typ_enum_t * typ_new_enum2 ( xmlChar *  name)

Alloc and Init a typ_enum_t struct.

Use the string value as-is, instead of mallocing a new one malloc and init an enumeration descriptor, pass off name ptr

Parameters
namename string for the enumeration (will get free-ed later!!) PASS OFF THIS MEMORY HERE
Returns
pointer to malloced struct or NULL if memory error Note that the enum integer value is initialized to zero
Here is the call graph for this function:

◆ typ_new_idref()

typ_idref_t * typ_new_idref ( void  )

Malloc a new idref.

Returns
pointer to malloced idref struct

◆ typ_new_listval()

typ_listval_t * typ_new_listval ( void  )

Alloc and Init a typ_listval_t struct malloc and init a list descriptor.

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

◆ typ_new_pattern()

typ_pattern_t * typ_new_pattern ( const xmlChar *  pat_str,
boolean  ocmode 
)

Malloc and init a pattern struct.

Parameters
pat_strpattern string to copy and save
ocmodeT:openconfig pattern mode; F: IETF pattern mode
Returns
malloced struct or NULL if memory error
Here is the call graph for this function:

◆ typ_new_rangedef()

typ_rangedef_t * typ_new_rangedef ( void  )

Alloc and Init a typ_rangedef_t struct (range-stmt)

Returns
pointer to malloced struct or NULL if memory error

◆ typ_new_sval()

typ_sval_t * typ_new_sval ( const xmlChar *  str,
ncx_btype_t  btyp 
)

Alloc and Init a typ_sval_t struct malloc and init a string descriptor.

Parameters
strstring value inside token to copy
btyptype of string (NCX_BT_STRING/LIST, OSTRING/OLIST)
Returns
pointer to malloced struct or NULL if memory error
Here is the call graph for this function:

◆ typ_new_template()

typ_template_t * typ_new_template ( void  )

Malloc and initialize the fields in a typ_template_t.

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

◆ typ_new_typdef()

typ_def_t * typ_new_typdef ( void  )

Malloc and initialize the fields in a typ_def_t.

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

◆ typ_new_unionnode()

typ_unionnode_t * typ_new_unionnode ( typ_template_t typ)

Alloc and Init a typ_unionnode_t struct.

Parameters
typpointer to type template for this union node
Returns
pointer to malloced struct or NULL if memory error

◆ typ_next_enumdef()

typ_enum_t * typ_next_enumdef ( typ_enum_t enumdef)

Get the next enum def struct.

Parameters
enumdeftyp enum struct to check
Returns
pointer to the first enum def of NULL if none
Here is the caller graph for this function:

◆ typ_normalize_rangeQ()

void typ_normalize_rangeQ ( dlq_hdr_t *  rangeQ,
ncx_btype_t  btyp 
)

Start with a valid rangedef chain.

Combine any consecutive range definitions like 1..4|5|6|7..9 would break replaced with 1..9 concat consecutive rangedef sections for integral numbers

Not done for NCX_BT_FLOAT64 data types

Parameters
rangeQQ of typ_rangeval_t structs to normalize
btypbase type of range
Here is the call graph for this function:

◆ typ_ok()

boolean typ_ok ( const typ_def_t typdef)

Check if the typdef chain has any errors.

Checks the named types in the typdef chain to see if they were already flagged as invalid

Parameters
typdefstarting typdef to check
Returns
TRUE if okay, FALSE if any errors so far
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_ok_for_inline_index()

boolean typ_ok_for_inline_index ( ncx_yang_version_t  langver,
ncx_btype_t  btyp 
)

Check if the base type is okay to use in an inline index decl.

Parameters
langverYANG language version
btypbase type enum
Returns
TRUE if okay, FALSE if not
Here is the caller graph for this function:

◆ typ_ok_for_metadata()

boolean typ_ok_for_metadata ( ncx_btype_t  btyp)

Check if the base type is okay to use in an XML attribute.

Parameters
btypbase type enum
Returns
TRUE if okay, FALSE if not
Here is the call graph for this function:

◆ typ_ok_for_union()

boolean typ_ok_for_union ( ncx_yang_version_t  langver,
ncx_btype_t  btyp 
)

Check if the base type is okay to use in an union decl.

Parameters
langverYANG language version enum
btypbase type enum
Returns
TRUE if okay, FALSE if not

◆ typ_ok_for_xsdlist()

boolean typ_ok_for_xsdlist ( ncx_btype_t  btyp)

Check if the base type is okay to use in an ncx:xsdlist typedef.

Parameters
btypbase type enum
Returns
TRUE if okay, FALSE if not

◆ typ_set_fraction_digits()

status_t typ_set_fraction_digits ( typ_def_t typdef,
uint8  digits 
)

Set the fraction-digits field from the typdef chain.

Parameters
typdeftypdef to set (must be TYP_CL_SIMPLE)
digitsdigits value to set
Returns
status

◆ typ_set_leafref_class_key()

void typ_set_leafref_class_key ( typ_def_t typdef)

Change the leafref class for the type to NCX_LEAFREF_CLASS_KEY.

Parameters
typdeftypdef for the the leafref
Here is the call graph for this function:

◆ typ_set_named_typdef()

void typ_set_named_typdef ( typ_def_t typdef,
typ_template_t imptyp 
)

Set the fields in a named typedef (used by YANG parser)

Parameters
typdeftype def struct to set
imptypnamed type to set within 'typ.typdef'

◆ typ_set_new_named()

status_t typ_set_new_named ( typ_def_t typdef,
ncx_btype_t  btyp 
)

Create a new typdef inside a typ_named_t struct inside a typ_def_t.

Parameters
typdefpointer to the typ_def_t struct to setup
btypbuiltin type (NCX_BT_NONE if local type extension)
Returns
status
Here is the call graph for this function:

◆ typ_set_simple_typdef()

void typ_set_simple_typdef ( typ_template_t typ,
ncx_btype_t  btyp 
)

Set the fields in a simple typedef (used by YANG parser)

Parameters
typtype template to set
btypbuiltin type to set within 'typ.typdef'

◆ typ_set_strrest()

void typ_set_strrest ( typ_def_t typdef,
ncx_strrest_t  strrest 
)

Set the string restrinvtion type set for this typdef.

Parameters
typdeftypdef to check
strreststring restriction enum value to set

◆ typ_set_xref_typdef()

void typ_set_xref_typdef ( typ_def_t typdef,
typ_def_t target 
)

Set the target typdef for a leafref or instance-identifier NCX_BT_LEAFREF or NCX_BT_INSTANCE_ID.

Parameters
[in,out]typdeftypdef for the the leafref or instance-identifier; typdef is set with the target typdef
targettarget object typedef
Here is the call graph for this function:

◆ typ_union_needs_xpath_check()

boolean typ_union_needs_xpath_check ( typ_def_t checkdef)

Walk the union type nodes to check if there are any unconstrained leafref or instance-identifier nodes that need validation.

Parameters
checkdeftyp_def_t for the designated union type
Returns
TRUE if leafref or instance-identifier found in the union that has require-instance true
FALSE if no leafref or instance-identifier found in the union that has require-instance false
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_unload_basetypes()

void typ_unload_basetypes ( void  )

Unload and destroy the typ_template_t structs for the base types unload the typ_template_t structs for the ncx_btype_t types.

SHOULD be called during ncx_cleanup

Here is the call graph for this function:
Here is the caller graph for this function:

◆ typ_unset_named_typdef()

void typ_unset_named_typdef ( typ_def_t typdef)

UnSet the typ link in a named typedef (used by YANG parser)

Needed if there is a named type loop to prevent any type references such as typ_get_basetype and loop until crash

Parameters
typdeftype def struct to set