1 | /* ************************************************************************** * |
---|
2 | * Copyright © IPSL/LSCE, XMLIOServer, Avril 2010 - Octobre 2011 * |
---|
3 | * ************************************************************************** */ |
---|
4 | |
---|
5 | #include <boost/multi_array.hpp> |
---|
6 | #include <boost/shared_ptr.hpp> |
---|
7 | |
---|
8 | #include "xmlioserver.hpp" |
---|
9 | |
---|
10 | #include "attribute_template_impl.hpp" |
---|
11 | #include "object_template_impl.hpp" |
---|
12 | #include "group_template_impl.hpp" |
---|
13 | |
---|
14 | #include "icutil.hpp" |
---|
15 | |
---|
16 | extern "C" |
---|
17 | { |
---|
18 | // /////////////////////////////// Définitions ////////////////////////////// // |
---|
19 | |
---|
20 | // ----------------------- Redéfinition de types ---------------------------- |
---|
21 | |
---|
22 | typedef xmlioserver::tree::CContext * XContextPtr; |
---|
23 | |
---|
24 | typedef xmlioserver::tree::CGrid * XGridPtr; |
---|
25 | typedef xmlioserver::tree::CGridGroup * XGridGroupPtr; |
---|
26 | |
---|
27 | typedef xmlioserver::tree::CFile * XFilePtr; |
---|
28 | typedef xmlioserver::tree::CFileGroup * XFileGroupPtr; |
---|
29 | |
---|
30 | typedef xmlioserver::tree::CField * XFieldPtr; |
---|
31 | typedef xmlioserver::tree::CFieldGroup * XFieldGroupPtr; |
---|
32 | |
---|
33 | typedef xmlioserver::tree::CDomain * XDomainPtr; |
---|
34 | typedef xmlioserver::tree::CDomainGroup * XDomainGroupPtr; |
---|
35 | |
---|
36 | typedef xmlioserver::tree::CAxis * XAxisPtr; |
---|
37 | typedef xmlioserver::tree::CAxisGroup * XAxisGroupPtr; |
---|
38 | |
---|
39 | // ----------------------- Ajout d'enfant à un parent ----------------------- |
---|
40 | |
---|
41 | void xios_xml_tree_add_field(XFieldGroupPtr parent_, XFieldPtr * child_, const char * child_id, int child_id_size) |
---|
42 | { |
---|
43 | std::string child_id_str; |
---|
44 | if (!cstr2string(child_id, child_id_size, child_id_str)) return; |
---|
45 | } |
---|
46 | |
---|
47 | void xios_xml_tree_add_grid(XGridGroupPtr parent_, XGridPtr * child_, const char * child_id, int child_id_size) |
---|
48 | { |
---|
49 | std::string child_id_str; |
---|
50 | if (!cstr2string(child_id, child_id_size, child_id_str)) return; |
---|
51 | } |
---|
52 | |
---|
53 | void xios_xml_tree_add_file(XFileGroupPtr parent_, XFilePtr * child_, const char * child_id, int child_id_size) |
---|
54 | { |
---|
55 | std::string child_id_str; |
---|
56 | if (!cstr2string(child_id, child_id_size, child_id_str)) return; |
---|
57 | } |
---|
58 | |
---|
59 | void xios_xml_tree_add_axis(XAxisGroupPtr parent_, XAxisPtr * child_, const char * child_id, int child_id_size) |
---|
60 | { |
---|
61 | std::string child_id_str; |
---|
62 | if (!cstr2string(child_id, child_id_size, child_id_str)) return; |
---|
63 | } |
---|
64 | |
---|
65 | void xios_xml_tree_add_domain(XDomainGroupPtr parent_, XDomainPtr * child_, const char * child_id, int child_id_size) |
---|
66 | { |
---|
67 | std::string child_id_str; |
---|
68 | if (!cstr2string(child_id, child_id_size, child_id_str)) return; |
---|
69 | } |
---|
70 | |
---|
71 | |
---|
72 | void xios_xml_tree_add_fieldtofile(XFilePtr parent_, XFieldPtr * child_, const char * child_id, int child_id_size) |
---|
73 | { |
---|
74 | std::string child_id_str; |
---|
75 | if (!cstr2string(child_id, child_id_size, child_id_str)) return; |
---|
76 | } |
---|
77 | |
---|
78 | void xios_xml_tree_add_fieldgrouptofile(XFilePtr parent_, XFieldGroupPtr * child_, const char * child_id, int child_id_size) |
---|
79 | { |
---|
80 | std::string child_id_str; |
---|
81 | if (!cstr2string(child_id, child_id_size, child_id_str)) return; |
---|
82 | } |
---|
83 | |
---|
84 | |
---|
85 | // ----------------------- Affichage de l'arborescence ---------------------- |
---|
86 | |
---|
87 | void xios_xml_tree_show (const char * filename, int filename_size) |
---|
88 | { |
---|
89 | std::string filename_str; |
---|
90 | if (!cstr2string(filename, filename_size, filename_str)) return; |
---|
91 | } |
---|
92 | |
---|
93 | |
---|
94 | // ----------------------- Parsing de document xml -------------------------- |
---|
95 | |
---|
96 | void xios_xml_parse_file (const char * filename , int filename_size) |
---|
97 | { |
---|
98 | std::string filename_str; |
---|
99 | if (!cstr2string(filename, filename_size, filename_str)) return; |
---|
100 | } |
---|
101 | |
---|
102 | void xios_xml_parse_string(const char * xmlcontent, int xmlcontent_size) |
---|
103 | { |
---|
104 | std::string xmlcontent_str; |
---|
105 | if (!cstr2string(xmlcontent, xmlcontent_size, xmlcontent_str)) return; |
---|
106 | } |
---|
107 | |
---|
108 | |
---|
109 | |
---|
110 | } // extern "C" |
---|