Hermes2D  2.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 namespace XMLSpace
194 {
195  // space
196  //
197 
198  space::
200  : ::xml_schema::type (),
201  element_data_ (::xml_schema::flags (), this),
202  spaceType_ (::xml_schema::flags (), this)
203  {
204  }
205 
206  space::
207  space (const space& x,
208  ::xml_schema::flags f,
210  : ::xml_schema::type (x, f, c),
211  element_data_ (x.element_data_, f, this),
212  spaceType_ (x.spaceType_, f, this)
213  {
214  }
215 
216  space::
217  space (const ::xercesc::DOMElement& e,
218  ::xml_schema::flags f,
220  : ::xml_schema::type (e, f | ::xml_schema::flags::base, c),
221  element_data_ (f, this),
222  spaceType_ (f, this)
223  {
224  if ((f & ::xml_schema::flags::base) == 0)
225  {
226  ::xsd::cxx::xml::dom::parser< char > p (e, true, true);
227  this->parse (p, f);
228  }
229  }
230 
231  void space::
232  parse (::xsd::cxx::xml::dom::parser< char >& p,
233  ::xml_schema::flags f)
234  {
235  for (; p.more_elements (); p.next_element ())
236  {
237  const ::xercesc::DOMElement& i (p.cur_element ());
238  const ::xsd::cxx::xml::qualified_name< char > n (
239  ::xsd::cxx::xml::dom::name< char > (i));
240 
241  // element_data
242  //
243  if (n.name () == "element_data" && n.namespace_ ().empty ())
244  {
245  ::std::auto_ptr< element_data_type > r (
246  element_data_traits::create (i, f, this));
247 
248  this->element_data_.push_back (r);
249  continue;
250  }
251 
252  break;
253  }
254 
255  while (p.more_attributes ())
256  {
257  const ::xercesc::DOMAttr& i (p.next_attribute ());
258  const ::xsd::cxx::xml::qualified_name< char > n (
259  ::xsd::cxx::xml::dom::name< char > (i));
260 
261  if (n.name () == "spaceType" && n.namespace_ ().empty ())
262  {
263  ::std::auto_ptr< spaceType_type > r (
264  spaceType_traits::create (i, f, this));
265 
266  this->spaceType_.set (r);
267  continue;
268  }
269  }
270  }
271 
272  space* space::
274  ::xml_schema::container* c) const
275  {
276  return new class space (*this, f, c);
277  }
278 
279  space::
281  {
282  }
283 
284  // element_data
285  //
286 
289  const ord_type& ord,
290  const bd_type& bd,
291  const n_type& n,
292  const chgd_type& chgd)
293  : ::xml_schema::type (),
294  e_id_ (e_id, ::xml_schema::flags (), this),
295  ord_ (ord, ::xml_schema::flags (), this),
296  bd_ (bd, ::xml_schema::flags (), this),
297  n_ (n, ::xml_schema::flags (), this),
298  chgd_ (chgd, ::xml_schema::flags (), this)
299  {
300  }
301 
304  ::xml_schema::flags f,
306  : ::xml_schema::type (x, f, c),
307  e_id_ (x.e_id_, f, this),
308  ord_ (x.ord_, f, this),
309  bd_ (x.bd_, f, this),
310  n_ (x.n_, f, this),
311  chgd_ (x.chgd_, f, this)
312  {
313  }
314 
316  element_data (const ::xercesc::DOMElement& e,
317  ::xml_schema::flags f,
319  : ::xml_schema::type (e, f | ::xml_schema::flags::base, c),
320  e_id_ (f, this),
321  ord_ (f, this),
322  bd_ (f, this),
323  n_ (f, this),
324  chgd_ (f, this)
325  {
326  if ((f & ::xml_schema::flags::base) == 0)
327  {
328  ::xsd::cxx::xml::dom::parser< char > p (e, false, true);
329  this->parse (p, f);
330  }
331  }
332 
333  void element_data::
334  parse (::xsd::cxx::xml::dom::parser< char >& p,
335  ::xml_schema::flags f)
336  {
337  while (p.more_attributes ())
338  {
339  const ::xercesc::DOMAttr& i (p.next_attribute ());
340  const ::xsd::cxx::xml::qualified_name< char > n (
341  ::xsd::cxx::xml::dom::name< char > (i));
342 
343  if (n.name () == "e_id" && n.namespace_ ().empty ())
344  {
345  this->e_id_.set (e_id_traits::create (i, f, this));
346  continue;
347  }
348 
349  if (n.name () == "ord" && n.namespace_ ().empty ())
350  {
351  this->ord_.set (ord_traits::create (i, f, this));
352  continue;
353  }
354 
355  if (n.name () == "bd" && n.namespace_ ().empty ())
356  {
357  this->bd_.set (bd_traits::create (i, f, this));
358  continue;
359  }
360 
361  if (n.name () == "n" && n.namespace_ ().empty ())
362  {
363  this->n_.set (n_traits::create (i, f, this));
364  continue;
365  }
366 
367  if (n.name () == "chgd" && n.namespace_ ().empty ())
368  {
369  this->chgd_.set (chgd_traits::create (i, f, this));
370  continue;
371  }
372  }
373 
374  if (!e_id_.present ())
375  {
376  throw ::xsd::cxx::tree::expected_attribute< char > (
377  "e_id",
378  "");
379  }
380 
381  if (!ord_.present ())
382  {
383  throw ::xsd::cxx::tree::expected_attribute< char > (
384  "ord",
385  "");
386  }
387 
388  if (!bd_.present ())
389  {
390  throw ::xsd::cxx::tree::expected_attribute< char > (
391  "bd",
392  "");
393  }
394 
395  if (!n_.present ())
396  {
397  throw ::xsd::cxx::tree::expected_attribute< char > (
398  "n",
399  "");
400  }
401 
402  if (!chgd_.present ())
403  {
404  throw ::xsd::cxx::tree::expected_attribute< char > (
405  "chgd",
406  "");
407  }
408  }
409 
410  element_data* element_data::
412  ::xml_schema::container* c) const
413  {
414  return new class element_data (*this, f, c);
415  }
416 
419  {
420  }
421 }
422 
423 #include <ostream>
424 
425 namespace XMLSpace
426 {
427  ::std::ostream&
428  operator<< (::std::ostream& o, const space& i)
429  {
431  b (i.element_data ().begin ()), e (i.element_data ().end ());
432  b != e; ++b)
433  {
434  o << ::std::endl << "element_data: " << *b;
435  }
436 
437  if (i.spaceType ())
438  {
439  o << ::std::endl << "spaceType: " << *i.spaceType ();
440  }
441 
442  return o;
443  }
444 
445  ::std::ostream&
446  operator<< (::std::ostream& o, const element_data& i)
447  {
448  o << ::std::endl << "e_id: " << i.e_id ();
449  o << ::std::endl << "ord: " << i.ord ();
450  o << ::std::endl << "bd: " << i.bd ();
451  o << ::std::endl << "n: " << i.n ();
452  o << ::std::endl << "chgd: " << i.chgd ();
453  return o;
454  }
455 }
456 
457 #include <istream>
458 #include <xsd/cxx/xml/sax/std-input-source.hxx>
459 #include <xsd/cxx/tree/error-handler.hxx>
460 
461 namespace XMLSpace
462 {
463  ::std::auto_ptr< ::XMLSpace::space >
465  ::xml_schema::flags f,
467  {
468  ::xsd::cxx::xml::auto_initializer i (
469  (f & ::xml_schema::flags::dont_initialize) == 0,
470  (f & ::xml_schema::flags::keep_dom) == 0);
471 
472  ::xsd::cxx::tree::error_handler< char > h;
473 
474  ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
475  ::xsd::cxx::xml::dom::parse< char > (
476  u, h, p, f));
477 
478  h.throw_if_failed< ::xsd::cxx::tree::parsing< char > > ();
479 
480  ::std::auto_ptr< ::XMLSpace::space > r (
481  ::XMLSpace::space_ (
482  d, f | ::xml_schema::flags::own_dom, p));
483 
484  return r;
485  }
486 
487  ::std::auto_ptr< ::XMLSpace::space >
490  ::xml_schema::flags f,
492  {
493  ::xsd::cxx::xml::auto_initializer i (
494  (f & ::xml_schema::flags::dont_initialize) == 0,
495  (f & ::xml_schema::flags::keep_dom) == 0);
496 
497  ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
498  ::xsd::cxx::xml::dom::parse< char > (
499  u, h, p, f));
500 
501  if (!d.get ())
502  throw ::xsd::cxx::tree::parsing< char > ();
503 
504  ::std::auto_ptr< ::XMLSpace::space > r (
505  ::XMLSpace::space_ (
506  d, f | ::xml_schema::flags::own_dom, p));
507 
508  return r;
509  }
510 
511  ::std::auto_ptr< ::XMLSpace::space >
513  ::xercesc::DOMErrorHandler& h,
514  ::xml_schema::flags f,
516  {
517  ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
518  ::xsd::cxx::xml::dom::parse< char > (
519  u, h, p, f));
520 
521  if (!d.get ())
522  throw ::xsd::cxx::tree::parsing< char > ();
523 
524  ::std::auto_ptr< ::XMLSpace::space > r (
525  ::XMLSpace::space_ (
526  d, f | ::xml_schema::flags::own_dom, p));
527 
528  return r;
529  }
530 
531  ::std::auto_ptr< ::XMLSpace::space >
532  space_ (::std::istream& is,
533  ::xml_schema::flags f,
535  {
536  ::xsd::cxx::xml::auto_initializer i (
537  (f & ::xml_schema::flags::dont_initialize) == 0,
538  (f & ::xml_schema::flags::keep_dom) == 0);
539 
540  ::xsd::cxx::xml::sax::std_input_source isrc (is);
541  return ::XMLSpace::space_ (isrc, f, p);
542  }
543 
544  ::std::auto_ptr< ::XMLSpace::space >
545  space_ (::std::istream& is,
547  ::xml_schema::flags f,
549  {
550  ::xsd::cxx::xml::auto_initializer i (
551  (f & ::xml_schema::flags::dont_initialize) == 0,
552  (f & ::xml_schema::flags::keep_dom) == 0);
553 
554  ::xsd::cxx::xml::sax::std_input_source isrc (is);
555  return ::XMLSpace::space_ (isrc, h, f, p);
556  }
557 
558  ::std::auto_ptr< ::XMLSpace::space >
559  space_ (::std::istream& is,
560  ::xercesc::DOMErrorHandler& h,
561  ::xml_schema::flags f,
563  {
564  ::xsd::cxx::xml::sax::std_input_source isrc (is);
565  return ::XMLSpace::space_ (isrc, h, f, p);
566  }
567 
568  ::std::auto_ptr< ::XMLSpace::space >
569  space_ (::std::istream& is,
570  const ::std::string& sid,
571  ::xml_schema::flags f,
573  {
574  ::xsd::cxx::xml::auto_initializer i (
575  (f & ::xml_schema::flags::dont_initialize) == 0,
576  (f & ::xml_schema::flags::keep_dom) == 0);
577 
578  ::xsd::cxx::xml::sax::std_input_source isrc (is, sid);
579  return ::XMLSpace::space_ (isrc, f, p);
580  }
581 
582  ::std::auto_ptr< ::XMLSpace::space >
583  space_ (::std::istream& is,
584  const ::std::string& sid,
586  ::xml_schema::flags f,
588  {
589  ::xsd::cxx::xml::auto_initializer i (
590  (f & ::xml_schema::flags::dont_initialize) == 0,
591  (f & ::xml_schema::flags::keep_dom) == 0);
592 
593  ::xsd::cxx::xml::sax::std_input_source isrc (is, sid);
594  return ::XMLSpace::space_ (isrc, h, f, p);
595  }
596 
597  ::std::auto_ptr< ::XMLSpace::space >
598  space_ (::std::istream& is,
599  const ::std::string& sid,
600  ::xercesc::DOMErrorHandler& h,
601  ::xml_schema::flags f,
603  {
604  ::xsd::cxx::xml::sax::std_input_source isrc (is, sid);
605  return ::XMLSpace::space_ (isrc, h, f, p);
606  }
607 
608  ::std::auto_ptr< ::XMLSpace::space >
609  space_ (::xercesc::InputSource& i,
610  ::xml_schema::flags f,
612  {
613  ::xsd::cxx::tree::error_handler< char > h;
614 
615  ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
616  ::xsd::cxx::xml::dom::parse< char > (
617  i, h, p, f));
618 
619  h.throw_if_failed< ::xsd::cxx::tree::parsing< char > > ();
620 
621  ::std::auto_ptr< ::XMLSpace::space > r (
622  ::XMLSpace::space_ (
623  d, f | ::xml_schema::flags::own_dom, p));
624 
625  return r;
626  }
627 
628  ::std::auto_ptr< ::XMLSpace::space >
629  space_ (::xercesc::InputSource& i,
631  ::xml_schema::flags f,
633  {
634  ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
635  ::xsd::cxx::xml::dom::parse< char > (
636  i, h, p, f));
637 
638  if (!d.get ())
639  throw ::xsd::cxx::tree::parsing< char > ();
640 
641  ::std::auto_ptr< ::XMLSpace::space > r (
642  ::XMLSpace::space_ (
643  d, f | ::xml_schema::flags::own_dom, p));
644 
645  return r;
646  }
647 
648  ::std::auto_ptr< ::XMLSpace::space >
649  space_ (::xercesc::InputSource& i,
650  ::xercesc::DOMErrorHandler& h,
651  ::xml_schema::flags f,
653  {
654  ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
655  ::xsd::cxx::xml::dom::parse< char > (
656  i, h, p, f));
657 
658  if (!d.get ())
659  throw ::xsd::cxx::tree::parsing< char > ();
660 
661  ::std::auto_ptr< ::XMLSpace::space > r (
662  ::XMLSpace::space_ (
663  d, f | ::xml_schema::flags::own_dom, p));
664 
665  return r;
666  }
667 
668  ::std::auto_ptr< ::XMLSpace::space >
669  space_ (const ::xercesc::DOMDocument& d,
670  ::xml_schema::flags f,
672  {
673  if (f & ::xml_schema::flags::keep_dom)
674  {
675  ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > c (
676  static_cast< ::xercesc::DOMDocument* > (d.cloneNode (true)));
677 
678  ::std::auto_ptr< ::XMLSpace::space > r (
679  ::XMLSpace::space_ (
680  c, f | ::xml_schema::flags::own_dom, p));
681 
682  return r;
683  }
684 
685  const ::xercesc::DOMElement& e (*d.getDocumentElement ());
686  const ::xsd::cxx::xml::qualified_name< char > n (
687  ::xsd::cxx::xml::dom::name< char > (e));
688 
689  if (n.name () == "space" &&
690  n.namespace_ () == "XMLSpace")
691  {
692  ::std::auto_ptr< ::XMLSpace::space > r (
693  ::xsd::cxx::tree::traits< ::XMLSpace::space, char >::create (
694  e, f, 0));
695  return r;
696  }
697 
698  throw ::xsd::cxx::tree::unexpected_element < char > (
699  n.name (),
700  n.namespace_ (),
701  "space",
702  "XMLSpace");
703  }
704 
705  ::std::auto_ptr< ::XMLSpace::space >
706  space_ (::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument >& d,
707  ::xml_schema::flags f,
709  {
710  ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > c (
711  ((f & ::xml_schema::flags::keep_dom) &&
712  !(f & ::xml_schema::flags::own_dom))
713  ? static_cast< ::xercesc::DOMDocument* > (d->cloneNode (true))
714  : 0);
715 
716  ::xercesc::DOMDocument& doc (c.get () ? *c : *d);
717  const ::xercesc::DOMElement& e (*doc.getDocumentElement ());
718 
719  const ::xsd::cxx::xml::qualified_name< char > n (
720  ::xsd::cxx::xml::dom::name< char > (e));
721 
722  if (f & ::xml_schema::flags::keep_dom)
723  doc.setUserData (::xml_schema::dom::tree_node_key,
724  (c.get () ? &c : &d),
725  0);
726 
727  if (n.name () == "space" &&
728  n.namespace_ () == "XMLSpace")
729  {
730  ::std::auto_ptr< ::XMLSpace::space > r (
731  ::xsd::cxx::tree::traits< ::XMLSpace::space, char >::create (
732  e, f, 0));
733  return r;
734  }
735 
736  throw ::xsd::cxx::tree::unexpected_element < char > (
737  n.name (),
738  n.namespace_ (),
739  "space",
740  "XMLSpace");
741  }
742 }
743 
744 #include <ostream>
745 #include <xsd/cxx/tree/error-handler.hxx>
746 #include <xsd/cxx/xml/dom/serialization-source.hxx>
747 
748 namespace XMLSpace
749 {
750  void
751  space_ (::std::ostream& o,
752  const ::XMLSpace::space& s,
755  ::xml_schema::flags f)
756  {
757  ::xsd::cxx::xml::auto_initializer i (
758  (f & ::xml_schema::flags::dont_initialize) == 0);
759 
760  ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
761  ::XMLSpace::space_ (s, m, f));
762 
763  ::xsd::cxx::tree::error_handler< char > h;
764 
765  ::xsd::cxx::xml::dom::ostream_format_target t (o);
766  if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
767  {
768  h.throw_if_failed< ::xsd::cxx::tree::serialization< char > > ();
769  }
770  }
771 
772  void
773  space_ (::std::ostream& o,
774  const ::XMLSpace::space& s,
778  ::xml_schema::flags f)
779  {
780  ::xsd::cxx::xml::auto_initializer i (
781  (f & ::xml_schema::flags::dont_initialize) == 0);
782 
783  ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
784  ::XMLSpace::space_ (s, m, f));
785  ::xsd::cxx::xml::dom::ostream_format_target t (o);
786  if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
787  {
788  throw ::xsd::cxx::tree::serialization< char > ();
789  }
790  }
791 
792  void
793  space_ (::std::ostream& o,
794  const ::XMLSpace::space& s,
795  ::xercesc::DOMErrorHandler& h,
798  ::xml_schema::flags f)
799  {
800  ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
801  ::XMLSpace::space_ (s, m, f));
802  ::xsd::cxx::xml::dom::ostream_format_target t (o);
803  if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
804  {
805  throw ::xsd::cxx::tree::serialization< char > ();
806  }
807  }
808 
809  void
810  space_ (::xercesc::XMLFormatTarget& t,
811  const ::XMLSpace::space& s,
814  ::xml_schema::flags f)
815  {
816  ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
817  ::XMLSpace::space_ (s, m, f));
818 
819  ::xsd::cxx::tree::error_handler< char > h;
820 
821  if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
822  {
823  h.throw_if_failed< ::xsd::cxx::tree::serialization< char > > ();
824  }
825  }
826 
827  void
828  space_ (::xercesc::XMLFormatTarget& t,
829  const ::XMLSpace::space& s,
833  ::xml_schema::flags f)
834  {
835  ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
836  ::XMLSpace::space_ (s, m, f));
837  if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
838  {
839  throw ::xsd::cxx::tree::serialization< char > ();
840  }
841  }
842 
843  void
844  space_ (::xercesc::XMLFormatTarget& t,
845  const ::XMLSpace::space& s,
846  ::xercesc::DOMErrorHandler& h,
849  ::xml_schema::flags f)
850  {
851  ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
852  ::XMLSpace::space_ (s, m, f));
853  if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
854  {
855  throw ::xsd::cxx::tree::serialization< char > ();
856  }
857  }
858 
859  void
860  space_ (::xercesc::DOMDocument& d,
861  const ::XMLSpace::space& s,
863  {
864  ::xercesc::DOMElement& e (*d.getDocumentElement ());
865  const ::xsd::cxx::xml::qualified_name< char > n (
866  ::xsd::cxx::xml::dom::name< char > (e));
867 
868  if (n.name () == "space" &&
869  n.namespace_ () == "XMLSpace")
870  {
871  e << s;
872  }
873  else
874  {
875  throw ::xsd::cxx::tree::unexpected_element < char > (
876  n.name (),
877  n.namespace_ (),
878  "space",
879  "XMLSpace");
880  }
881  }
882 
883  ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument >
884  space_ (const ::XMLSpace::space& s,
886  ::xml_schema::flags f)
887  {
888  ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
889  ::xsd::cxx::xml::dom::serialize< char > (
890  "space",
891  "XMLSpace",
892  m, f));
893 
894  ::XMLSpace::space_ (*d, s, f);
895  return d;
896  }
897 
898  void
899  operator<< (::xercesc::DOMElement& e, const space& i)
900  {
901  e << static_cast< const ::xml_schema::type& > (i);
902 
903  // element_data
904  //
906  b (i.element_data ().begin ()), n (i.element_data ().end ());
907  b != n; ++b)
908  {
909  ::xercesc::DOMElement& s (
910  ::xsd::cxx::xml::dom::create_element (
911  "element_data",
912  e));
913 
914  s << *b;
915  }
916 
917  // spaceType
918  //
919  if (i.spaceType ())
920  {
921  ::xercesc::DOMAttr& a (
922  ::xsd::cxx::xml::dom::create_attribute (
923  "spaceType",
924  e));
925 
926  a << *i.spaceType ();
927  }
928  }
929 
930  void
931  operator<< (::xercesc::DOMElement& e, const element_data& i)
932  {
933  e << static_cast< const ::xml_schema::type& > (i);
934 
935  // e_id
936  //
937  {
938  ::xercesc::DOMAttr& a (
939  ::xsd::cxx::xml::dom::create_attribute (
940  "e_id",
941  e));
942 
943  a << i.e_id ();
944  }
945 
946  // ord
947  //
948  {
949  ::xercesc::DOMAttr& a (
950  ::xsd::cxx::xml::dom::create_attribute (
951  "ord",
952  e));
953 
954  a << i.ord ();
955  }
956 
957  // bd
958  //
959  {
960  ::xercesc::DOMAttr& a (
961  ::xsd::cxx::xml::dom::create_attribute (
962  "bd",
963  e));
964 
965  a << i.bd ();
966  }
967 
968  // n
969  //
970  {
971  ::xercesc::DOMAttr& a (
972  ::xsd::cxx::xml::dom::create_attribute (
973  "n",
974  e));
975 
976  a << i.n ();
977  }
978 
979  // chgd
980  //
981  {
982  ::xercesc::DOMAttr& a (
983  ::xsd::cxx::xml::dom::create_attribute (
984  "chgd",
985  e));
986 
987  a << i.chgd ();
988  }
989  }
990 }
991 
992 #include <xsd/cxx/post.hxx>
993 
994 // Begin epilogue.
995 //
996 //
997 // End epilogue.
998