yumapro  24.10-3
YumaPro SDK
Loading...
Searching...
No Matches
xpath1_res.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_xpath1_res
13#define _H_xpath1_res
14
15/* FILE: xpath1_res.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----------------------------------------------------------------------
3527-aug-16 abb Begun; split from xpath1.h
36
37*/
38
39#ifndef _H_xpath
40#include "xpath.h"
41#endif
42
43#ifdef __cplusplus
44extern "C" {
45#endif
46
47/********************************************************************
48* *
49* C O N S T A N T S *
50* *
51*********************************************************************/
52
53/********************************************************************
54* *
55* T Y P E S *
56* *
57*********************************************************************/
58
59/********************************************************************
60* *
61* F U N C T I O N S *
62* *
63*********************************************************************/
64
78extern void
80
81
89extern xpath_result_t *
91 xpath_restype_t restype);
92
93
100extern void
102 xpath_result_t *result);
103
104
119extern xpath_resnode_t *
121 boolean dblslash,
122 obj_template_t *objptr);
123
124
139extern xpath_resnode_t *
141 boolean dblslash,
142 val_value_t *valptr);
143
144
145
160extern xpath_resnode_t *
162 boolean dblslash,
163 val_value_t *valptr);
164
165
180extern xpath_resnode_t *
182 boolean dblslash,
183 val_child_hdr_t *valhdr);
184
185
203extern xpath_resnode_t *
205 boolean dblslash,
206 val_value_t *nodeptr_val,
207 xpath_get2_cb_t *nodeptr_cb,
208 xpath_get2_form_t get2_form);
209
210
217extern void
219 xpath_resnode_t *resnode);
220
221
238extern xpath_result_t *
240 obj_template_t *obj,
241 val_value_t *val,
242 boolean dblslash);
243
244
253extern xpath_result_t *
255 boolean dblslash);
256
257
266extern xpath_result_t *
268 boolean dblslash);
269
270
281extern val_value_t *
283 int64 position);
284
285
293extern int64
295
296
307extern int64
309 val_value_t *valptr);
310
311
318extern void
320 xpath_result_t *result);
321
322
323
332extern status_t
334 xpath_result_t *result);
335
336
346extern xpath_resnode_t *
348 dlq_hdr_t *resultQ,
349 const void *ptr);
350
351
361extern xpath_resnode_t *
363 dlq_hdr_t *resultQ,
364 xpath_get2_node_t *get2node);
365
366
382extern xpath_resnode_t *
383 xpath1_res_match_resnode (dlq_hdr_t *resultQ,
384 xpath_resnode_t *findnode,
385 boolean match_exact);
386
387
394extern void
396 xpath_resnode_t *dstnode);
397
398
405extern const xmlChar *
407
408
415extern const xmlChar *
417
418
429extern boolean
431 xpath_get2_cb_t *cb2);
432
433
437#ifdef __cplusplus
438} /* end extern 'C' */
439#endif
440
441
442#endif /* _H_xpath1_res */
status_t
global error return code
Definition: status_enum.h:210
xpath_restype_t
XPath expression result type.
Definition: xpath.h:380
xpath_get2_form_t
GET2 control block forms.
Definition: xpath.h:485
int64 xpath1_res_get_position(xpath_result_t *result, val_value_t *valptr)
Find the position of the specified entry.
Definition: xpath1_res.c:943
const xmlChar * xpath1_res_get_resnode_name(const xpath_resnode_t *resnode)
Get the local-name of the resnode node.
Definition: xpath1_res.c:1413
void xpath1_res_malloc_failed_error(xpath_pcb_t *pcb)
Generate a malloc failed error if OK.
Definition: xpath1_res.c:124
int64 xpath1_res_get_count(xpath_result_t *result)
Get the number of entries in the node-set result to support the count() function.
Definition: xpath1_res.c:903
xpath_resnode_t * xpath1_res_new_obj_resnode(xpath_pcb_t *pcb, boolean dblslash, obj_template_t *objptr)
Get a new result node from the cache or malloc if none available.
Definition: xpath1_res.c:276
const xmlChar * xpath1_res_get_cxt_name(const xpath_pcb_t *pcb)
Get the local-name of the context node.
Definition: xpath1_res.c:1391
xpath_resnode_t * xpath1_res_find_resnode(xpath_pcb_t *pcb, dlq_hdr_t *resultQ, const void *ptr)
Check if the specified resnode ptr is already in the Q.
Definition: xpath1_res.c:1078
status_t xpath1_res_flatten_result(xpath_pcb_t *pcb, xpath_result_t *result)
Convert any vahdr resnodes to valptr resnodes for simplified processing.
Definition: xpath1_res.c:1022
void xpath1_res_free_result(xpath_pcb_t *pcb, xpath_result_t *result)
Free a result struct: put in cache or free if cache maxed out.
Definition: xpath1_res.c:210
xpath_resnode_t * xpath1_res_new_val_resnode(xpath_pcb_t *pcb, boolean dblslash, val_value_t *valptr)
Get a new result node from the cache or malloc if none available.
Definition: xpath1_res.c:393
val_value_t * xpath1_res_find_entry(xpath_result_t *result, int64 position)
Find the Nth entry in the node-set result for the position() function.
Definition: xpath1_res.c:832
xpath_resnode_t * xpath1_res_find_get2_resnode(xpath_pcb_t *pcb, dlq_hdr_t *resultQ, xpath_get2_node_t *get2node)
Check if the specified resnode ptr is already in the Q (GET2)
Definition: xpath1_res.c:1136
void xpath1_res_copy_resnode(xpath_resnode_t *srcnode, xpath_resnode_t *dstnode)
Copy a resnode struct.
Definition: xpath1_res.c:1346
void xpath1_res_free_resnode(xpath_pcb_t *pcb, xpath_resnode_t *resnode)
Free a result node struct: put in cache or free if cache maxed out.
Definition: xpath1_res.c:585
xpath_resnode_t * xpath1_res_new_valhdr_resnode(xpath_pcb_t *pcb, boolean dblslash, val_child_hdr_t *valhdr)
Get a new result node from the cache or malloc if none available.
Definition: xpath1_res.c:462
xpath_result_t * xpath1_res_new_result(xpath_pcb_t *pcb, xpath_restype_t restype)
Get a new result from the cache or malloc if none available.
Definition: xpath1_res.c:159
xpath_result_t * xpath1_res_new_cxt_nodeset(xpath_pcb_t *pcb, boolean dblslash)
Start a nodeset result with the current context node.
Definition: xpath1_res.c:685
xpath_result_t * xpath1_res_new_origcxt_nodeset(xpath_pcb_t *pcb, boolean dblslash)
Start a nodeset result with the original context node.
Definition: xpath1_res.c:758
xpath_resnode_t * xpath1_res_new_get2_resnode(xpath_pcb_t *pcb, boolean dblslash, val_value_t *nodeptr_val, xpath_get2_cb_t *nodeptr_cb, xpath_get2_form_t get2_form)
Get a new result node from the cache or malloc if none available.
Definition: xpath1_res.c:524
boolean xpath1_res_match_get2node(xpath_get2_cb_t *cb1, xpath_get2_cb_t *cb2)
Compare two GET2 CBs.
Definition: xpath1_res.c:1456
xpath_resnode_t * xpath1_res_new_aioval_resnode(xpath_pcb_t *pcb, boolean dblslash, val_value_t *valptr)
Get a new AIO val result node from the cache or malloc if none available.
Definition: xpath1_res.c:429
xpath_resnode_t * xpath1_res_match_resnode(dlq_hdr_t *resultQ, xpath_resnode_t *findnode, boolean match_exact)
Match the specified result node.
Definition: xpath1_res.c:1232
void xpath1_res_add_resnode(xpath_resnode_t *resnode, xpath_result_t *result)
Add the specified resnode to the result.
Definition: xpath1_res.c:997
xpath_result_t * xpath1_res_new_nodeset(xpath_pcb_t *pcb, obj_template_t *obj, val_value_t *val, boolean dblslash)
Create a new nodeset.
Definition: xpath1_res.c:635
One YANG data-def-stmt.
Definition: obj.h:1229
this struct is inserted in the val->v.child_hdrQ for container and list value nodes
Definition: val.h:1074
one value to match one type
Definition: val.h:912
Special XPath GET2 state record to be used instead of val_value_t or val_child_hdr_t pointers.
Definition: xpath.h:562
Special XPath GET2 resnode.
Definition: xpath.h:610
XPath parser control block.
Definition: xpath.h:754
XPath result node struct.
Definition: xpath.h:666
XPath expression result.
Definition: xpath.h:705
Schema and data model Xpath search support.