Hermes2D  2.0
space_h2d_xml.h
Go to the documentation of this file.
1 // Copyright (C) 2005-2010 Code Synthesis Tools CC
2 //
3 // This program was generated by CodeSynthesis XSD, an XML Schema to
4 // C++ data binding compiler.
5 //
6 // This program is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License version 2 as
8 // published by the Free Software Foundation.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 //
19 // In addition, as a special exception, Code Synthesis Tools CC gives
20 // permission to link this program with the Xerces-C++ library (or with
21 // modified versions of Xerces-C++ that use the same license as Xerces-C++),
22 // and distribute linked combinations including the two. You must obey
23 // the GNU General Public License version 2 in all respects for all of
24 // the code used other than Xerces-C++. If you modify this copy of the
25 // program, you may extend this exception to your version of the program,
26 // but you are not obligated to do so. If you do not wish to do so, delete
27 // this exception statement from your version.
28 //
29 // Furthermore, Code Synthesis Tools CC makes a special exception for
30 // the Free/Libre and Open Source Software (FLOSS) which is described
31 // in the accompanying FLOSSE file.
32 //
33 
39 #ifndef SPACE_H2D_XML_H
40 #define SPACE_H2D_XML_H
41 
42 // Begin prologue.
43 //
44 //
45 // End prologue.
46 
47 #include <xsd/cxx/config.hxx>
48 
49 #if (XSD_INT_VERSION != 3030000L)
50 #error XSD runtime version mismatch
51 #endif
52 
53 #include <xsd/cxx/pre.hxx>
54 
55 #ifndef XSD_USE_CHAR
56 #define XSD_USE_CHAR
57 #endif
58 
59 #ifndef XSD_CXX_TREE_USE_CHAR
60 #define XSD_CXX_TREE_USE_CHAR
61 #endif
62 
63 #include <xsd/cxx/xml/char-utf8.hxx>
64 
65 #include <xsd/cxx/tree/exceptions.hxx>
66 #include <xsd/cxx/tree/elements.hxx>
67 #include <xsd/cxx/tree/types.hxx>
68 
69 #include <xsd/cxx/xml/error-handler.hxx>
70 
71 #include <xsd/cxx/xml/dom/auto-ptr.hxx>
72 
73 #include <xsd/cxx/tree/parsing.hxx>
74 #include <xsd/cxx/tree/parsing/byte.hxx>
75 #include <xsd/cxx/tree/parsing/unsigned-byte.hxx>
76 #include <xsd/cxx/tree/parsing/short.hxx>
77 #include <xsd/cxx/tree/parsing/unsigned-short.hxx>
78 #include <xsd/cxx/tree/parsing/int.hxx>
79 #include <xsd/cxx/tree/parsing/unsigned-int.hxx>
80 #include <xsd/cxx/tree/parsing/long.hxx>
81 #include <xsd/cxx/tree/parsing/unsigned-long.hxx>
82 #include <xsd/cxx/tree/parsing/boolean.hxx>
83 #include <xsd/cxx/tree/parsing/float.hxx>
84 #include <xsd/cxx/tree/parsing/double.hxx>
85 #include <xsd/cxx/tree/parsing/decimal.hxx>
86 
87 #include <xsd/cxx/xml/dom/serialization-header.hxx>
88 #include <xsd/cxx/tree/serialization.hxx>
89 #include <xsd/cxx/tree/serialization/byte.hxx>
90 #include <xsd/cxx/tree/serialization/unsigned-byte.hxx>
91 #include <xsd/cxx/tree/serialization/short.hxx>
92 #include <xsd/cxx/tree/serialization/unsigned-short.hxx>
93 #include <xsd/cxx/tree/serialization/int.hxx>
94 #include <xsd/cxx/tree/serialization/unsigned-int.hxx>
95 #include <xsd/cxx/tree/serialization/long.hxx>
96 #include <xsd/cxx/tree/serialization/unsigned-long.hxx>
97 #include <xsd/cxx/tree/serialization/boolean.hxx>
98 #include <xsd/cxx/tree/serialization/float.hxx>
99 #include <xsd/cxx/tree/serialization/double.hxx>
100 #include <xsd/cxx/tree/serialization/decimal.hxx>
101 
102 #include <xsd/cxx/tree/std-ostream-operators.hxx>
103 
108 namespace xml_schema
109 {
110  // anyType and anySimpleType.
111  //
112 
118 
123  typedef ::xsd::cxx::tree::simple_type< type > simple_type;
124 
129 
130 
131  // 8-bit
132  //
133 
138  typedef signed char byte;
139 
144  typedef unsigned char unsigned_byte;
145 
146 
147  // 16-bit
148  //
149 
154  typedef short short_;
155 
160  typedef unsigned short unsigned_short;
161 
162 
163  // 32-bit
164  //
165 
170  typedef int int_;
171 
176  typedef unsigned int unsigned_int;
177 
178 
179  // 64-bit
180  //
181 
186  typedef long long long_;
187 
192  typedef unsigned long long unsigned_long;
193 
194 
195  // Supposed to be arbitrary-length integral types.
196  //
197 
202  typedef long long integer;
203 
208  typedef long long non_positive_integer;
209 
214  typedef unsigned long long non_negative_integer;
215 
220  typedef unsigned long long positive_integer;
221 
226  typedef long long negative_integer;
227 
228 
229  // Boolean.
230  //
231 
236  typedef bool boolean;
237 
238 
239  // Floating-point types.
240  //
241 
246  typedef float float_;
247 
252  typedef double double_;
253 
258  typedef double decimal;
259 
260 
261  // String types.
262  //
263 
268  typedef ::xsd::cxx::tree::string< char, simple_type > string;
269 
274  typedef ::xsd::cxx::tree::normalized_string< char, string > normalized_string;
275 
280  typedef ::xsd::cxx::tree::token< char, normalized_string > token;
281 
286  typedef ::xsd::cxx::tree::name< char, token > name;
287 
292  typedef ::xsd::cxx::tree::nmtoken< char, token > nmtoken;
293 
298  typedef ::xsd::cxx::tree::nmtokens< char, simple_type, nmtoken > nmtokens;
299 
304  typedef ::xsd::cxx::tree::ncname< char, name > ncname;
305 
310  typedef ::xsd::cxx::tree::language< char, token > language;
311 
312 
313  // ID/IDREF.
314  //
315 
320  typedef ::xsd::cxx::tree::id< char, ncname > id;
321 
326  typedef ::xsd::cxx::tree::idref< char, ncname, type > idref;
327 
332  typedef ::xsd::cxx::tree::idrefs< char, simple_type, idref > idrefs;
333 
334 
335  // URI.
336  //
337 
342  typedef ::xsd::cxx::tree::uri< char, simple_type > uri;
343 
344 
345  // Qualified name.
346  //
347 
352  typedef ::xsd::cxx::tree::qname< char, simple_type, uri, ncname > qname;
353 
354 
355  // Binary.
356  //
357 
361  typedef ::xsd::cxx::tree::buffer< char > buffer;
362 
367  typedef ::xsd::cxx::tree::base64_binary< char, simple_type > base64_binary;
368 
373  typedef ::xsd::cxx::tree::hex_binary< char, simple_type > hex_binary;
374 
375 
376  // Date/time.
377  //
378 
383 
388  typedef ::xsd::cxx::tree::date< char, simple_type > date;
389 
394  typedef ::xsd::cxx::tree::date_time< char, simple_type > date_time;
395 
400  typedef ::xsd::cxx::tree::duration< char, simple_type > duration;
401 
406  typedef ::xsd::cxx::tree::gday< char, simple_type > gday;
407 
412  typedef ::xsd::cxx::tree::gmonth< char, simple_type > gmonth;
413 
418  typedef ::xsd::cxx::tree::gmonth_day< char, simple_type > gmonth_day;
419 
424  typedef ::xsd::cxx::tree::gyear< char, simple_type > gyear;
425 
430  typedef ::xsd::cxx::tree::gyear_month< char, simple_type > gyear_month;
431 
436  typedef ::xsd::cxx::tree::time< char, simple_type > time;
437 
438 
439  // Entity.
440  //
441 
446  typedef ::xsd::cxx::tree::entity< char, ncname > entity;
447 
452  typedef ::xsd::cxx::tree::entities< char, simple_type, entity > entities;
453 
454 
455  // Namespace information and list stream. Used in
456  // serialization functions.
457  //
461  typedef ::xsd::cxx::xml::dom::namespace_info< char > namespace_info;
462 
466  typedef ::xsd::cxx::xml::dom::namespace_infomap< char > namespace_infomap;
467 
471  typedef ::xsd::cxx::tree::list_stream< char > list_stream;
472 
476  typedef ::xsd::cxx::tree::as_double< double_ > as_double;
477 
481  typedef ::xsd::cxx::tree::as_decimal< decimal > as_decimal;
482 
487 
488  // Flags and properties.
489  //
490 
495 
499  typedef ::xsd::cxx::tree::properties< char > properties;
500 
501  // Parsing/serialization diagnostics.
502  //
503 
508 
512  typedef ::xsd::cxx::tree::error< char > error;
513 
517  typedef ::xsd::cxx::tree::diagnostics< char > diagnostics;
518 
519  // Exceptions.
520  //
521 
525  typedef ::xsd::cxx::tree::exception< char > exception;
526 
531  typedef ::xsd::cxx::tree::bounds< char > bounds;
532 
537  typedef ::xsd::cxx::tree::duplicate_id< char > duplicate_id;
538 
542  typedef ::xsd::cxx::tree::parsing< char > parsing;
543 
548  typedef ::xsd::cxx::tree::expected_element< char > expected_element;
549 
554  typedef ::xsd::cxx::tree::unexpected_element< char > unexpected_element;
555 
560  typedef ::xsd::cxx::tree::expected_attribute< char > expected_attribute;
561 
566  typedef ::xsd::cxx::tree::unexpected_enumerator< char > unexpected_enumerator;
567 
572  typedef ::xsd::cxx::tree::expected_text_content< char > expected_text_content;
573 
578  typedef ::xsd::cxx::tree::no_prefix_mapping< char > no_prefix_mapping;
579 
583  typedef ::xsd::cxx::tree::serialization< char > serialization;
584 
588  typedef ::xsd::cxx::xml::error_handler< char > error_handler;
589 
593  namespace dom
594  {
598  using ::xsd::cxx::xml::dom::auto_ptr;
599 
600 #ifndef XSD_CXX_TREE_TREE_NODE_KEY__XML_SCHEMA
601 #define XSD_CXX_TREE_TREE_NODE_KEY__XML_SCHEMA
602 
605  const XMLCh* const tree_node_key = ::xsd::cxx::tree::user_data_keys::node;
606 #endif
607  }
608 }
609 
610 // Forward declarations.
611 //
612 namespace XMLSpace
613 {
614  class space;
615  class element_data;
616 }
617 
618 
619 #include <memory> // std::auto_ptr
620 #include <limits> // std::numeric_limits
621 #include <algorithm> // std::binary_search
622 
623 #include <xsd/cxx/xml/char-utf8.hxx>
624 
625 #include <xsd/cxx/tree/exceptions.hxx>
626 #include <xsd/cxx/tree/elements.hxx>
627 #include <xsd/cxx/tree/containers.hxx>
628 #include <xsd/cxx/tree/list.hxx>
629 
630 #include <xsd/cxx/xml/dom/parsing-header.hxx>
631 
636 namespace XMLSpace
637 {
643  class space: public ::xml_schema::type
644  {
645  public:
653 
657  typedef ::XMLSpace::element_data element_data_type;
658 
662  typedef ::xsd::cxx::tree::sequence< element_data_type > element_data_sequence;
663 
667  typedef element_data_sequence::iterator element_data_iterator;
668 
672  typedef element_data_sequence::const_iterator element_data_const_iterator;
673 
677  typedef ::xsd::cxx::tree::traits< element_data_type, char > element_data_traits;
678 
685  const element_data_sequence&
686  element_data () const;
687 
694  element_data ();
695 
705  void
707 
709 
717 
722 
726  typedef ::xsd::cxx::tree::optional< spaceType_type > spaceType_optional;
727 
731  typedef ::xsd::cxx::tree::traits< spaceType_type, char > spaceType_traits;
732 
739  const spaceType_optional&
740  spaceType () const;
741 
748  spaceType ();
749 
758  void
759  spaceType (const spaceType_type& x);
760 
770  void
771  spaceType (const spaceType_optional& x);
772 
781  void
782  spaceType (::std::auto_ptr< spaceType_type > p);
783 
785 
790 
795  space ();
796 
805  space (const ::xercesc::DOMElement& e,
806  ::xml_schema::flags f = 0,
807  ::xml_schema::container* c = 0);
808 
818  space (const space& x,
819  ::xml_schema::flags f = 0,
820  ::xml_schema::container* c = 0);
821 
833  virtual space*
834  _clone (::xml_schema::flags f = 0,
835  ::xml_schema::container* c = 0) const;
836 
838 
842  virtual
843  ~space ();
844 
845  // Implementation.
846  //
847 
848  //@cond
849 
850  protected:
851  void
852  parse (::xsd::cxx::xml::dom::parser< char >&,
854 
855  protected:
856  element_data_sequence element_data_;
857  spaceType_optional spaceType_;
858 
859  //@endcond
860  };
861 
868  {
869  public:
877 
882 
886  typedef ::xsd::cxx::tree::traits< e_id_type, char > e_id_traits;
887 
893  const e_id_type&
894  e_id () const;
895 
901  e_id_type&
902  e_id ();
903 
912  void
913  e_id (const e_id_type& x);
914 
916 
924 
929 
933  typedef ::xsd::cxx::tree::traits< ord_type, char > ord_traits;
934 
940  const ord_type&
941  ord () const;
942 
948  ord_type&
949  ord ();
950 
959  void
960  ord (const ord_type& x);
961 
963 
971 
976 
980  typedef ::xsd::cxx::tree::traits< bd_type, char > bd_traits;
981 
987  const bd_type&
988  bd () const;
989 
995  bd_type&
996  bd ();
997 
1006  void
1007  bd (const bd_type& x);
1008 
1010 
1018 
1023 
1027  typedef ::xsd::cxx::tree::traits< n_type, char > n_traits;
1028 
1034  const n_type&
1035  n () const;
1036 
1042  n_type&
1043  n ();
1044 
1053  void
1054  n (const n_type& x);
1055 
1057 
1065 
1070 
1074  typedef ::xsd::cxx::tree::traits< chgd_type, char > chgd_traits;
1075 
1081  const chgd_type&
1082  chgd () const;
1083 
1089  chgd_type&
1090  chgd ();
1091 
1100  void
1101  chgd (const chgd_type& x);
1102 
1104 
1109 
1114  element_data (const e_id_type&,
1115  const ord_type&,
1116  const bd_type&,
1117  const n_type&,
1118  const chgd_type&);
1119 
1128  element_data (const ::xercesc::DOMElement& e,
1129  ::xml_schema::flags f = 0,
1130  ::xml_schema::container* c = 0);
1131 
1141  element_data (const element_data& x,
1142  ::xml_schema::flags f = 0,
1143  ::xml_schema::container* c = 0);
1144 
1156  virtual element_data*
1157  _clone (::xml_schema::flags f = 0,
1158  ::xml_schema::container* c = 0) const;
1159 
1161 
1165  virtual
1166  ~element_data ();
1167 
1168  // Implementation.
1169  //
1170 
1171  //@cond
1172 
1173  protected:
1174  void
1175  parse (::xsd::cxx::xml::dom::parser< char >&,
1176  ::xml_schema::flags);
1177 
1178  protected:
1179  ::xsd::cxx::tree::one< e_id_type > e_id_;
1180  ::xsd::cxx::tree::one< ord_type > ord_;
1181  ::xsd::cxx::tree::one< bd_type > bd_;
1182  ::xsd::cxx::tree::one< n_type > n_;
1183  ::xsd::cxx::tree::one< chgd_type > chgd_;
1184 
1185  //@endcond
1186  };
1187 }
1188 
1189 #include <iosfwd>
1190 
1191 namespace XMLSpace
1192 {
1193  ::std::ostream&
1194  operator<< (::std::ostream&, const space&);
1195 
1196  ::std::ostream&
1197  operator<< (::std::ostream&, const element_data&);
1198 }
1199 
1200 #include <iosfwd>
1201 
1202 #include <xercesc/sax/InputSource.hpp>
1203 #include <xercesc/dom/DOMDocument.hpp>
1204 #include <xercesc/dom/DOMErrorHandler.hpp>
1205 
1206 namespace XMLSpace
1207 {
1212 
1223  ::std::auto_ptr< ::XMLSpace::space >
1225  ::xml_schema::flags f = 0,
1227 
1239  ::std::auto_ptr< ::XMLSpace::space >
1242  ::xml_schema::flags f = 0,
1244 
1257  ::std::auto_ptr< ::XMLSpace::space >
1259  ::xercesc::DOMErrorHandler& eh,
1260  ::xml_schema::flags f = 0,
1262 
1273  ::std::auto_ptr< ::XMLSpace::space >
1274  space_ (::std::istream& is,
1275  ::xml_schema::flags f = 0,
1277 
1289  ::std::auto_ptr< ::XMLSpace::space >
1290  space_ (::std::istream& is,
1292  ::xml_schema::flags f = 0,
1294 
1307  ::std::auto_ptr< ::XMLSpace::space >
1308  space_ (::std::istream& is,
1309  ::xercesc::DOMErrorHandler& eh,
1310  ::xml_schema::flags f = 0,
1312 
1327  ::std::auto_ptr< ::XMLSpace::space >
1328  space_ (::std::istream& is,
1329  const ::std::string& id,
1330  ::xml_schema::flags f = 0,
1332 
1349  ::std::auto_ptr< ::XMLSpace::space >
1350  space_ (::std::istream& is,
1351  const ::std::string& id,
1353  ::xml_schema::flags f = 0,
1355 
1372  ::std::auto_ptr< ::XMLSpace::space >
1373  space_ (::std::istream& is,
1374  const ::std::string& id,
1375  ::xercesc::DOMErrorHandler& eh,
1376  ::xml_schema::flags f = 0,
1378 
1389  ::std::auto_ptr< ::XMLSpace::space >
1390  space_ (::xercesc::InputSource& is,
1391  ::xml_schema::flags f = 0,
1393 
1405  ::std::auto_ptr< ::XMLSpace::space >
1406  space_ (::xercesc::InputSource& is,
1408  ::xml_schema::flags f = 0,
1410 
1423  ::std::auto_ptr< ::XMLSpace::space >
1424  space_ (::xercesc::InputSource& is,
1425  ::xercesc::DOMErrorHandler& eh,
1426  ::xml_schema::flags f = 0,
1428 
1437  ::std::auto_ptr< ::XMLSpace::space >
1438  space_ (const ::xercesc::DOMDocument& d,
1439  ::xml_schema::flags f = 0,
1441 
1454  ::std::auto_ptr< ::XMLSpace::space >
1455  space_ (::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument >& d,
1456  ::xml_schema::flags f = 0,
1458 
1460 }
1461 
1462 #include <iosfwd>
1463 
1464 #include <xercesc/dom/DOMDocument.hpp>
1465 #include <xercesc/dom/DOMErrorHandler.hpp>
1466 #include <xercesc/framework/XMLFormatter.hpp>
1467 
1468 #include <xsd/cxx/xml/dom/auto-ptr.hxx>
1469 
1470 namespace XMLSpace
1471 {
1476 
1488  void
1489  space_ (::std::ostream& os,
1490  const ::XMLSpace::space& x,
1492  const ::std::string& e = "UTF-8",
1493  ::xml_schema::flags f = 0);
1494 
1508  void
1509  space_ (::std::ostream& os,
1510  const ::XMLSpace::space& x,
1513  const ::std::string& e = "UTF-8",
1514  ::xml_schema::flags f = 0);
1515 
1530  void
1531  space_ (::std::ostream& os,
1532  const ::XMLSpace::space& x,
1533  ::xercesc::DOMErrorHandler& eh,
1535  const ::std::string& e = "UTF-8",
1536  ::xml_schema::flags f = 0);
1537 
1549  void
1550  space_ (::xercesc::XMLFormatTarget& ft,
1551  const ::XMLSpace::space& x,
1553  const ::std::string& e = "UTF-8",
1554  ::xml_schema::flags f = 0);
1555 
1570  void
1571  space_ (::xercesc::XMLFormatTarget& ft,
1572  const ::XMLSpace::space& x,
1575  const ::std::string& e = "UTF-8",
1576  ::xml_schema::flags f = 0);
1577 
1592  void
1593  space_ (::xercesc::XMLFormatTarget& ft,
1594  const ::XMLSpace::space& x,
1595  ::xercesc::DOMErrorHandler& eh,
1597  const ::std::string& e = "UTF-8",
1598  ::xml_schema::flags f = 0);
1599 
1611  void
1612  space_ (::xercesc::DOMDocument& d,
1613  const ::XMLSpace::space& x,
1614  ::xml_schema::flags f = 0);
1615 
1624  ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument >
1625  space_ (const ::XMLSpace::space& x,
1627  ::xml_schema::flags f = 0);
1628 
1630 
1631  void
1632  operator<< (::xercesc::DOMElement&, const space&);
1633 
1634  void
1635  operator<< (::xercesc::DOMElement&, const element_data&);
1636 }
1637 
1638 #include <xsd/cxx/post.hxx>
1639 
1640 // Begin epilogue.
1641 //
1642 //
1643 // End epilogue.
1644 
1645 #endif // SPACE_H2D_XML_H