39 #include <xsd/cxx/pre.hxx>
73 return this->variables_;
79 return this->variables_;
85 this->variables_.set (x);
97 this->variables_.set (x);
125 return this->name_.get ();
131 return this->name_.get ();
141 name (::std::auto_ptr< name_type > x)
149 return this->value_.get ();
155 return this->value_.get ();
161 this->value_.set (x);
171 return this->x_.get ();
177 return this->x_.get ();
187 x (::std::auto_ptr< x_type > x)
217 m (::std::auto_ptr< m_type > x)
223 #include <xsd/cxx/xml/dom/parsing-source.hxx>
225 #include <xsd/cxx/tree/type-factory-map.hxx>
230 const ::xsd::cxx::tree::type_factory_plate< 0, char >
231 type_factory_plate_init;
251 var_ (x.var_, f, this)
262 if ((f & ::xml_schema::flags::base) == 0)
264 ::xsd::cxx::xml::dom::parser< char > p (e,
true,
false);
269 void variables_type::
270 parse (::xsd::cxx::xml::dom::parser< char >& p,
273 for (; p.more_elements (); p.next_element ())
275 const ::xercesc::DOMElement& i (p.cur_element ());
276 const ::xsd::cxx::xml::qualified_name< char > n (
277 ::xsd::cxx::xml::dom::name< char > (i));
281 if (n.name () ==
"var" && n.namespace_ ().empty ())
283 ::std::auto_ptr< var_type > r (
284 var_traits::create (i, f,
this));
286 this->var_.push_back (r);
322 variables_ (x.variables_, f, this),
328 mesh (const ::xercesc::DOMElement& e,
332 variables_ (f, this),
335 if ((f & ::xml_schema::flags::base) == 0)
337 ::xsd::cxx::xml::dom::parser< char > p (e,
true,
false);
343 parse (::xsd::cxx::xml::dom::parser< char >& p,
346 for (; p.more_elements (); p.next_element ())
348 const ::xercesc::DOMElement& i (p.cur_element ());
349 const ::xsd::cxx::xml::qualified_name< char > n (
350 ::xsd::cxx::xml::dom::name< char > (i));
354 if (n.name () ==
"variables" && n.namespace_ ().empty ())
356 ::std::auto_ptr< variables_type > r (
357 variables_traits::create (i, f,
this));
359 if (!this->variables_)
361 this->variables_.set (r);
368 if (n.name () ==
"v" && n.namespace_ ().empty ())
370 ::std::auto_ptr< v_type > r (
371 v_traits::create (i, f,
this));
373 this->v_.push_back (r);
385 return new class mesh (*
this, f, c);
410 name_ (x.name_, f, this),
411 value_ (x.value_, f, this)
416 var (const ::xercesc::DOMElement& e,
423 if ((f & ::xml_schema::flags::base) == 0)
425 ::xsd::cxx::xml::dom::parser< char > p (e,
false,
true);
431 parse (::xsd::cxx::xml::dom::parser< char >& p,
434 while (p.more_attributes ())
436 const ::xercesc::DOMAttr& i (p.next_attribute ());
437 const ::xsd::cxx::xml::qualified_name< char > n (
438 ::xsd::cxx::xml::dom::name< char > (i));
440 if (n.name () ==
"name" && n.namespace_ ().empty ())
442 ::std::auto_ptr< name_type > r (
443 name_traits::create (i, f,
this));
449 if (n.name () ==
"value" && n.namespace_ ().empty ())
451 this->value_.set (value_traits::create (i, f,
this));
456 if (!name_.present ())
458 throw ::xsd::cxx::tree::expected_attribute< char > (
463 if (!value_.present ())
465 throw ::xsd::cxx::tree::expected_attribute< char > (
475 return new class var (*
this, f, c);
505 v (const ::xercesc::DOMElement& e,
512 if ((f & ::xml_schema::flags::base) == 0)
514 ::xsd::cxx::xml::dom::parser< char > p (e,
false,
true);
520 parse (::xsd::cxx::xml::dom::parser< char >& p,
523 while (p.more_attributes ())
525 const ::xercesc::DOMAttr& i (p.next_attribute ());
526 const ::xsd::cxx::xml::qualified_name< char > n (
527 ::xsd::cxx::xml::dom::name< char > (i));
529 if (n.name () ==
"x" && n.namespace_ ().empty ())
531 ::std::auto_ptr< x_type > r (
532 x_traits::create (i, f,
this));
538 if (n.name () ==
"m" && n.namespace_ ().empty ())
540 ::std::auto_ptr< m_type > r (
541 m_traits::create (i, f,
this));
550 throw ::xsd::cxx::tree::expected_attribute< char > (
560 return new class v (*
this, f, c);
571 #include <xsd/cxx/tree/std-ostream-map.hxx>
576 const ::xsd::cxx::tree::std_ostream_plate< 0, char >
577 std_ostream_plate_init;
583 operator<< (::std::ostream& o,
const variables_type& i)
586 b (i.var ().begin ()), e (i.var ().end ());
589 o << ::std::endl <<
"var: " << *b;
596 operator<< (::std::ostream& o,
const mesh& i)
600 o << ::std::endl <<
"variables: " << *i.variables ();
604 b (i.v ().begin ()), e (i.v ().end ());
607 o << ::std::endl <<
"v: " << *b;
614 operator<< (::std::ostream& o,
const var& i)
616 o << ::std::endl <<
"name: " << i.name ();
617 o << ::std::endl <<
"value: " << i.value ();
622 operator<< (::std::ostream& o,
const v& i)
624 o << ::std::endl <<
"x: " << i.x ();
627 o << ::std::endl <<
"m: " << *i.m ();
635 #include <xsd/cxx/xml/sax/std-input-source.hxx>
636 #include <xsd/cxx/tree/error-handler.hxx>
640 ::std::auto_ptr< ::XMLMesh1D::mesh >
645 ::xsd::cxx::xml::auto_initializer i (
646 (f & ::xml_schema::flags::dont_initialize) == 0,
647 (f & ::xml_schema::flags::keep_dom) == 0);
649 ::xsd::cxx::tree::error_handler< char > h;
651 ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
652 ::xsd::cxx::xml::dom::parse< char > (
655 h.throw_if_failed< ::xsd::cxx::tree::parsing< char > > ();
657 ::std::auto_ptr< ::XMLMesh1D::mesh > r (
659 d, f | ::xml_schema::flags::own_dom, p));
664 ::std::auto_ptr< ::XMLMesh1D::mesh >
670 ::xsd::cxx::xml::auto_initializer i (
671 (f & ::xml_schema::flags::dont_initialize) == 0,
672 (f & ::xml_schema::flags::keep_dom) == 0);
674 ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
675 ::xsd::cxx::xml::dom::parse< char > (
679 throw ::xsd::cxx::tree::parsing< char > ();
681 ::std::auto_ptr< ::XMLMesh1D::mesh > r (
683 d, f | ::xml_schema::flags::own_dom, p));
688 ::std::auto_ptr< ::XMLMesh1D::mesh >
690 ::xercesc::DOMErrorHandler& h,
694 ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
695 ::xsd::cxx::xml::dom::parse< char > (
699 throw ::xsd::cxx::tree::parsing< char > ();
701 ::std::auto_ptr< ::XMLMesh1D::mesh > r (
703 d, f | ::xml_schema::flags::own_dom, p));
708 ::std::auto_ptr< ::XMLMesh1D::mesh >
713 ::xsd::cxx::xml::auto_initializer i (
714 (f & ::xml_schema::flags::dont_initialize) == 0,
715 (f & ::xml_schema::flags::keep_dom) == 0);
717 ::xsd::cxx::xml::sax::std_input_source isrc (is);
721 ::std::auto_ptr< ::XMLMesh1D::mesh >
727 ::xsd::cxx::xml::auto_initializer i (
728 (f & ::xml_schema::flags::dont_initialize) == 0,
729 (f & ::xml_schema::flags::keep_dom) == 0);
731 ::xsd::cxx::xml::sax::std_input_source isrc (is);
735 ::std::auto_ptr< ::XMLMesh1D::mesh >
737 ::xercesc::DOMErrorHandler& h,
741 ::xsd::cxx::xml::sax::std_input_source isrc (is);
745 ::std::auto_ptr< ::XMLMesh1D::mesh >
751 ::xsd::cxx::xml::auto_initializer i (
752 (f & ::xml_schema::flags::dont_initialize) == 0,
753 (f & ::xml_schema::flags::keep_dom) == 0);
755 ::xsd::cxx::xml::sax::std_input_source isrc (is, sid);
759 ::std::auto_ptr< ::XMLMesh1D::mesh >
766 ::xsd::cxx::xml::auto_initializer i (
767 (f & ::xml_schema::flags::dont_initialize) == 0,
768 (f & ::xml_schema::flags::keep_dom) == 0);
770 ::xsd::cxx::xml::sax::std_input_source isrc (is, sid);
774 ::std::auto_ptr< ::XMLMesh1D::mesh >
777 ::xercesc::DOMErrorHandler& h,
781 ::xsd::cxx::xml::sax::std_input_source isrc (is, sid);
785 ::std::auto_ptr< ::XMLMesh1D::mesh >
790 ::xsd::cxx::tree::error_handler< char > h;
792 ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
793 ::xsd::cxx::xml::dom::parse< char > (
796 h.throw_if_failed< ::xsd::cxx::tree::parsing< char > > ();
798 ::std::auto_ptr< ::XMLMesh1D::mesh > r (
800 d, f | ::xml_schema::flags::own_dom, p));
805 ::std::auto_ptr< ::XMLMesh1D::mesh >
811 ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
812 ::xsd::cxx::xml::dom::parse< char > (
816 throw ::xsd::cxx::tree::parsing< char > ();
818 ::std::auto_ptr< ::XMLMesh1D::mesh > r (
820 d, f | ::xml_schema::flags::own_dom, p));
825 ::std::auto_ptr< ::XMLMesh1D::mesh >
827 ::xercesc::DOMErrorHandler& h,
831 ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
832 ::xsd::cxx::xml::dom::parse< char > (
836 throw ::xsd::cxx::tree::parsing< char > ();
838 ::std::auto_ptr< ::XMLMesh1D::mesh > r (
840 d, f | ::xml_schema::flags::own_dom, p));
845 ::std::auto_ptr< ::XMLMesh1D::mesh >
846 mesh_ (const ::xercesc::DOMDocument& d,
850 if (f & ::xml_schema::flags::keep_dom)
852 ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > c (
853 static_cast< ::xercesc::DOMDocument* > (d.cloneNode (
true)));
855 ::std::auto_ptr< ::XMLMesh1D::mesh > r (
857 c, f | ::xml_schema::flags::own_dom, p));
862 const ::xercesc::DOMElement& e (*d.getDocumentElement ());
863 const ::xsd::cxx::xml::qualified_name< char > n (
864 ::xsd::cxx::xml::dom::name< char > (e));
866 if (n.name () ==
"mesh" &&
867 n.namespace_ () ==
"XMLMesh1D")
869 ::std::auto_ptr< ::XMLMesh1D::mesh > r (
870 ::xsd::cxx::tree::traits< ::XMLMesh1D::mesh, char >::create (
875 throw ::xsd::cxx::tree::unexpected_element < char > (
882 ::std::auto_ptr< ::XMLMesh1D::mesh >
883 mesh_ (::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument >& d,
887 ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > c (
888 ((f & ::xml_schema::flags::keep_dom) &&
889 !(f & ::xml_schema::flags::own_dom))
890 ? static_cast< ::xercesc::DOMDocument* > (d->cloneNode (
true))
893 ::xercesc::DOMDocument& doc (c.get () ? *c : *d);
894 const ::xercesc::DOMElement& e (*doc.getDocumentElement ());
896 const ::xsd::cxx::xml::qualified_name< char > n (
897 ::xsd::cxx::xml::dom::name< char > (e));
899 if (f & ::xml_schema::flags::keep_dom)
901 (c.get () ? &c : &d),
904 if (n.name () ==
"mesh" &&
905 n.namespace_ () ==
"XMLMesh1D")
907 ::std::auto_ptr< ::XMLMesh1D::mesh > r (
908 ::xsd::cxx::tree::traits< ::XMLMesh1D::mesh, char >::create (
913 throw ::xsd::cxx::tree::unexpected_element < char > (
922 #include <xsd/cxx/tree/error-handler.hxx>
923 #include <xsd/cxx/xml/dom/serialization-source.hxx>
925 #include <xsd/cxx/tree/type-serializer-map.hxx>
930 const ::xsd::cxx::tree::type_serializer_plate< 0, char >
931 type_serializer_plate_init;
938 const ::XMLMesh1D::mesh& s,
943 ::xsd::cxx::xml::auto_initializer i (
944 (f & ::xml_schema::flags::dont_initialize) == 0);
946 ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
949 ::xsd::cxx::tree::error_handler< char > h;
951 ::xsd::cxx::xml::dom::ostream_format_target t (o);
952 if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
954 h.throw_if_failed< ::xsd::cxx::tree::serialization< char > > ();
960 const ::XMLMesh1D::mesh& s,
966 ::xsd::cxx::xml::auto_initializer i (
967 (f & ::xml_schema::flags::dont_initialize) == 0);
969 ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
971 ::xsd::cxx::xml::dom::ostream_format_target t (o);
972 if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
974 throw ::xsd::cxx::tree::serialization< char > ();
980 const ::XMLMesh1D::mesh& s,
981 ::xercesc::DOMErrorHandler& h,
986 ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
988 ::xsd::cxx::xml::dom::ostream_format_target t (o);
989 if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
991 throw ::xsd::cxx::tree::serialization< char > ();
996 mesh_ (::xercesc::XMLFormatTarget& t,
997 const ::XMLMesh1D::mesh& s,
1002 ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
1005 ::xsd::cxx::tree::error_handler< char > h;
1007 if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
1009 h.throw_if_failed< ::xsd::cxx::tree::serialization< char > > ();
1015 const ::XMLMesh1D::mesh& s,
1021 ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
1023 if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
1025 throw ::xsd::cxx::tree::serialization< char > ();
1031 const ::XMLMesh1D::mesh& s,
1032 ::xercesc::DOMErrorHandler& h,
1037 ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
1039 if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
1041 throw ::xsd::cxx::tree::serialization< char > ();
1047 const ::XMLMesh1D::mesh& s,
1050 ::xercesc::DOMElement& e (*d.getDocumentElement ());
1051 const ::xsd::cxx::xml::qualified_name< char > n (
1052 ::xsd::cxx::xml::dom::name< char > (e));
1054 if (n.name () ==
"mesh" &&
1055 n.namespace_ () ==
"XMLMesh1D")
1061 throw ::xsd::cxx::tree::unexpected_element < char > (
1069 ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument >
1074 ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
1075 ::xsd::cxx::xml::dom::serialize< char > (
1085 operator<< (::xercesc::DOMElement& e,
const variables_type& i)
1087 e << static_cast< const ::xml_schema::type& > (i);
1092 b (i.var ().begin ()), n (i.var ().end ());
1095 ::xercesc::DOMElement& s (
1096 ::xsd::cxx::xml::dom::create_element (
1105 operator<< (::xercesc::DOMElement& e,
const mesh& i)
1107 e << static_cast< const ::xml_schema::type& > (i);
1113 ::xercesc::DOMElement& s (
1114 ::xsd::cxx::xml::dom::create_element (
1118 s << *i.variables ();
1124 b (i.v ().begin ()), n (i.v ().end ());
1127 ::xercesc::DOMElement& s (
1128 ::xsd::cxx::xml::dom::create_element (
1137 operator<< (::xercesc::DOMElement& e,
const var& i)
1139 e << static_cast< const ::xml_schema::type& > (i);
1144 ::xercesc::DOMAttr& a (
1145 ::xsd::cxx::xml::dom::create_attribute (
1155 ::xercesc::DOMAttr& a (
1156 ::xsd::cxx::xml::dom::create_attribute (
1165 operator<< (::xercesc::DOMElement& e,
const v& i)
1167 e << static_cast< const ::xml_schema::type& > (i);
1172 ::xercesc::DOMAttr& a (
1173 ::xsd::cxx::xml::dom::create_attribute (
1184 ::xercesc::DOMAttr& a (
1185 ::xsd::cxx::xml::dom::create_attribute (
1194 #include <xsd/cxx/post.hxx>
::xml_schema::string m_type
Attribute type.
virtual mesh * _clone(::xml_schema::flags f=0,::xml_schema::container *c=0) const
Copy the instance polymorphically.
::xsd::cxx::tree::flags flags
Parsing and serialization flags.
virtual ~mesh()
Destructor.
::xml_schema::decimal value_type
Attribute type.
virtual v * _clone(::xml_schema::flags f=0,::xml_schema::container *c=0) const
Copy the instance polymorphically.
Generated from mesh_h1d_xml.xsd.
Class corresponding to the v schema type.
C++ namespace for the XMLMesh1D schema namespace.
virtual ~variables_type()
Destructor.
::xsd::cxx::tree::as_decimal< decimal > as_decimal
Serialization wrapper for the decimal type.
::xml_schema::string name_type
Attribute type.
::xsd::cxx::tree::type type
C++ type corresponding to the anyType XML Schema built-in type.
const m_optional & m() const
Return a read-only (constant) reference to the attribute container.
Class corresponding to the mesh schema type.
::std::auto_ptr< ::XMLMesh1D::mesh > mesh_(const ::std::string &uri,::xml_schema::flags f=0, const ::xml_schema::properties &p=::xml_schema::properties())
Parse a URI or a local file.
v(const x_type &)
Create an instance from the ultimate base and initializers for required elements and attributes...
const value_type & value() const
Return a read-only (constant) reference to the attribute.
virtual ~var()
Destructor.
::xsd::cxx::tree::name< char, token > name
C++ type corresponding to the Name XML Schema built-in type.
::xsd::cxx::xml::dom::namespace_infomap< char > namespace_infomap
Namespace serialization information map.
v_sequence::const_iterator v_const_iterator
Element constant iterator type.
::xsd::cxx::tree::optional< m_type > m_optional
Attribute optional container type.
::xsd::cxx::xml::error_handler< char > error_handler
Error handler callback interface.
::xsd::cxx::tree::sequence< v_type > v_sequence
Element sequence container type.
const XMLCh *const tree_node_key
DOM user data key for back pointers to tree nodes.
::xsd::cxx::tree::properties< char > properties
Parsing properties.
Class corresponding to the var schema type.
virtual var * _clone(::xml_schema::flags f=0,::xml_schema::container *c=0) const
Copy the instance polymorphically.
const v_sequence & v() const
Return a read-only (constant) reference to the element sequence.
const x_type & x() const
Return a read-only (constant) reference to the attribute.
virtual variables_type * _clone(::xml_schema::flags f=0,::xml_schema::container *c=0) const
Copy the instance polymorphically.
::xsd::cxx::tree::optional< variables_type > variables_optional
Element optional container type.
var_sequence::const_iterator var_const_iterator
Element constant iterator type.
const name_type & name() const
Return a read-only (constant) reference to the attribute.
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.
const var_sequence & var() const
Return a read-only (constant) reference to the element sequence.
variables_type()
Create an instance from the ultimate base and initializers for required elements and attributes...
Class corresponding to the variables_type schema type.
::xsd::cxx::tree::type container
Alias for the anyType type.
const variables_optional & variables() const
Return a read-only (constant) reference to the element container.
::xsd::cxx::tree::sequence< var_type > var_sequence
Element sequence container type.
::xml_schema::string x_type
Attribute type.
mesh()
Create an instance from the ultimate base and initializers for required elements and attributes...
var(const name_type &, const value_type &)
Create an instance from the ultimate base and initializers for required elements and attributes...