00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 #include <xsd/cxx/pre.hxx>
00040
00041 #include <otsdaq-utilities/ECLWriter/ECL.hxx>
00042
00043
00044
00045
00046 const Tag_t::name_type& Tag_t::
00047 name () const
00048 {
00049 return this->name_.get ();
00050 }
00051
00052 Tag_t::name_type& Tag_t::
00053 name ()
00054 {
00055 return this->name_.get ();
00056 }
00057
00058 void Tag_t::
00059 name (const name_type& x)
00060 {
00061 this->name_.set (x);
00062 }
00063
00064 void Tag_t::
00065 name (::std::unique_ptr< name_type > x)
00066 {
00067 this->name_.set (std::move (x));
00068 }
00069
00070
00071
00072
00073
00074 const Attachment_t::type_type& Attachment_t::
00075 type () const
00076 {
00077 return this->type_.get ();
00078 }
00079
00080 Attachment_t::type_type& Attachment_t::
00081 type ()
00082 {
00083 return this->type_.get ();
00084 }
00085
00086 void Attachment_t::
00087 type (const type_type& x)
00088 {
00089 this->type_.set (x);
00090 }
00091
00092 void Attachment_t::
00093 type (::std::unique_ptr< type_type > x)
00094 {
00095 this->type_.set (std::move (x));
00096 }
00097
00098 const Attachment_t::filename_type& Attachment_t::
00099 filename () const
00100 {
00101 return this->filename_.get ();
00102 }
00103
00104 Attachment_t::filename_type& Attachment_t::
00105 filename ()
00106 {
00107 return this->filename_.get ();
00108 }
00109
00110 void Attachment_t::
00111 filename (const filename_type& x)
00112 {
00113 this->filename_.set (x);
00114 }
00115
00116 void Attachment_t::
00117 filename (::std::unique_ptr< filename_type > x)
00118 {
00119 this->filename_.set (std::move (x));
00120 }
00121
00122
00123
00124
00125
00126 const Field_t::name_type& Field_t::
00127 name () const
00128 {
00129 return this->name_.get ();
00130 }
00131
00132 Field_t::name_type& Field_t::
00133 name ()
00134 {
00135 return this->name_.get ();
00136 }
00137
00138 void Field_t::
00139 name (const name_type& x)
00140 {
00141 this->name_.set (x);
00142 }
00143
00144 void Field_t::
00145 name (::std::unique_ptr< name_type > x)
00146 {
00147 this->name_.set (std::move (x));
00148 }
00149
00150
00151
00152
00153
00154 const Form_t::field_sequence& Form_t::
00155 field () const
00156 {
00157 return this->field_;
00158 }
00159
00160 Form_t::field_sequence& Form_t::
00161 field ()
00162 {
00163 return this->field_;
00164 }
00165
00166 void Form_t::
00167 field (const field_sequence& s)
00168 {
00169 this->field_ = s;
00170 }
00171
00172 const Form_t::name_type& Form_t::
00173 name () const
00174 {
00175 return this->name_.get ();
00176 }
00177
00178 Form_t::name_type& Form_t::
00179 name ()
00180 {
00181 return this->name_.get ();
00182 }
00183
00184 void Form_t::
00185 name (const name_type& x)
00186 {
00187 this->name_.set (x);
00188 }
00189
00190 void Form_t::
00191 name (::std::unique_ptr< name_type > x)
00192 {
00193 this->name_.set (std::move (x));
00194 }
00195
00196
00197
00198
00199
00200 const ECLEntry_t::tag_sequence& ECLEntry_t::
00201 tag () const
00202 {
00203 return this->tag_;
00204 }
00205
00206 ECLEntry_t::tag_sequence& ECLEntry_t::
00207 tag ()
00208 {
00209 return this->tag_;
00210 }
00211
00212 void ECLEntry_t::
00213 tag (const tag_sequence& s)
00214 {
00215 this->tag_ = s;
00216 }
00217
00218 const ECLEntry_t::attachment_sequence& ECLEntry_t::
00219 attachment () const
00220 {
00221 return this->attachment_;
00222 }
00223
00224 ECLEntry_t::attachment_sequence& ECLEntry_t::
00225 attachment ()
00226 {
00227 return this->attachment_;
00228 }
00229
00230 void ECLEntry_t::
00231 attachment (const attachment_sequence& s)
00232 {
00233 this->attachment_ = s;
00234 }
00235
00236 const ECLEntry_t::form_optional& ECLEntry_t::
00237 form () const
00238 {
00239 return this->form_;
00240 }
00241
00242 ECLEntry_t::form_optional& ECLEntry_t::
00243 form ()
00244 {
00245 return this->form_;
00246 }
00247
00248 void ECLEntry_t::
00249 form (const form_type& x)
00250 {
00251 this->form_.set (x);
00252 }
00253
00254 void ECLEntry_t::
00255 form (const form_optional& x)
00256 {
00257 this->form_ = x;
00258 }
00259
00260 void ECLEntry_t::
00261 form (::std::unique_ptr< form_type > x)
00262 {
00263 this->form_.set (std::move (x));
00264 }
00265
00266 const ECLEntry_t::author_type& ECLEntry_t::
00267 author () const
00268 {
00269 return this->author_.get ();
00270 }
00271
00272 ECLEntry_t::author_type& ECLEntry_t::
00273 author ()
00274 {
00275 return this->author_.get ();
00276 }
00277
00278 void ECLEntry_t::
00279 author (const author_type& x)
00280 {
00281 this->author_.set (x);
00282 }
00283
00284 void ECLEntry_t::
00285 author (::std::unique_ptr< author_type > x)
00286 {
00287 this->author_.set (std::move (x));
00288 }
00289
00290 const ECLEntry_t::category_type& ECLEntry_t::
00291 category () const
00292 {
00293 return this->category_.get ();
00294 }
00295
00296 ECLEntry_t::category_type& ECLEntry_t::
00297 category ()
00298 {
00299 return this->category_.get ();
00300 }
00301
00302 void ECLEntry_t::
00303 category (const category_type& x)
00304 {
00305 this->category_.set (x);
00306 }
00307
00308 void ECLEntry_t::
00309 category (::std::unique_ptr< category_type > x)
00310 {
00311 this->category_.set (std::move (x));
00312 }
00313
00314
00315 #include <xsd/cxx/xml/dom/parsing-source.hxx>
00316
00317
00318
00319
00320 Tag_t::
00321 Tag_t ()
00322 : ::xml_schema::type (),
00323 name_ (this)
00324 {
00325 }
00326
00327 Tag_t::
00328 Tag_t (const name_type& name)
00329 : ::xml_schema::type (),
00330 name_ (name, this)
00331 {
00332 }
00333
00334 Tag_t::
00335 Tag_t (const Tag_t& x,
00336 ::xml_schema::flags f,
00337 ::xml_schema::container* c)
00338 : ::xml_schema::type (x, f, c),
00339 name_ (x.name_, f, this)
00340 {
00341 }
00342
00343 Tag_t::
00344 Tag_t (const ::xercesc::DOMElement& e,
00345 ::xml_schema::flags f,
00346 ::xml_schema::container* c)
00347 : ::xml_schema::type (e, f | ::xml_schema::flags::base, c),
00348 name_ (this)
00349 {
00350 if ((f & ::xml_schema::flags::base) == 0)
00351 {
00352 ::xsd::cxx::xml::dom::parser< char > p (e, false, false, true);
00353 this->parse (p, f);
00354 }
00355 }
00356
00357 void Tag_t::
00358 parse (::xsd::cxx::xml::dom::parser< char >& p,
00359 ::xml_schema::flags f)
00360 {
00361 while (p.more_attributes ())
00362 {
00363 const ::xercesc::DOMAttr& i (p.next_attribute ());
00364 const ::xsd::cxx::xml::qualified_name< char > n (
00365 ::xsd::cxx::xml::dom::name< char > (i));
00366
00367 if (n.name () == "name" && n.namespace_ ().empty ())
00368 {
00369 this->name_.set (name_traits::create (i, f, this));
00370 continue;
00371 }
00372 }
00373
00374 if (!name_.present ())
00375 {
00376 throw ::xsd::cxx::tree::expected_attribute< char > (
00377 "name",
00378 "");
00379 }
00380 }
00381
00382 Tag_t* Tag_t::
00383 _clone (::xml_schema::flags f,
00384 ::xml_schema::container* c) const
00385 {
00386 return new class Tag_t (*this, f, c);
00387 }
00388
00389 Tag_t& Tag_t::
00390 operator= (const Tag_t& x)
00391 {
00392 if (this != &x)
00393 {
00394 static_cast< ::xml_schema::type& > (*this) = x;
00395 this->name_ = x.name_;
00396 }
00397
00398 return *this;
00399 }
00400
00401 Tag_t::
00402 ~Tag_t ()
00403 {
00404 }
00405
00406
00407
00408
00409 Attachment_t::
00410 Attachment_t ()
00411 : ::xml_schema::base64_binary (),
00412 type_ (this),
00413 filename_ (this)
00414 {
00415 }
00416
00417 Attachment_t::
00418 Attachment_t (const type_type& type,
00419 const filename_type& filename)
00420 : ::xml_schema::base64_binary (),
00421 type_ (type, this),
00422 filename_ (filename, this)
00423 {
00424 }
00425
00426 Attachment_t::
00427 Attachment_t (const ::xml_schema::base64_binary& _xsd_base64_binary_base,
00428 const type_type& type,
00429 const filename_type& filename)
00430 : ::xml_schema::base64_binary (_xsd_base64_binary_base),
00431 type_ (type, this),
00432 filename_ (filename, this)
00433 {
00434 }
00435
00436 Attachment_t::
00437 Attachment_t (const Attachment_t& x,
00438 ::xml_schema::flags f,
00439 ::xml_schema::container* c)
00440 : ::xml_schema::base64_binary (x, f, c),
00441 type_ (x.type_, f, this),
00442 filename_ (x.filename_, f, this)
00443 {
00444 }
00445
00446 Attachment_t::
00447 Attachment_t (const ::xercesc::DOMElement& e,
00448 ::xml_schema::flags f,
00449 ::xml_schema::container* c)
00450 : ::xml_schema::base64_binary (e, f | ::xml_schema::flags::base, c),
00451 type_ (this),
00452 filename_ (this)
00453 {
00454 if ((f & ::xml_schema::flags::base) == 0)
00455 {
00456 ::xsd::cxx::xml::dom::parser< char > p (e, false, false, true);
00457 this->parse (p, f);
00458 }
00459 }
00460
00461 void Attachment_t::
00462 parse (::xsd::cxx::xml::dom::parser< char >& p,
00463 ::xml_schema::flags f)
00464 {
00465 while (p.more_attributes ())
00466 {
00467 const ::xercesc::DOMAttr& i (p.next_attribute ());
00468 const ::xsd::cxx::xml::qualified_name< char > n (
00469 ::xsd::cxx::xml::dom::name< char > (i));
00470
00471 if (n.name () == "type" && n.namespace_ ().empty ())
00472 {
00473 this->type_.set (type_traits::create (i, f, this));
00474 continue;
00475 }
00476
00477 if (n.name () == "filename" && n.namespace_ ().empty ())
00478 {
00479 this->filename_.set (filename_traits::create (i, f, this));
00480 continue;
00481 }
00482 }
00483
00484 if (!type_.present ())
00485 {
00486 throw ::xsd::cxx::tree::expected_attribute< char > (
00487 "type",
00488 "");
00489 }
00490
00491 if (!filename_.present ())
00492 {
00493 throw ::xsd::cxx::tree::expected_attribute< char > (
00494 "filename",
00495 "");
00496 }
00497 }
00498
00499 Attachment_t* Attachment_t::
00500 _clone (::xml_schema::flags f,
00501 ::xml_schema::container* c) const
00502 {
00503 return new class Attachment_t (*this, f, c);
00504 }
00505
00506 Attachment_t& Attachment_t::
00507 operator= (const Attachment_t& x)
00508 {
00509 if (this != &x)
00510 {
00511 static_cast< ::xml_schema::base64_binary& > (*this) = x;
00512 this->type_ = x.type_;
00513 this->filename_ = x.filename_;
00514 }
00515
00516 return *this;
00517 }
00518
00519 Attachment_t::
00520 ~Attachment_t ()
00521 {
00522 }
00523
00524
00525
00526
00527 Field_t::
00528 Field_t ()
00529 : ::xml_schema::string (),
00530 name_ (this)
00531 {
00532 }
00533
00534 Field_t::
00535 Field_t (const name_type& name)
00536 : ::xml_schema::string (),
00537 name_ (name, this)
00538 {
00539 }
00540
00541 Field_t::
00542 Field_t (const char* _xsd_string_base,
00543 const name_type& name)
00544 : ::xml_schema::string (_xsd_string_base),
00545 name_ (name, this)
00546 {
00547 }
00548
00549 Field_t::
00550 Field_t (const ::std::string& _xsd_string_base,
00551 const name_type& name)
00552 : ::xml_schema::string (_xsd_string_base),
00553 name_ (name, this)
00554 {
00555 }
00556
00557 Field_t::
00558 Field_t (const ::xml_schema::string& _xsd_string_base,
00559 const name_type& name)
00560 : ::xml_schema::string (_xsd_string_base),
00561 name_ (name, this)
00562 {
00563 }
00564
00565 Field_t::
00566 Field_t (const Field_t& x,
00567 ::xml_schema::flags f,
00568 ::xml_schema::container* c)
00569 : ::xml_schema::string (x, f, c),
00570 name_ (x.name_, f, this)
00571 {
00572 }
00573
00574 Field_t::
00575 Field_t (const ::xercesc::DOMElement& e,
00576 ::xml_schema::flags f,
00577 ::xml_schema::container* c)
00578 : ::xml_schema::string (e, f | ::xml_schema::flags::base, c),
00579 name_ (this)
00580 {
00581 if ((f & ::xml_schema::flags::base) == 0)
00582 {
00583 ::xsd::cxx::xml::dom::parser< char > p (e, false, false, true);
00584 this->parse (p, f);
00585 }
00586 }
00587
00588 void Field_t::
00589 parse (::xsd::cxx::xml::dom::parser< char >& p,
00590 ::xml_schema::flags f)
00591 {
00592 while (p.more_attributes ())
00593 {
00594 const ::xercesc::DOMAttr& i (p.next_attribute ());
00595 const ::xsd::cxx::xml::qualified_name< char > n (
00596 ::xsd::cxx::xml::dom::name< char > (i));
00597
00598 if (n.name () == "name" && n.namespace_ ().empty ())
00599 {
00600 this->name_.set (name_traits::create (i, f, this));
00601 continue;
00602 }
00603 }
00604
00605 if (!name_.present ())
00606 {
00607 throw ::xsd::cxx::tree::expected_attribute< char > (
00608 "name",
00609 "");
00610 }
00611 }
00612
00613 Field_t* Field_t::
00614 _clone (::xml_schema::flags f,
00615 ::xml_schema::container* c) const
00616 {
00617 return new class Field_t (*this, f, c);
00618 }
00619
00620 Field_t& Field_t::
00621 operator= (const Field_t& x)
00622 {
00623 if (this != &x)
00624 {
00625 static_cast< ::xml_schema::string& > (*this) = x;
00626 this->name_ = x.name_;
00627 }
00628
00629 return *this;
00630 }
00631
00632 Field_t::
00633 ~Field_t ()
00634 {
00635 }
00636
00637
00638
00639
00640 Form_t::
00641 Form_t ()
00642 : ::xml_schema::type (),
00643 field_ (this),
00644 name_ (this)
00645 {
00646 }
00647
00648 Form_t::
00649 Form_t (const name_type& name)
00650 : ::xml_schema::type (),
00651 field_ (this),
00652 name_ (name, this)
00653 {
00654 }
00655
00656 Form_t::
00657 Form_t (const Form_t& x,
00658 ::xml_schema::flags f,
00659 ::xml_schema::container* c)
00660 : ::xml_schema::type (x, f, c),
00661 field_ (x.field_, f, this),
00662 name_ (x.name_, f, this)
00663 {
00664 }
00665
00666 Form_t::
00667 Form_t (const ::xercesc::DOMElement& e,
00668 ::xml_schema::flags f,
00669 ::xml_schema::container* c)
00670 : ::xml_schema::type (e, f | ::xml_schema::flags::base, c),
00671 field_ (this),
00672 name_ (this)
00673 {
00674 if ((f & ::xml_schema::flags::base) == 0)
00675 {
00676 ::xsd::cxx::xml::dom::parser< char > p (e, true, false, true);
00677 this->parse (p, f);
00678 }
00679 }
00680
00681 void Form_t::
00682 parse (::xsd::cxx::xml::dom::parser< char >& p,
00683 ::xml_schema::flags f)
00684 {
00685 for (; p.more_content (); p.next_content (false))
00686 {
00687 const ::xercesc::DOMElement& i (p.cur_element ());
00688 const ::xsd::cxx::xml::qualified_name< char > n (
00689 ::xsd::cxx::xml::dom::name< char > (i));
00690
00691
00692
00693 if (n.name () == "field" && n.namespace_ ().empty ())
00694 {
00695 ::std::unique_ptr< field_type > r (
00696 field_traits::create (i, f, this));
00697
00698 this->field_.push_back (::std::move (r));
00699 continue;
00700 }
00701
00702 break;
00703 }
00704
00705 while (p.more_attributes ())
00706 {
00707 const ::xercesc::DOMAttr& i (p.next_attribute ());
00708 const ::xsd::cxx::xml::qualified_name< char > n (
00709 ::xsd::cxx::xml::dom::name< char > (i));
00710
00711 if (n.name () == "name" && n.namespace_ ().empty ())
00712 {
00713 this->name_.set (name_traits::create (i, f, this));
00714 continue;
00715 }
00716 }
00717
00718 if (!name_.present ())
00719 {
00720 throw ::xsd::cxx::tree::expected_attribute< char > (
00721 "name",
00722 "");
00723 }
00724 }
00725
00726 Form_t* Form_t::
00727 _clone (::xml_schema::flags f,
00728 ::xml_schema::container* c) const
00729 {
00730 return new class Form_t (*this, f, c);
00731 }
00732
00733 Form_t& Form_t::
00734 operator= (const Form_t& x)
00735 {
00736 if (this != &x)
00737 {
00738 static_cast< ::xml_schema::type& > (*this) = x;
00739 this->field_ = x.field_;
00740 this->name_ = x.name_;
00741 }
00742
00743 return *this;
00744 }
00745
00746 Form_t::
00747 ~Form_t ()
00748 {
00749 }
00750
00751
00752
00753
00754 ECLEntry_t::
00755 ECLEntry_t ()
00756 : ::xml_schema::type (),
00757 tag_ (this),
00758 attachment_ (this),
00759 form_ (this),
00760 author_ (this),
00761 category_ (this)
00762 {
00763 }
00764
00765 ECLEntry_t::
00766 ECLEntry_t (const author_type& author,
00767 const category_type& category)
00768 : ::xml_schema::type (),
00769 tag_ (this),
00770 attachment_ (this),
00771 form_ (this),
00772 author_ (author, this),
00773 category_ (category, this)
00774 {
00775 }
00776
00777 ECLEntry_t::
00778 ECLEntry_t (const ECLEntry_t& x,
00779 ::xml_schema::flags f,
00780 ::xml_schema::container* c)
00781 : ::xml_schema::type (x, f, c),
00782 tag_ (x.tag_, f, this),
00783 attachment_ (x.attachment_, f, this),
00784 form_ (x.form_, f, this),
00785 author_ (x.author_, f, this),
00786 category_ (x.category_, f, this)
00787 {
00788 }
00789
00790 ECLEntry_t::
00791 ECLEntry_t (const ::xercesc::DOMElement& e,
00792 ::xml_schema::flags f,
00793 ::xml_schema::container* c)
00794 : ::xml_schema::type (e, f | ::xml_schema::flags::base, c),
00795 tag_ (this),
00796 attachment_ (this),
00797 form_ (this),
00798 author_ (this),
00799 category_ (this)
00800 {
00801 if ((f & ::xml_schema::flags::base) == 0)
00802 {
00803 ::xsd::cxx::xml::dom::parser< char > p (e, true, false, true);
00804 this->parse (p, f);
00805 }
00806 }
00807
00808 void ECLEntry_t::
00809 parse (::xsd::cxx::xml::dom::parser< char >& p,
00810 ::xml_schema::flags f)
00811 {
00812 for (; p.more_content (); p.next_content (false))
00813 {
00814 const ::xercesc::DOMElement& i (p.cur_element ());
00815 const ::xsd::cxx::xml::qualified_name< char > n (
00816 ::xsd::cxx::xml::dom::name< char > (i));
00817
00818
00819
00820 if (n.name () == "tag" && n.namespace_ ().empty ())
00821 {
00822 ::std::unique_ptr< tag_type > r (
00823 tag_traits::create (i, f, this));
00824
00825 this->tag_.push_back (::std::move (r));
00826 continue;
00827 }
00828
00829
00830
00831 if (n.name () == "attachment" && n.namespace_ ().empty ())
00832 {
00833 ::std::unique_ptr< attachment_type > r (
00834 attachment_traits::create (i, f, this));
00835
00836 this->attachment_.push_back (::std::move (r));
00837 continue;
00838 }
00839
00840
00841
00842 if (n.name () == "form" && n.namespace_ ().empty ())
00843 {
00844 ::std::unique_ptr< form_type > r (
00845 form_traits::create (i, f, this));
00846
00847 if (!this->form_)
00848 {
00849 this->form_.set (::std::move (r));
00850 continue;
00851 }
00852 }
00853
00854 break;
00855 }
00856
00857 while (p.more_attributes ())
00858 {
00859 const ::xercesc::DOMAttr& i (p.next_attribute ());
00860 const ::xsd::cxx::xml::qualified_name< char > n (
00861 ::xsd::cxx::xml::dom::name< char > (i));
00862
00863 if (n.name () == "author" && n.namespace_ ().empty ())
00864 {
00865 this->author_.set (author_traits::create (i, f, this));
00866 continue;
00867 }
00868
00869 if (n.name () == "category" && n.namespace_ ().empty ())
00870 {
00871 this->category_.set (category_traits::create (i, f, this));
00872 continue;
00873 }
00874 }
00875
00876 if (!author_.present ())
00877 {
00878 throw ::xsd::cxx::tree::expected_attribute< char > (
00879 "author",
00880 "");
00881 }
00882
00883 if (!category_.present ())
00884 {
00885 throw ::xsd::cxx::tree::expected_attribute< char > (
00886 "category",
00887 "");
00888 }
00889 }
00890
00891 ECLEntry_t* ECLEntry_t::
00892 _clone (::xml_schema::flags f,
00893 ::xml_schema::container* c) const
00894 {
00895 return new class ECLEntry_t (*this, f, c);
00896 }
00897
00898 ECLEntry_t& ECLEntry_t::
00899 operator= (const ECLEntry_t& x)
00900 {
00901 if (this != &x)
00902 {
00903 static_cast< ::xml_schema::type& > (*this) = x;
00904 this->tag_ = x.tag_;
00905 this->attachment_ = x.attachment_;
00906 this->form_ = x.form_;
00907 this->author_ = x.author_;
00908 this->category_ = x.category_;
00909 }
00910
00911 return *this;
00912 }
00913
00914 ECLEntry_t::
00915 ~ECLEntry_t ()
00916 {
00917 }
00918
00919 #include <ostream>
00920
00921 ::std::ostream&
00922 operator<< (::std::ostream& o, const Tag_t& i)
00923 {
00924 o << ::std::endl << "name: " << i.name ();
00925 return o;
00926 }
00927
00928 ::std::ostream&
00929 operator<< (::std::ostream& o, const Attachment_t& i)
00930 {
00931 o << static_cast< const ::xml_schema::base64_binary& > (i);
00932
00933 o << ::std::endl << "type: " << i.type ();
00934 o << ::std::endl << "filename: " << i.filename ();
00935 return o;
00936 }
00937
00938 ::std::ostream&
00939 operator<< (::std::ostream& o, const Field_t& i)
00940 {
00941 o << static_cast< const ::xml_schema::string& > (i);
00942
00943 o << ::std::endl << "name: " << i.name ();
00944 return o;
00945 }
00946
00947 ::std::ostream&
00948 operator<< (::std::ostream& o, const Form_t& i)
00949 {
00950 for (Form_t::field_const_iterator
00951 b (i.field ().begin ()), e (i.field ().end ());
00952 b != e; ++b)
00953 {
00954 o << ::std::endl << "field: " << *b;
00955 }
00956
00957 o << ::std::endl << "name: " << i.name ();
00958 return o;
00959 }
00960
00961 ::std::ostream&
00962 operator<< (::std::ostream& o, const ECLEntry_t& i)
00963 {
00964 for (ECLEntry_t::tag_const_iterator
00965 b (i.tag ().begin ()), e (i.tag ().end ());
00966 b != e; ++b)
00967 {
00968 o << ::std::endl << "tag: " << *b;
00969 }
00970
00971 for (ECLEntry_t::attachment_const_iterator
00972 b (i.attachment ().begin ()), e (i.attachment ().end ());
00973 b != e; ++b)
00974 {
00975 o << ::std::endl << "attachment: " << *b;
00976 }
00977
00978 if (i.form ())
00979 {
00980 o << ::std::endl << "form: " << *i.form ();
00981 }
00982
00983 o << ::std::endl << "author: " << i.author ();
00984 o << ::std::endl << "category: " << i.category ();
00985 return o;
00986 }
00987
00988 #include <istream>
00989 #include <xsd/cxx/xml/sax/std-input-source.hxx>
00990 #include <xsd/cxx/tree/error-handler.hxx>
00991
00992 ::std::unique_ptr< ::ECLEntry_t >
00993 entry (const ::std::string& u,
00994 ::xml_schema::flags f,
00995 const ::xml_schema::properties& p)
00996 {
00997 ::xsd::cxx::xml::auto_initializer i (
00998 (f & ::xml_schema::flags::dont_initialize) == 0,
00999 (f & ::xml_schema::flags::keep_dom) == 0);
01000
01001 ::xsd::cxx::tree::error_handler< char > h;
01002
01003 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
01004 ::xsd::cxx::xml::dom::parse< char > (
01005 u, h, p, f));
01006
01007 h.throw_if_failed< ::xsd::cxx::tree::parsing< char > > ();
01008
01009 return ::std::unique_ptr< ::ECLEntry_t > (
01010 ::entry (
01011 std::move (d), f | ::xml_schema::flags::own_dom, p));
01012 }
01013
01014 ::std::unique_ptr< ::ECLEntry_t >
01015 entry (const ::std::string& u,
01016 ::xml_schema::error_handler& h,
01017 ::xml_schema::flags f,
01018 const ::xml_schema::properties& p)
01019 {
01020 ::xsd::cxx::xml::auto_initializer i (
01021 (f & ::xml_schema::flags::dont_initialize) == 0,
01022 (f & ::xml_schema::flags::keep_dom) == 0);
01023
01024 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
01025 ::xsd::cxx::xml::dom::parse< char > (
01026 u, h, p, f));
01027
01028 if (!d.get ())
01029 throw ::xsd::cxx::tree::parsing< char > ();
01030
01031 return ::std::unique_ptr< ::ECLEntry_t > (
01032 ::entry (
01033 std::move (d), f | ::xml_schema::flags::own_dom, p));
01034 }
01035
01036 ::std::unique_ptr< ::ECLEntry_t >
01037 entry (const ::std::string& u,
01038 ::xercesc::DOMErrorHandler& h,
01039 ::xml_schema::flags f,
01040 const ::xml_schema::properties& p)
01041 {
01042 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
01043 ::xsd::cxx::xml::dom::parse< char > (
01044 u, h, p, f));
01045
01046 if (!d.get ())
01047 throw ::xsd::cxx::tree::parsing< char > ();
01048
01049 return ::std::unique_ptr< ::ECLEntry_t > (
01050 ::entry (
01051 std::move (d), f | ::xml_schema::flags::own_dom, p));
01052 }
01053
01054 ::std::unique_ptr< ::ECLEntry_t >
01055 entry (::std::istream& is,
01056 ::xml_schema::flags f,
01057 const ::xml_schema::properties& p)
01058 {
01059 ::xsd::cxx::xml::auto_initializer i (
01060 (f & ::xml_schema::flags::dont_initialize) == 0,
01061 (f & ::xml_schema::flags::keep_dom) == 0);
01062
01063 ::xsd::cxx::xml::sax::std_input_source isrc (is);
01064 return ::entry (isrc, f, p);
01065 }
01066
01067 ::std::unique_ptr< ::ECLEntry_t >
01068 entry (::std::istream& is,
01069 ::xml_schema::error_handler& h,
01070 ::xml_schema::flags f,
01071 const ::xml_schema::properties& p)
01072 {
01073 ::xsd::cxx::xml::auto_initializer i (
01074 (f & ::xml_schema::flags::dont_initialize) == 0,
01075 (f & ::xml_schema::flags::keep_dom) == 0);
01076
01077 ::xsd::cxx::xml::sax::std_input_source isrc (is);
01078 return ::entry (isrc, h, f, p);
01079 }
01080
01081 ::std::unique_ptr< ::ECLEntry_t >
01082 entry (::std::istream& is,
01083 ::xercesc::DOMErrorHandler& h,
01084 ::xml_schema::flags f,
01085 const ::xml_schema::properties& p)
01086 {
01087 ::xsd::cxx::xml::sax::std_input_source isrc (is);
01088 return ::entry (isrc, h, f, p);
01089 }
01090
01091 ::std::unique_ptr< ::ECLEntry_t >
01092 entry (::std::istream& is,
01093 const ::std::string& sid,
01094 ::xml_schema::flags f,
01095 const ::xml_schema::properties& p)
01096 {
01097 ::xsd::cxx::xml::auto_initializer i (
01098 (f & ::xml_schema::flags::dont_initialize) == 0,
01099 (f & ::xml_schema::flags::keep_dom) == 0);
01100
01101 ::xsd::cxx::xml::sax::std_input_source isrc (is, sid);
01102 return ::entry (isrc, f, p);
01103 }
01104
01105 ::std::unique_ptr< ::ECLEntry_t >
01106 entry (::std::istream& is,
01107 const ::std::string& sid,
01108 ::xml_schema::error_handler& h,
01109 ::xml_schema::flags f,
01110 const ::xml_schema::properties& p)
01111 {
01112 ::xsd::cxx::xml::auto_initializer i (
01113 (f & ::xml_schema::flags::dont_initialize) == 0,
01114 (f & ::xml_schema::flags::keep_dom) == 0);
01115
01116 ::xsd::cxx::xml::sax::std_input_source isrc (is, sid);
01117 return ::entry (isrc, h, f, p);
01118 }
01119
01120 ::std::unique_ptr< ::ECLEntry_t >
01121 entry (::std::istream& is,
01122 const ::std::string& sid,
01123 ::xercesc::DOMErrorHandler& h,
01124 ::xml_schema::flags f,
01125 const ::xml_schema::properties& p)
01126 {
01127 ::xsd::cxx::xml::sax::std_input_source isrc (is, sid);
01128 return ::entry (isrc, h, f, p);
01129 }
01130
01131 ::std::unique_ptr< ::ECLEntry_t >
01132 entry (::xercesc::InputSource& i,
01133 ::xml_schema::flags f,
01134 const ::xml_schema::properties& p)
01135 {
01136 ::xsd::cxx::tree::error_handler< char > h;
01137
01138 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
01139 ::xsd::cxx::xml::dom::parse< char > (
01140 i, h, p, f));
01141
01142 h.throw_if_failed< ::xsd::cxx::tree::parsing< char > > ();
01143
01144 return ::std::unique_ptr< ::ECLEntry_t > (
01145 ::entry (
01146 std::move (d), f | ::xml_schema::flags::own_dom, p));
01147 }
01148
01149 ::std::unique_ptr< ::ECLEntry_t >
01150 entry (::xercesc::InputSource& i,
01151 ::xml_schema::error_handler& h,
01152 ::xml_schema::flags f,
01153 const ::xml_schema::properties& p)
01154 {
01155 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
01156 ::xsd::cxx::xml::dom::parse< char > (
01157 i, h, p, f));
01158
01159 if (!d.get ())
01160 throw ::xsd::cxx::tree::parsing< char > ();
01161
01162 return ::std::unique_ptr< ::ECLEntry_t > (
01163 ::entry (
01164 std::move (d), f | ::xml_schema::flags::own_dom, p));
01165 }
01166
01167 ::std::unique_ptr< ::ECLEntry_t >
01168 entry (::xercesc::InputSource& i,
01169 ::xercesc::DOMErrorHandler& h,
01170 ::xml_schema::flags f,
01171 const ::xml_schema::properties& p)
01172 {
01173 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
01174 ::xsd::cxx::xml::dom::parse< char > (
01175 i, h, p, f));
01176
01177 if (!d.get ())
01178 throw ::xsd::cxx::tree::parsing< char > ();
01179
01180 return ::std::unique_ptr< ::ECLEntry_t > (
01181 ::entry (
01182 std::move (d), f | ::xml_schema::flags::own_dom, p));
01183 }
01184
01185 ::std::unique_ptr< ::ECLEntry_t >
01186 entry (const ::xercesc::DOMDocument& doc,
01187 ::xml_schema::flags f,
01188 const ::xml_schema::properties& p)
01189 {
01190 if (f & ::xml_schema::flags::keep_dom)
01191 {
01192 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
01193 static_cast< ::xercesc::DOMDocument* > (doc.cloneNode (true)));
01194
01195 return ::std::unique_ptr< ::ECLEntry_t > (
01196 ::entry (
01197 std::move (d), f | ::xml_schema::flags::own_dom, p));
01198 }
01199
01200 const ::xercesc::DOMElement& e (*doc.getDocumentElement ());
01201 const ::xsd::cxx::xml::qualified_name< char > n (
01202 ::xsd::cxx::xml::dom::name< char > (e));
01203
01204 if (n.name () == "entry" &&
01205 n.namespace_ () == "")
01206 {
01207 ::std::unique_ptr< ::ECLEntry_t > r (
01208 ::xsd::cxx::tree::traits< ::ECLEntry_t, char >::create (
01209 e, f, 0));
01210 return r;
01211 }
01212
01213 throw ::xsd::cxx::tree::unexpected_element < char > (
01214 n.name (),
01215 n.namespace_ (),
01216 "entry",
01217 "");
01218 }
01219
01220 ::std::unique_ptr< ::ECLEntry_t >
01221 entry (::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d,
01222 ::xml_schema::flags f,
01223 const ::xml_schema::properties&)
01224 {
01225 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > c (
01226 ((f & ::xml_schema::flags::keep_dom) &&
01227 !(f & ::xml_schema::flags::own_dom))
01228 ? static_cast< ::xercesc::DOMDocument* > (d->cloneNode (true))
01229 : 0);
01230
01231 ::xercesc::DOMDocument& doc (c.get () ? *c : *d);
01232 const ::xercesc::DOMElement& e (*doc.getDocumentElement ());
01233
01234 const ::xsd::cxx::xml::qualified_name< char > n (
01235 ::xsd::cxx::xml::dom::name< char > (e));
01236
01237 if (f & ::xml_schema::flags::keep_dom)
01238 doc.setUserData (::xml_schema::dom::tree_node_key,
01239 (c.get () ? &c : &d),
01240 0);
01241
01242 if (n.name () == "entry" &&
01243 n.namespace_ () == "")
01244 {
01245 ::std::unique_ptr< ::ECLEntry_t > r (
01246 ::xsd::cxx::tree::traits< ::ECLEntry_t, char >::create (
01247 e, f, 0));
01248 return r;
01249 }
01250
01251 throw ::xsd::cxx::tree::unexpected_element < char > (
01252 n.name (),
01253 n.namespace_ (),
01254 "entry",
01255 "");
01256 }
01257
01258 #include <ostream>
01259 #include <xsd/cxx/tree/error-handler.hxx>
01260 #include <xsd/cxx/xml/dom/serialization-source.hxx>
01261
01262 void
01263 entry (::std::ostream& o,
01264 const ::ECLEntry_t& s,
01265 const ::xml_schema::namespace_infomap& m,
01266 const ::std::string& e,
01267 ::xml_schema::flags f)
01268 {
01269 ::xsd::cxx::xml::auto_initializer i (
01270 (f & ::xml_schema::flags::dont_initialize) == 0);
01271
01272 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
01273 ::entry (s, m, f));
01274
01275 ::xsd::cxx::tree::error_handler< char > h;
01276
01277 ::xsd::cxx::xml::dom::ostream_format_target t (o);
01278 if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
01279 {
01280 h.throw_if_failed< ::xsd::cxx::tree::serialization< char > > ();
01281 }
01282 }
01283
01284 void
01285 entry (::std::ostream& o,
01286 const ::ECLEntry_t& s,
01287 ::xml_schema::error_handler& h,
01288 const ::xml_schema::namespace_infomap& m,
01289 const ::std::string& e,
01290 ::xml_schema::flags f)
01291 {
01292 ::xsd::cxx::xml::auto_initializer i (
01293 (f & ::xml_schema::flags::dont_initialize) == 0);
01294
01295 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
01296 ::entry (s, m, f));
01297 ::xsd::cxx::xml::dom::ostream_format_target t (o);
01298 if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
01299 {
01300 throw ::xsd::cxx::tree::serialization< char > ();
01301 }
01302 }
01303
01304 void
01305 entry (::std::ostream& o,
01306 const ::ECLEntry_t& s,
01307 ::xercesc::DOMErrorHandler& h,
01308 const ::xml_schema::namespace_infomap& m,
01309 const ::std::string& e,
01310 ::xml_schema::flags f)
01311 {
01312 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
01313 ::entry (s, m, f));
01314 ::xsd::cxx::xml::dom::ostream_format_target t (o);
01315 if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
01316 {
01317 throw ::xsd::cxx::tree::serialization< char > ();
01318 }
01319 }
01320
01321 void
01322 entry (::xercesc::XMLFormatTarget& t,
01323 const ::ECLEntry_t& s,
01324 const ::xml_schema::namespace_infomap& m,
01325 const ::std::string& e,
01326 ::xml_schema::flags f)
01327 {
01328 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
01329 ::entry (s, m, f));
01330
01331 ::xsd::cxx::tree::error_handler< char > h;
01332
01333 if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
01334 {
01335 h.throw_if_failed< ::xsd::cxx::tree::serialization< char > > ();
01336 }
01337 }
01338
01339 void
01340 entry (::xercesc::XMLFormatTarget& t,
01341 const ::ECLEntry_t& s,
01342 ::xml_schema::error_handler& h,
01343 const ::xml_schema::namespace_infomap& m,
01344 const ::std::string& e,
01345 ::xml_schema::flags f)
01346 {
01347 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
01348 ::entry (s, m, f));
01349 if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
01350 {
01351 throw ::xsd::cxx::tree::serialization< char > ();
01352 }
01353 }
01354
01355 void
01356 entry (::xercesc::XMLFormatTarget& t,
01357 const ::ECLEntry_t& s,
01358 ::xercesc::DOMErrorHandler& h,
01359 const ::xml_schema::namespace_infomap& m,
01360 const ::std::string& e,
01361 ::xml_schema::flags f)
01362 {
01363 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
01364 ::entry (s, m, f));
01365 if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
01366 {
01367 throw ::xsd::cxx::tree::serialization< char > ();
01368 }
01369 }
01370
01371 void
01372 entry (::xercesc::DOMDocument& d,
01373 const ::ECLEntry_t& s,
01374 ::xml_schema::flags)
01375 {
01376 ::xercesc::DOMElement& e (*d.getDocumentElement ());
01377 const ::xsd::cxx::xml::qualified_name< char > n (
01378 ::xsd::cxx::xml::dom::name< char > (e));
01379
01380 if (n.name () == "entry" &&
01381 n.namespace_ () == "")
01382 {
01383 e << s;
01384 }
01385 else
01386 {
01387 throw ::xsd::cxx::tree::unexpected_element < char > (
01388 n.name (),
01389 n.namespace_ (),
01390 "entry",
01391 "");
01392 }
01393 }
01394
01395 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument >
01396 entry (const ::ECLEntry_t& s,
01397 const ::xml_schema::namespace_infomap& m,
01398 ::xml_schema::flags f)
01399 {
01400 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
01401 ::xsd::cxx::xml::dom::serialize< char > (
01402 "entry",
01403 "",
01404 m, f));
01405
01406 ::entry (*d, s, f);
01407 return d;
01408 }
01409
01410 void
01411 operator<< (::xercesc::DOMElement& e, const Tag_t& i)
01412 {
01413 e << static_cast< const ::xml_schema::type& > (i);
01414
01415
01416
01417 {
01418 ::xercesc::DOMAttr& a (
01419 ::xsd::cxx::xml::dom::create_attribute (
01420 "name",
01421 e));
01422
01423 a << i.name ();
01424 }
01425 }
01426
01427 void
01428 operator<< (::xercesc::DOMElement& e, const Attachment_t& i)
01429 {
01430 e << static_cast< const ::xml_schema::base64_binary& > (i);
01431
01432
01433
01434 {
01435 ::xercesc::DOMAttr& a (
01436 ::xsd::cxx::xml::dom::create_attribute (
01437 "type",
01438 e));
01439
01440 a << i.type ();
01441 }
01442
01443
01444
01445 {
01446 ::xercesc::DOMAttr& a (
01447 ::xsd::cxx::xml::dom::create_attribute (
01448 "filename",
01449 e));
01450
01451 a << i.filename ();
01452 }
01453 }
01454
01455 void
01456 operator<< (::xercesc::DOMElement& e, const Field_t& i)
01457 {
01458 e << static_cast< const ::xml_schema::string& > (i);
01459
01460
01461
01462 {
01463 ::xercesc::DOMAttr& a (
01464 ::xsd::cxx::xml::dom::create_attribute (
01465 "name",
01466 e));
01467
01468 a << i.name ();
01469 }
01470 }
01471
01472 void
01473 operator<< (::xercesc::DOMElement& e, const Form_t& i)
01474 {
01475 e << static_cast< const ::xml_schema::type& > (i);
01476
01477
01478
01479 for (Form_t::field_const_iterator
01480 b (i.field ().begin ()), n (i.field ().end ());
01481 b != n; ++b)
01482 {
01483 ::xercesc::DOMElement& s (
01484 ::xsd::cxx::xml::dom::create_element (
01485 "field",
01486 e));
01487
01488 s << *b;
01489 }
01490
01491
01492
01493 {
01494 ::xercesc::DOMAttr& a (
01495 ::xsd::cxx::xml::dom::create_attribute (
01496 "name",
01497 e));
01498
01499 a << i.name ();
01500 }
01501 }
01502
01503 void
01504 operator<< (::xercesc::DOMElement& e, const ECLEntry_t& i)
01505 {
01506 e << static_cast< const ::xml_schema::type& > (i);
01507
01508
01509
01510 for (ECLEntry_t::tag_const_iterator
01511 b (i.tag ().begin ()), n (i.tag ().end ());
01512 b != n; ++b)
01513 {
01514 ::xercesc::DOMElement& s (
01515 ::xsd::cxx::xml::dom::create_element (
01516 "tag",
01517 e));
01518
01519 s << *b;
01520 }
01521
01522
01523
01524 for (ECLEntry_t::attachment_const_iterator
01525 b (i.attachment ().begin ()), n (i.attachment ().end ());
01526 b != n; ++b)
01527 {
01528 ::xercesc::DOMElement& s (
01529 ::xsd::cxx::xml::dom::create_element (
01530 "attachment",
01531 e));
01532
01533 s << *b;
01534 }
01535
01536
01537
01538 if (i.form ())
01539 {
01540 ::xercesc::DOMElement& s (
01541 ::xsd::cxx::xml::dom::create_element (
01542 "form",
01543 e));
01544
01545 s << *i.form ();
01546 }
01547
01548
01549
01550 {
01551 ::xercesc::DOMAttr& a (
01552 ::xsd::cxx::xml::dom::create_attribute (
01553 "author",
01554 e));
01555
01556 a << i.author ();
01557 }
01558
01559
01560
01561 {
01562 ::xercesc::DOMAttr& a (
01563 ::xsd::cxx::xml::dom::create_attribute (
01564 "category",
01565 e));
01566
01567 a << i.category ();
01568 }
01569 }
01570
01571 #include <xsd/cxx/post.hxx>
01572
01573
01574
01575
01576
01577