yumapro  23.10T-7
YumaPro SDK
Loading...
Searching...
No Matches
grp.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2008 - 2012, Andy Bierman, All Rights Reserved.
3 * Copyright (c) 2012 - 2021, YumaWorks, Inc., All Rights Reserved.
4 *
5 * Unless required by applicable law or agreed to in writing,
6 * software distributed under the License is distributed on an
7 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8 * KIND, either express or implied. See the License for the
9 * specific language governing permissions and limitations
10 * under the License.
11 */
12#ifndef _H_grp
13#define _H_grp
14
15/* FILE: grp.h
16*********************************************************************
17* *
18* P U R P O S E *
19* *
20*********************************************************************/
21
27/*********************************************************************
28* *
29* C H A N G E H I S T O R Y *
30* *
31*********************************************************************
32
33date init comment
34----------------------------------------------------------------------
3509-dec-07 abb Begun
36
37*/
38
39#include <xmlstring.h>
40#include <xmlregexp.h>
41
42#ifndef _H_ncxconst
43#include "ncxconst.h"
44#endif
45
46#ifndef _H_ncxtypes
47#include "ncxtypes.h"
48#endif
49
50#ifndef _H_status
51#include "status.h"
52#endif
53
54#ifndef _H_tk
55#include "tk.h"
56#endif
57
58#ifndef _H_xmlns
59#include "xmlns.h"
60#endif
61
62#ifdef __cplusplus
63extern "C" {
64#endif
65
66/********************************************************************
67* *
68* C O N S T A N T S *
69* *
70*********************************************************************/
71
72
73/********************************************************************
74* *
75* T Y P E S *
76* *
77*********************************************************************/
78
87typedef struct grp_template_t_ {
88 dlq_hdr_t qhdr;
89 xmlChar *name;
90 xmlChar *descr;
91 xmlChar *ref;
93 void *parent;
94 struct grp_template_t_ *parentgrp;
96 boolean used;
97 boolean istop;
98 boolean expand_done;
99 boolean loop_detected;
101 uint32 grpindex;
102 dlq_hdr_t typedefQ;
103 dlq_hdr_t groupingQ;
104 dlq_hdr_t datadefQ;
105 dlq_hdr_t appinfoQ;
108
109
110
111/********************************************************************
112* *
113* F U N C T I O N S *
114* *
115*********************************************************************/
116
117
123extern grp_template_t *
124 grp_new_template (void);
125
126
136extern void
138
139
145extern void
146 grp_clean_groupingQ (dlq_hdr_t *que);
147
148
156extern boolean
157 grp_has_typedefs (const grp_template_t *grp);
158
159
166extern const xmlChar *
167 grp_get_mod_name (const grp_template_t *grp);
168
169
172#ifdef __cplusplus
173} /* end extern 'C' */
174#endif
175
176#endif /* _H_grp */
uint16 xmlns_id_t
integer handle for registered namespaces
Definition: xmlns.h:89
ncx_status_t
enumeration for different YANG data-def status values
Definition: ncxtypes.h:583
void grp_clean_groupingQ(dlq_hdr_t *que)
Clean a queue of grp_template_t structs.
Definition: grp.c:161
grp_template_t * grp_new_template(void)
Malloc and initialize the fields in a grp_template_t.
Definition: grp.c:100
void grp_free_template(grp_template_t *grp)
Scrub the memory in a grp_template_t by freeing all the sub-fields and then freeing the entire struct...
Definition: grp.c:131
boolean grp_has_typedefs(const grp_template_t *grp)
Check if the grouping contains any typedefs.
Definition: grp.c:187
const xmlChar * grp_get_mod_name(const grp_template_t *grp)
Get the module name for a grouping.
Definition: grp.c:226
Contains NCX constants.
YANG module data structures Many internal representations of YANG module constructs.
Global error messages for status code enumerations.
One YANG 'grouping' definition – sibling set template.
Definition: grp.h:87
ncx_error_t tkerr
file and line info for compiler
Definition: grp.h:92
dlq_hdr_t appinfoQ
Q of ncx_appinfo_t.
Definition: grp.h:105
dlq_hdr_t datadefQ
Q of obj_template_t.
Definition: grp.h:104
boolean expand_done
T: expand already done.
Definition: grp.h:98
xmlChar * name
name of the grouping
Definition: grp.h:89
ncx_status_t status
parse status
Definition: grp.h:100
xmlChar * ref
reference-stmt (not on server)
Definition: grp.h:91
void * parent
const back-ptr to parent obj
Definition: grp.h:93
dlq_hdr_t qhdr
queue header
Definition: grp.h:88
boolean istop
T: top-level grouping.
Definition: grp.h:97
boolean loop_detected
T: loop detected by compiler.
Definition: grp.h:99
xmlChar * descr
description-stmt (not on server)
Definition: grp.h:90
dlq_hdr_t groupingQ
Q of grp_template_t.
Definition: grp.h:103
boolean used
used flag for yangdiff use
Definition: grp.h:96
dlq_hdr_t typedefQ
Q of typ_template_t.
Definition: grp.h:102
xmlns_id_t nsid
namespace ID of module defining grp
Definition: grp.h:95
uint32 grpindex
used for XSD generation
Definition: grp.h:101
struct grp_template_t_ * parentgrp
direct parent is grp
Definition: grp.h:94
struct to remember error info tkc->cur_err will be checked before tkc->cur for error information
Definition: ncxtypes.h:873
NCX Syntax Token Handler.
XML namespace support.