Coin Logo http://www.coin3d.org/
http://www.kongsberg.com/kogt/

element.h
1 #ifndef COIN_XML_ELEMENT_H
2 #define COIN_XML_ELEMENT_H
3 
4 /**************************************************************************\
5  * Copyright (c) Kongsberg Oil & Gas Technologies AS
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions are
10  * met:
11  *
12  * Redistributions of source code must retain the above copyright notice,
13  * this list of conditions and the following disclaimer.
14  *
15  * Redistributions in binary form must reproduce the above copyright
16  * notice, this list of conditions and the following disclaimer in the
17  * documentation and/or other materials provided with the distribution.
18  *
19  * Neither the name of the copyright holder nor the names of its
20  * contributors may be used to endorse or promote products derived from
21  * this software without specific prior written permission.
22  *
23  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27  * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
29  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 \**************************************************************************/
35 
36 #include <stdio.h>
37 
38 #include <Inventor/C/XML/types.h>
39 
40 #ifdef __cplusplus
41 extern "C" {
42 #endif /* __clusplus */
43 
44 /* ********************************************************************** */
45 
46 COIN_DLL_API cc_xml_elt * cc_xml_elt_new(void);
47 COIN_DLL_API cc_xml_elt * cc_xml_elt_new_from_data(const char * type, cc_xml_attr ** attrs);
48 COIN_DLL_API cc_xml_elt * cc_xml_elt_clone(const cc_xml_elt * elt);
49 COIN_DLL_API void cc_xml_elt_delete_x(cc_xml_elt * elt);
50 
51 COIN_DLL_API void cc_xml_elt_set_type_x(cc_xml_elt * elt, const char * type);
52 COIN_DLL_API const char * cc_xml_elt_get_type(const cc_xml_elt * elt);
53 
54 COIN_DLL_API void cc_xml_elt_set_cdata_x(cc_xml_elt * elt, const char * data);
55 COIN_DLL_API const char * cc_xml_elt_get_cdata(const cc_xml_elt * elt);
56 COIN_DLL_API const char * cc_xml_elt_get_data(const cc_xml_elt * elt);
57 
58 COIN_DLL_API void cc_xml_elt_remove_all_attributes_x(cc_xml_elt * elt);
59 COIN_DLL_API void cc_xml_elt_set_attribute_x(cc_xml_elt * elt, cc_xml_attr * attr);
60 COIN_DLL_API void cc_xml_elt_set_attributes_x(cc_xml_elt * elt, cc_xml_attr ** attrs);
61 
62 COIN_DLL_API cc_xml_attr * cc_xml_elt_get_attribute(const cc_xml_elt * elt, const char * attrname);
63 COIN_DLL_API int cc_xml_elt_get_num_attributes(const cc_xml_elt * elt);
64 COIN_DLL_API const cc_xml_attr ** cc_xml_elt_get_attributes(const cc_xml_elt * elt);
65 
66 COIN_DLL_API int cc_xml_elt_get_num_children(const cc_xml_elt * elt);
67 COIN_DLL_API int cc_xml_elt_get_num_children_of_type(const cc_xml_elt * elt, const char * type);
68 COIN_DLL_API cc_xml_elt * cc_xml_elt_get_child(const cc_xml_elt * elt, int child);
69 COIN_DLL_API int cc_xml_elt_get_child_index(const cc_xml_elt * elt, const cc_xml_elt * child);
70 COIN_DLL_API int cc_xml_elt_get_child_type_index(const cc_xml_elt * elt, const cc_xml_elt * child);
71 COIN_DLL_API cc_xml_elt * cc_xml_elt_get_parent(const cc_xml_elt * elt);
72 COIN_DLL_API cc_xml_path * cc_xml_elt_get_path(const cc_xml_elt * elt);
73 
74 COIN_DLL_API cc_xml_elt * cc_xml_elt_get_child_of_type(const cc_xml_elt * elt, const char * type, int idx);
75 COIN_DLL_API cc_xml_elt * cc_xml_elt_get_child_of_type_x(cc_xml_elt * elt, const char * type, int idx);
76 
77 COIN_DLL_API void cc_xml_elt_set_parent_x(cc_xml_elt * elt, cc_xml_elt * parent);
78 COIN_DLL_API void cc_xml_elt_add_child_x(cc_xml_elt * elt, cc_xml_elt * child);
79 COIN_DLL_API void cc_xml_elt_remove_child_x(cc_xml_elt * elt, cc_xml_elt * child);
80 COIN_DLL_API void cc_xml_elt_insert_child_x(cc_xml_elt * elt, cc_xml_elt * child, int idx);
81 COIN_DLL_API int cc_xml_elt_replace_child_x(cc_xml_elt * elt, cc_xml_elt * oldchild, cc_xml_elt * newchild);
82 
83 COIN_DLL_API int cc_xml_elt_get_boolean(const cc_xml_elt * elt, int * value);
84 COIN_DLL_API int cc_xml_elt_get_integer(const cc_xml_elt * elt, int * value);
85 COIN_DLL_API int cc_xml_elt_get_uint64(const cc_xml_elt * elt, uint64_t * value);
86 COIN_DLL_API int cc_xml_elt_get_int64(const cc_xml_elt * elt, int64_t * value);
87 COIN_DLL_API int cc_xml_elt_get_uint32(const cc_xml_elt * elt, uint32_t * value);
88 COIN_DLL_API int cc_xml_elt_get_int32(const cc_xml_elt * elt, int32_t * value);
89 COIN_DLL_API int cc_xml_elt_get_float(const cc_xml_elt * elt, float * value);
90 COIN_DLL_API int cc_xml_elt_get_double(const cc_xml_elt * elt, double * value);
91 
92 COIN_DLL_API void cc_xml_elt_set_boolean_x(cc_xml_elt * elt, int value);
93 COIN_DLL_API void cc_xml_elt_set_integer_x(cc_xml_elt * elt, int value);
94 COIN_DLL_API void cc_xml_elt_set_uint64_x(cc_xml_elt * elt, uint64_t value);
95 COIN_DLL_API void cc_xml_elt_set_int64_x(cc_xml_elt * elt, int64_t value);
96 COIN_DLL_API void cc_xml_elt_set_uint32_x(cc_xml_elt * elt, uint32_t value);
97 COIN_DLL_API void cc_xml_elt_set_int32_x(cc_xml_elt * elt, int32_t value);
98 COIN_DLL_API void cc_xml_elt_set_float_x(cc_xml_elt * elt, float value);
99 COIN_DLL_API void cc_xml_elt_set_double_x(cc_xml_elt * elt, double value);
100 
101 COIN_DLL_API void cc_xml_elt_strip_whitespace_x(cc_xml_elt * elt);
102 
103 COIN_DLL_API cc_xml_elt * cc_xml_elt_get_traversal_next(const cc_xml_elt * root, cc_xml_elt * here);
104 
105 COIN_DLL_API const cc_xml_elt * cc_xml_elt_find(const cc_xml_elt * root, const cc_xml_path * path);
106 COIN_DLL_API const cc_xml_elt * cc_xml_elt_find_next(const cc_xml_elt * root, cc_xml_elt * from, cc_xml_path * path);
107 COIN_DLL_API cc_xml_elt * cc_xml_elt_create_x(cc_xml_elt * from, cc_xml_path * path);
108 
109 /* ********************************************************************** */
110 
111 #ifdef __cplusplus
112 } /* extern "C" */
113 #endif /* __clusplus */
114 
115 #endif /* !COIN_XML_ELEMENT_H */

Copyright © by Kongsberg Oil & Gas Technologies. All rights reserved.

Generated for Coin by Doxygen