yumapro  21.10T-8
YumaPro SDK
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 
33 date init comment
34 ----------------------------------------------------------------------
35 09-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
63 extern "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 
87 typedef 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 
123 extern grp_template_t *
124  grp_new_template (void);
125 
126 
136 extern void
138 
139 
145 extern void
146  grp_clean_groupingQ (dlq_hdr_t *que);
147 
148 
156 extern boolean
157  grp_has_typedefs (const grp_template_t *grp);
158 
159 
166 extern 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 */
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
void grp_clean_groupingQ(dlq_hdr_t *que)
Clean a queue of grp_template_t structs.
Definition: grp.c:164
uint16 xmlns_id_t
integer handle for registered namespaces
Definition: xmlns.h:89
Contains NCX constants.
ncx_status_t status
parse status
Definition: grp.h:100
void * parent
const back-ptr to parent obj
Definition: grp.h:93
struct grp_template_t_ * parentgrp
direct parent is grp
Definition: grp.h:94
YANG module data structures Many internal representations of YANG module constructs.
struct to remember error info tkc->cur_err will be checked before tkc->cur for error information ...
Definition: ncxtypes.h:812
ncx_error_t tkerr
file and line info for compiler
Definition: grp.h:92
One YANG &#39;grouping&#39; definition – sibling set template.
Definition: grp.h:87
xmlChar * descr
description-stmt (not on server)
Definition: grp.h:90
boolean loop_detected
T: loop detected by compiler.
Definition: grp.h:99
NCX Syntax Token Handler.
Global error messages for status code enumerations.
grp_template_t * grp_new_template(void)
Malloc and initialize the fields in a grp_template_t.
Definition: grp.c:100
boolean istop
T: top-level grouping.
Definition: grp.h:97
xmlns_id_t nsid
namespace ID of module defining grp
Definition: grp.h:95
const xmlChar * grp_get_mod_name(const grp_template_t *grp)
Get the module name for a grouping.
Definition: grp.c:231
uint32 grpindex
used for XSD generation
Definition: grp.h:101
XML namespace support.
boolean expand_done
T: expand already done.
Definition: grp.h:98
boolean grp_has_typedefs(const grp_template_t *grp)
Check if the grouping contains any typedefs.
Definition: grp.c:190
ncx_status_t
enumeration for different YANG data-def status values
Definition: ncxtypes.h:570
boolean used
used flag for yangdiff use
Definition: grp.h:96
xmlChar * ref
reference-stmt (not on server)
Definition: grp.h:91
xmlChar * name
name of the grouping
Definition: grp.h:89