Hermes2D  3.0
space_h2d_xml.cpp
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 
34 // Begin prologue.
35 //
36 //
37 // End prologue.
38 
39 #include <xsd/cxx/pre.hxx>
40 
41 #include "space_h2d_xml.h"
42 
43 namespace XMLSpace
44 {
45  // space
46  //
47 
49  element_data () const
50  {
51  return this->element_data_;
52  }
53 
56  {
57  return this->element_data_;
58  }
59 
60  void space::
62  {
63  this->element_data_ = s;
64  }
65 
67  spaceType () const
68  {
69  return this->spaceType_;
70  }
71 
74  {
75  return this->spaceType_;
76  }
77 
78  void space::
80  {
81  this->spaceType_.set (x);
82  }
83 
84  void space::
86  {
87  this->spaceType_ = x;
88  }
89 
90  void space::
91  spaceType (::std::auto_ptr< spaceType_type > x)
92  {
93  this->spaceType_.set (x);
94  }
95 
96 
97  // element_data
98  //
99 
101  e_id () const
102  {
103  return this->e_id_.get ();
104  }
105 
108  {
109  return this->e_id_.get ();
110  }
111 
112  void element_data::
113  e_id (const e_id_type& x)
114  {
115  this->e_id_.set (x);
116  }
117 
119  ord () const
120  {
121  return this->ord_.get ();
122  }
123 
126  {
127  return this->ord_.get ();
128  }
129 
130  void element_data::
131  ord (const ord_type& x)
132  {
133  this->ord_.set (x);
134  }
135 
137  bd () const
138  {
139  return this->bd_.get ();
140  }
141 
143  bd ()
144  {
145  return this->bd_.get ();
146  }
147 
148  void element_data::
149  bd (const bd_type& x)
150  {
151  this->bd_.set (x);
152  }
153 
155  n () const
156  {
157  return this->n_.get ();
158  }
159 
161  n ()
162  {
163  return this->n_.get ();
164  }
165 
166  void element_data::
167  n (const n_type& x)
168  {
169  this->n_.set (x);
170  }
171 
173  chgd () const
174  {
175  return this->chgd_.get ();
176  }
177 
180  {
181  return this->chgd_.get ();
182  }
183 
184  void element_data::
185  chgd (const chgd_type& x)
186  {
187  this->chgd_.set (x);
188  }
189 }
190 
191 #include <xsd/cxx/xml/dom/parsing-source.hxx>
192 
193 #include <xsd/cxx/tree/type-factory-map.hxx>
194 
195 namespace _xsd
196 {
197  static
198  const ::xsd::cxx::tree::type_factory_plate< 0, char >
199  type_factory_plate_init;
200 }
201 
202 namespace XMLSpace
203 {
204  // space
205  //
206 
207  space::
209  : ::xml_schema::type (),
210  element_data_ (::xml_schema::flags (), this),
211  spaceType_ (::xml_schema::flags (), this)
212  {
213  }
214 
215  space::
216  space (const space& x,
217  ::xml_schema::flags f,
219  : ::xml_schema::type (x, f, c),
220  element_data_ (x.element_data_, f, this),
221  spaceType_ (x.spaceType_, f, this)
222  {
223  }
224 
225  space::
226  space (const ::xercesc::DOMElement& e,
227  ::xml_schema::flags f,
229  : ::xml_schema::type (e, f | ::xml_schema::flags::base, c),
230  element_data_ (f, this),
231  spaceType_ (f, this)
232  {
233  if ((f & ::xml_schema::flags::base) == 0)
234  {
235  ::xsd::cxx::xml::dom::parser< char > p (e, true, true);
236  this->parse (p, f);
237  }
238  }
239 
240  void space::
241  parse (::xsd::cxx::xml::dom::parser< char >& p,
242  ::xml_schema::flags f)
243  {
244  for (; p.more_elements (); p.next_element ())
245  {
246  const ::xercesc::DOMElement& i (p.cur_element ());
247  const ::xsd::cxx::xml::qualified_name< char > n (
248  ::xsd::cxx::xml::dom::name< char > (i));
249 
250  // element_data
251  //
252  if (n.name () == "element_data" && n.namespace_ ().empty ())
253  {
254  ::std::auto_ptr< element_data_type > r (
255  element_data_traits::create (i, f, this));
256 
257  this->element_data_.push_back (r);
258  continue;
259  }
260 
261  break;
262  }
263 
264  while (p.more_attributes ())
265  {
266  const ::xercesc::DOMAttr& i (p.next_attribute ());
267  const ::xsd::cxx::xml::qualified_name< char > n (
268  ::xsd::cxx::xml::dom::name< char > (i));
269 
270  if (n.name () == "spaceType" && n.namespace_ ().empty ())
271  {
272  ::std::auto_ptr< spaceType_type > r (
273  spaceType_traits::create (i, f, this));
274 
275  this->spaceType_.set (r);
276  continue;
277  }
278  }
279  }
280 
281  space* space::
283  ::xml_schema::container* c) const
284  {
285  return new class space (*this, f, c);
286  }
287 
288  space::
290  {
291  }
292 
293  // element_data
294  //
295 
298  const ord_type& ord,
299  const bd_type& bd,
300  const n_type& n,
301  const chgd_type& chgd)
302  : ::xml_schema::type (),
303  e_id_ (e_id, ::xml_schema::flags (), this),
304  ord_ (ord, ::xml_schema::flags (), this),
305  bd_ (bd, ::xml_schema::flags (), this),
306  n_ (n, ::xml_schema::flags (), this),
307  chgd_ (chgd, ::xml_schema::flags (), this)
308  {
309  }
310 
313  ::xml_schema::flags f,
315  : ::xml_schema::type (x, f, c),
316  e_id_ (x.e_id_, f, this),
317  ord_ (x.ord_, f, this),
318  bd_ (x.bd_, f, this),
319  n_ (x.n_, f, this),
320  chgd_ (x.chgd_, f, this)
321  {
322  }
323 
325  element_data (const ::xercesc::DOMElement& e,
326  ::xml_schema::flags f,
328  : ::xml_schema::type (e, f | ::xml_schema::flags::base, c),
329  e_id_ (f, this),
330  ord_ (f, this),
331  bd_ (f, this),
332  n_ (f, this),
333  chgd_ (f, this)
334  {
335  if ((f & ::xml_schema::flags::base) == 0)
336  {
337  ::xsd::cxx::xml::dom::parser< char > p (e, false, true);
338  this->parse (p, f);
339  }
340  }
341 
342  void element_data::
343  parse (::xsd::cxx::xml::dom::parser< char >& p,
344  ::xml_schema::flags f)
345  {
346  while (p.more_attributes ())
347  {
348  const ::xercesc::DOMAttr& i (p.next_attribute ());
349  const ::xsd::cxx::xml::qualified_name< char > n (
350  ::xsd::cxx::xml::dom::name< char > (i));
351 
352  if (n.name () == "e_id" && n.namespace_ ().empty ())
353  {
354  this->e_id_.set (e_id_traits::create (i, f, this));
355  continue;
356  }
357 
358  if (n.name () == "ord" && n.namespace_ ().empty ())
359  {
360  this->ord_.set (ord_traits::create (i, f, this));
361  continue;
362  }
363 
364  if (n.name () == "bd" && n.namespace_ ().empty ())
365  {
366  this->bd_.set (bd_traits::create (i, f, this));
367  continue;
368  }
369 
370  if (n.name () == "n" && n.namespace_ ().empty ())
371  {
372  this->n_.set (n_traits::create (i, f, this));
373  continue;
374  }
375 
376  if (n.name () == "chgd" && n.namespace_ ().empty ())
377  {
378  this->chgd_.set (chgd_traits::create (i, f, this));
379  continue;
380  }
381  }
382 
383  if (!e_id_.present ())
384  {
385  throw ::xsd::cxx::tree::expected_attribute< char > (
386  "e_id",
387  "");
388  }
389 
390  if (!ord_.present ())
391  {
392  throw ::xsd::cxx::tree::expected_attribute< char > (
393  "ord",
394  "");
395  }
396 
397  if (!bd_.present ())
398  {
399  throw ::xsd::cxx::tree::expected_attribute< char > (
400  "bd",
401  "");
402  }
403 
404  if (!n_.present ())
405  {
406  throw ::xsd::cxx::tree::expected_attribute< char > (
407  "n",
408  "");
409  }
410 
411  if (!chgd_.present ())
412  {
413  throw ::xsd::cxx::tree::expected_attribute< char > (
414  "chgd",
415  "");
416  }
417  }
418 
419  element_data* element_data::
421  ::xml_schema::container* c) const
422  {
423  return new class element_data (*this, f, c);
424  }
425 
428  {
429  }
430 }
431 
432 #include <ostream>
433 
434 #include <xsd/cxx/tree/std-ostream-map.hxx>
435 
436 namespace _xsd
437 {
438  static
439  const ::xsd::cxx::tree::std_ostream_plate< 0, char >
440  std_ostream_plate_init;
441 }
442 
443 namespace XMLSpace
444 {
445  ::std::ostream&
446  operator<< (::std::ostream& o, const space& i)
447  {
449  b (i.element_data ().begin ()), e (i.element_data ().end ());
450  b != e; ++b)
451  {
452  o << ::std::endl << "element_data: " << *b;
453  }
454 
455  if (i.spaceType ())
456  {
457  o << ::std::endl << "spaceType: " << *i.spaceType ();
458  }
459 
460  return o;
461  }
462 
463  ::std::ostream&
464  operator<< (::std::ostream& o, const element_data& i)
465  {
466  o << ::std::endl << "e_id: " << i.e_id ();
467  o << ::std::endl << "ord: " << i.ord ();
468  o << ::std::endl << "bd: " << i.bd ();
469  o << ::std::endl << "n: " << i.n ();
470  o << ::std::endl << "chgd: " << i.chgd ();
471  return o;
472  }
473 }
474 
475 #include <istream>
476 #include <xsd/cxx/xml/sax/std-input-source.hxx>
477 #include <xsd/cxx/tree/error-handler.hxx>
478 
479 namespace XMLSpace
480 {
481  ::std::auto_ptr< ::XMLSpace::space >
483  ::xml_schema::flags f,
485  {
486  ::xsd::cxx::xml::auto_initializer i (
487  (f & ::xml_schema::flags::dont_initialize) == 0,
488  (f & ::xml_schema::flags::keep_dom) == 0);
489 
490  ::xsd::cxx::tree::error_handler< char > h;
491 
492  ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
493  ::xsd::cxx::xml::dom::parse< char > (
494  u, h, p, f));
495 
496  h.throw_if_failed< ::xsd::cxx::tree::parsing< char > > ();
497 
498  ::std::auto_ptr< ::XMLSpace::space > r (
499  ::XMLSpace::space_ (
500  d, f | ::xml_schema::flags::own_dom, p));
501 
502  return r;
503  }
504 
505  ::std::auto_ptr< ::XMLSpace::space >
508  ::xml_schema::flags f,
510  {
511  ::xsd::cxx::xml::auto_initializer i (
512  (f & ::xml_schema::flags::dont_initialize) == 0,
513  (f & ::xml_schema::flags::keep_dom) == 0);
514 
515  ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
516  ::xsd::cxx::xml::dom::parse< char > (
517  u, h, p, f));
518 
519  if (!d.get ())
520  throw ::xsd::cxx::tree::parsing< char > ();
521 
522  ::std::auto_ptr< ::XMLSpace::space > r (
523  ::XMLSpace::space_ (
524  d, f | ::xml_schema::flags::own_dom, p));
525 
526  return r;
527  }
528 
529  ::std::auto_ptr< ::XMLSpace::space >
531  ::xercesc::DOMErrorHandler& h,
532  ::xml_schema::flags f,
534  {
535  ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
536  ::xsd::cxx::xml::dom::parse< char > (
537  u, h, p, f));
538 
539  if (!d.get ())
540  throw ::xsd::cxx::tree::parsing< char > ();
541 
542  ::std::auto_ptr< ::XMLSpace::space > r (
543  ::XMLSpace::space_ (
544  d, f | ::xml_schema::flags::own_dom, p));
545 
546  return r;
547  }
548 
549  ::std::auto_ptr< ::XMLSpace::space >
550  space_ (::std::istream& is,
551  ::xml_schema::flags f,
553  {
554  ::xsd::cxx::xml::auto_initializer i (
555  (f & ::xml_schema::flags::dont_initialize) == 0,
556  (f & ::xml_schema::flags::keep_dom) == 0);
557 
558  ::xsd::cxx::xml::sax::std_input_source isrc (is);
559  return ::XMLSpace::space_ (isrc, f, p);
560  }
561 
562  ::std::auto_ptr< ::XMLSpace::space >
563  space_ (::std::istream& is,
565  ::xml_schema::flags f,
567  {
568  ::xsd::cxx::xml::auto_initializer i (
569  (f & ::xml_schema::flags::dont_initialize) == 0,
570  (f & ::xml_schema::flags::keep_dom) == 0);
571 
572  ::xsd::cxx::xml::sax::std_input_source isrc (is);
573  return ::XMLSpace::space_ (isrc, h, f, p);
574  }
575 
576  ::std::auto_ptr< ::XMLSpace::space >
577  space_ (::std::istream& is,
578  ::xercesc::DOMErrorHandler& h,
579  ::xml_schema::flags f,
581  {
582  ::xsd::cxx::xml::sax::std_input_source isrc (is);
583  return ::XMLSpace::space_ (isrc, h, f, p);
584  }
585 
586  ::std::auto_ptr< ::XMLSpace::space >
587  space_ (::std::istream& is,
588  const ::std::string& sid,
589  ::xml_schema::flags f,
591  {
592  ::xsd::cxx::xml::auto_initializer i (
593  (f & ::xml_schema::flags::dont_initialize) == 0,
594  (f & ::xml_schema::flags::keep_dom) == 0);
595 
596  ::xsd::cxx::xml::sax::std_input_source isrc (is, sid);
597  return ::XMLSpace::space_ (isrc, f, p);
598  }
599 
600  ::std::auto_ptr< ::XMLSpace::space >
601  space_ (::std::istream& is,
602  const ::std::string& sid,
604  ::xml_schema::flags f,
606  {
607  ::xsd::cxx::xml::auto_initializer i (
608  (f & ::xml_schema::flags::dont_initialize) == 0,
609  (f & ::xml_schema::flags::keep_dom) == 0);
610 
611  ::xsd::cxx::xml::sax::std_input_source isrc (is, sid);
612  return ::XMLSpace::space_ (isrc, h, f, p);
613  }
614 
615  ::std::auto_ptr< ::XMLSpace::space >
616  space_ (::std::istream& is,
617  const ::std::string& sid,
618  ::xercesc::DOMErrorHandler& h,
619  ::xml_schema::flags f,
621  {
622  ::xsd::cxx::xml::sax::std_input_source isrc (is, sid);
623  return ::XMLSpace::space_ (isrc, h, f, p);
624  }
625 
626  ::std::auto_ptr< ::XMLSpace::space >
627  space_ (::xercesc::InputSource& i,
628  ::xml_schema::flags f,
630  {
631  ::xsd::cxx::tree::error_handler< char > h;
632 
633  ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
634  ::xsd::cxx::xml::dom::parse< char > (
635  i, h, p, f));
636 
637  h.throw_if_failed< ::xsd::cxx::tree::parsing< char > > ();
638 
639  ::std::auto_ptr< ::XMLSpace::space > r (
640  ::XMLSpace::space_ (
641  d, f | ::xml_schema::flags::own_dom, p));
642 
643  return r;
644  }
645 
646  ::std::auto_ptr< ::XMLSpace::space >
647  space_ (::xercesc::InputSource& i,
649  ::xml_schema::flags f,
651  {
652  ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
653  ::xsd::cxx::xml::dom::parse< char > (
654  i, h, p, f));
655 
656  if (!d.get ())
657  throw ::xsd::cxx::tree::parsing< char > ();
658 
659  ::std::auto_ptr< ::XMLSpace::space > r (
660  ::XMLSpace::space_ (
661  d, f | ::xml_schema::flags::own_dom, p));
662 
663  return r;
664  }
665 
666  ::std::auto_ptr< ::XMLSpace::space >
667  space_ (::xercesc::InputSource& i,
668  ::xercesc::DOMErrorHandler& h,
669  ::xml_schema::flags f,
671  {
672  ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
673  ::xsd::cxx::xml::dom::parse< char > (
674  i, h, p, f));
675 
676  if (!d.get ())
677  throw ::xsd::cxx::tree::parsing< char > ();
678 
679  ::std::auto_ptr< ::XMLSpace::space > r (
680  ::XMLSpace::space_ (
681  d, f | ::xml_schema::flags::own_dom, p));
682 
683  return r;
684  }
685 
686  ::std::auto_ptr< ::XMLSpace::space >
687  space_ (const ::xercesc::DOMDocument& d,
688  ::xml_schema::flags f,
690  {
691  if (f & ::xml_schema::flags::keep_dom)
692  {
693  ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > c (
694  static_cast< ::xercesc::DOMDocument* > (d.cloneNode (true)));
695 
696  ::std::auto_ptr< ::XMLSpace::space > r (
697  ::XMLSpace::space_ (
698  c, f | ::xml_schema::flags::own_dom, p));
699 
700  return r;
701  }
702 
703  const ::xercesc::DOMElement& e (*d.getDocumentElement ());
704  const ::xsd::cxx::xml::qualified_name< char > n (
705  ::xsd::cxx::xml::dom::name< char > (e));
706 
707  if (n.name () == "space" &&
708  n.namespace_ () == "XMLSpace")
709  {
710  ::std::auto_ptr< ::XMLSpace::space > r (
711  ::xsd::cxx::tree::traits< ::XMLSpace::space, char >::create (
712  e, f, 0));
713  return r;
714  }
715 
716  throw ::xsd::cxx::tree::unexpected_element < char > (
717  n.name (),
718  n.namespace_ (),
719  "space",
720  "XMLSpace");
721  }
722 
723  ::std::auto_ptr< ::XMLSpace::space >
724  space_ (::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument >& d,
725  ::xml_schema::flags f,
727  {
728  ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > c (
729  ((f & ::xml_schema::flags::keep_dom) &&
730  !(f & ::xml_schema::flags::own_dom))
731  ? static_cast< ::xercesc::DOMDocument* > (d->cloneNode (true))
732  : 0);
733 
734  ::xercesc::DOMDocument& doc (c.get () ? *c : *d);
735  const ::xercesc::DOMElement& e (*doc.getDocumentElement ());
736 
737  const ::xsd::cxx::xml::qualified_name< char > n (
738  ::xsd::cxx::xml::dom::name< char > (e));
739 
740  if (f & ::xml_schema::flags::keep_dom)
741  doc.setUserData (::xml_schema::dom::tree_node_key,
742  (c.get () ? &c : &d),
743  0);
744 
745  if (n.name () == "space" &&
746  n.namespace_ () == "XMLSpace")
747  {
748  ::std::auto_ptr< ::XMLSpace::space > r (
749  ::xsd::cxx::tree::traits< ::XMLSpace::space, char >::create (
750  e, f, 0));
751  return r;
752  }
753 
754  throw ::xsd::cxx::tree::unexpected_element < char > (
755  n.name (),
756  n.namespace_ (),
757  "space",
758  "XMLSpace");
759  }
760 }
761 
762 #include <ostream>
763 #include <xsd/cxx/tree/error-handler.hxx>
764 #include <xsd/cxx/xml/dom/serialization-source.hxx>
765 
766 #include <xsd/cxx/tree/type-serializer-map.hxx>
767 
768 namespace _xsd
769 {
770  static
771  const ::xsd::cxx::tree::type_serializer_plate< 0, char >
772  type_serializer_plate_init;
773 }
774 
775 namespace XMLSpace
776 {
777  void
778  space_ (::std::ostream& o,
779  const ::XMLSpace::space& s,
782  ::xml_schema::flags f)
783  {
784  ::xsd::cxx::xml::auto_initializer i (
785  (f & ::xml_schema::flags::dont_initialize) == 0);
786 
787  ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
788  ::XMLSpace::space_ (s, m, f));
789 
790  ::xsd::cxx::tree::error_handler< char > h;
791 
792  ::xsd::cxx::xml::dom::ostream_format_target t (o);
793  if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
794  {
795  h.throw_if_failed< ::xsd::cxx::tree::serialization< char > > ();
796  }
797  }
798 
799  void
800  space_ (::std::ostream& o,
801  const ::XMLSpace::space& s,
805  ::xml_schema::flags f)
806  {
807  ::xsd::cxx::xml::auto_initializer i (
808  (f & ::xml_schema::flags::dont_initialize) == 0);
809 
810  ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
811  ::XMLSpace::space_ (s, m, f));
812  ::xsd::cxx::xml::dom::ostream_format_target t (o);
813  if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
814  {
815  throw ::xsd::cxx::tree::serialization< char > ();
816  }
817  }
818 
819  void
820  space_ (::std::ostream& o,
821  const ::XMLSpace::space& s,
822  ::xercesc::DOMErrorHandler& h,
825  ::xml_schema::flags f)
826  {
827  ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
828  ::XMLSpace::space_ (s, m, f));
829  ::xsd::cxx::xml::dom::ostream_format_target t (o);
830  if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
831  {
832  throw ::xsd::cxx::tree::serialization< char > ();
833  }
834  }
835 
836  void
837  space_ (::xercesc::XMLFormatTarget& t,
838  const ::XMLSpace::space& s,
841  ::xml_schema::flags f)
842  {
843  ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
844  ::XMLSpace::space_ (s, m, f));
845 
846  ::xsd::cxx::tree::error_handler< char > h;
847 
848  if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
849  {
850  h.throw_if_failed< ::xsd::cxx::tree::serialization< char > > ();
851  }
852  }
853 
854  void
855  space_ (::xercesc::XMLFormatTarget& t,
856  const ::XMLSpace::space& s,
860  ::xml_schema::flags f)
861  {
862  ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
863  ::XMLSpace::space_ (s, m, f));
864  if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
865  {
866  throw ::xsd::cxx::tree::serialization< char > ();
867  }
868  }
869 
870  void
871  space_ (::xercesc::XMLFormatTarget& t,
872  const ::XMLSpace::space& s,
873  ::xercesc::DOMErrorHandler& h,
876  ::xml_schema::flags f)
877  {
878  ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
879  ::XMLSpace::space_ (s, m, f));
880  if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
881  {
882  throw ::xsd::cxx::tree::serialization< char > ();
883  }
884  }
885 
886  void
887  space_ (::xercesc::DOMDocument& d,
888  const ::XMLSpace::space& s,
890  {
891  ::xercesc::DOMElement& e (*d.getDocumentElement ());
892  const ::xsd::cxx::xml::qualified_name< char > n (
893  ::xsd::cxx::xml::dom::name< char > (e));
894 
895  if (n.name () == "space" &&
896  n.namespace_ () == "XMLSpace")
897  {
898  e << s;
899  }
900  else
901  {
902  throw ::xsd::cxx::tree::unexpected_element < char > (
903  n.name (),
904  n.namespace_ (),
905  "space",
906  "XMLSpace");
907  }
908  }
909 
910  ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument >
911  space_ (const ::XMLSpace::space& s,
913  ::xml_schema::flags f)
914  {
915  ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
916  ::xsd::cxx::xml::dom::serialize< char > (
917  "space",
918  "XMLSpace",
919  m, f));
920 
921  ::XMLSpace::space_ (*d, s, f);
922  return d;
923  }
924 
925  void
926  operator<< (::xercesc::DOMElement& e, const space& i)
927  {
928  e << static_cast< const ::xml_schema::type& > (i);
929 
930  // element_data
931  //
933  b (i.element_data ().begin ()), n (i.element_data ().end ());
934  b != n; ++b)
935  {
936  ::xercesc::DOMElement& s (
937  ::xsd::cxx::xml::dom::create_element (
938  "element_data",
939  e));
940 
941  s << *b;
942  }
943 
944  // spaceType
945  //
946  if (i.spaceType ())
947  {
948  ::xercesc::DOMAttr& a (
949  ::xsd::cxx::xml::dom::create_attribute (
950  "spaceType",
951  e));
952 
953  a << *i.spaceType ();
954  }
955  }
956 
957  void
958  operator<< (::xercesc::DOMElement& e, const element_data& i)
959  {
960  e << static_cast< const ::xml_schema::type& > (i);
961 
962  // e_id
963  //
964  {
965  ::xercesc::DOMAttr& a (
966  ::xsd::cxx::xml::dom::create_attribute (
967  "e_id",
968  e));
969 
970  a << i.e_id ();
971  }
972 
973  // ord
974  //
975  {
976  ::xercesc::DOMAttr& a (
977  ::xsd::cxx::xml::dom::create_attribute (
978  "ord",
979  e));
980 
981  a << i.ord ();
982  }
983 
984  // bd
985  //
986  {
987  ::xercesc::DOMAttr& a (
988  ::xsd::cxx::xml::dom::create_attribute (
989  "bd",
990  e));
991 
992  a << i.bd ();
993  }
994 
995  // n
996  //
997  {
998  ::xercesc::DOMAttr& a (
999  ::xsd::cxx::xml::dom::create_attribute (
1000  "n",
1001  e));
1002 
1003  a << i.n ();
1004  }
1005 
1006  // chgd
1007  //
1008  {
1009  ::xercesc::DOMAttr& a (
1010  ::xsd::cxx::xml::dom::create_attribute (
1011  "chgd",
1012  e));
1013 
1014  a << i.chgd ();
1015  }
1016  }
1017 }
1018 
1019 #include <xsd/cxx/post.hxx>
1020 
1021 // Begin epilogue.
1022 //
1023 //
1024 // End epilogue.
1025 
const ord_type & ord() const
Return a read-only (constant) reference to the attribute.
virtual element_data * _clone(::xml_schema::flags f=0,::xml_schema::container *c=0) const
Copy the instance polymorphically.
element_data_sequence::const_iterator element_data_const_iterator
Element constant iterator type.
::xsd::cxx::tree::sequence< element_data_type > element_data_sequence
Element sequence container type.
::xsd::cxx::tree::flags flags
Parsing and serialization flags.
const spaceType_optional & spaceType() const
Return a read-only (constant) reference to the attribute container.
Generated from space_h2d_xml.xsd.
space()
Create an instance from the ultimate base and initializers for required elements and attributes...
const e_id_type & e_id() const
Return a read-only (constant) reference to the attribute.
const element_data_sequence & element_data() const
Return a read-only (constant) reference to the element sequence.
::xsd::cxx::tree::type type
C++ type corresponding to the anyType XML Schema built-in type.
const n_type & n() const
Return a read-only (constant) reference to the attribute.
::xml_schema::integer bd_type
Attribute type.
C++ namespace for the XMLSpace schema namespace.
::xsd::cxx::xml::dom::namespace_infomap< char > namespace_infomap
Namespace serialization information map.
::xml_schema::integer e_id_type
Attribute type.
::xsd::cxx::xml::error_handler< char > error_handler
Error handler callback interface.
const XMLCh *const tree_node_key
DOM user data key for back pointers to tree nodes.
::xsd::cxx::tree::properties< char > properties
Parsing properties.
::xml_schema::integer n_type
Attribute type.
Class corresponding to the element_data schema type.
C++ namespace for the http://www.w3.org/2001/XMLSchema schema namespace.
::xsd::cxx::tree::string< char, simple_type > string
C++ type corresponding to the string XML Schema built-in type.
::xsd::cxx::tree::optional< spaceType_type > spaceType_optional
Attribute optional container type.
virtual space * _clone(::xml_schema::flags f=0,::xml_schema::container *c=0) const
Copy the instance polymorphically.
::xml_schema::boolean chgd_type
Attribute type.
const bd_type & bd() const
Return a read-only (constant) reference to the attribute.
::xml_schema::integer ord_type
Attribute type.
Class corresponding to the space schema type.
::xsd::cxx::tree::type container
Alias for the anyType type.
const chgd_type & chgd() const
Return a read-only (constant) reference to the attribute.
::xml_schema::string spaceType_type
Attribute type.
::std::auto_ptr< ::XMLSpace::space > space_(const ::std::string &uri,::xml_schema::flags f=0, const ::xml_schema::properties &p=::xml_schema::properties())
Parse a URI or a local file.
virtual ~element_data()
Destructor.
virtual ~space()
Destructor.
element_data(const e_id_type &, const ord_type &, const bd_type &, const n_type &, const chgd_type &)
Create an instance from the ultimate base and initializers for required elements and attributes...