39 #include <xsd/cxx/pre.hxx>
41 #include <otsdaq-utilities/ECLWriter/ECL.hxx>
46 const Tag_t::name_type& Tag_t::name()
const {
return this->name_.get(); }
48 Tag_t::name_type& Tag_t::name() {
return this->name_.get(); }
50 void Tag_t::name(
const name_type& x) { this->name_.set(x); }
52 void Tag_t::name(::std::unique_ptr<name_type> x) { this->name_.set(std::move(x)); }
57 const Attachment_t::type_type& Attachment_t::type()
const {
return this->type_.get(); }
59 Attachment_t::type_type& Attachment_t::type() {
return this->type_.get(); }
61 void Attachment_t::type(
const type_type& x) { this->type_.set(x); }
63 void Attachment_t::type(::std::unique_ptr<type_type> x) { this->type_.set(std::move(x)); }
65 const Attachment_t::filename_type& Attachment_t::filename()
const
67 return this->filename_.get();
70 Attachment_t::filename_type& Attachment_t::filename() {
return this->filename_.get(); }
72 void Attachment_t::filename(
const filename_type& x) { this->filename_.set(x); }
74 void Attachment_t::filename(::std::unique_ptr<filename_type> x)
76 this->filename_.set(std::move(x));
82 const Field_t::name_type& Field_t::name()
const {
return this->name_.get(); }
84 Field_t::name_type& Field_t::name() {
return this->name_.get(); }
86 void Field_t::name(
const name_type& x) { this->name_.set(x); }
88 void Field_t::name(::std::unique_ptr<name_type> x) { this->name_.set(std::move(x)); }
93 const Form_t::field_sequence& Form_t::field()
const {
return this->field_; }
95 Form_t::field_sequence& Form_t::field() {
return this->field_; }
97 void Form_t::field(
const field_sequence& s) { this->field_ = s; }
99 const Form_t::name_type& Form_t::name()
const {
return this->name_.get(); }
101 Form_t::name_type& Form_t::name() {
return this->name_.get(); }
103 void Form_t::name(
const name_type& x) { this->name_.set(x); }
105 void Form_t::name(::std::unique_ptr<name_type> x) { this->name_.set(std::move(x)); }
110 const ECLEntry_t::tag_sequence& ECLEntry_t::tag()
const {
return this->tag_; }
112 ECLEntry_t::tag_sequence& ECLEntry_t::tag() {
return this->tag_; }
114 void ECLEntry_t::tag(
const tag_sequence& s) { this->tag_ = s; }
116 const ECLEntry_t::attachment_sequence& ECLEntry_t::attachment()
const
118 return this->attachment_;
121 ECLEntry_t::attachment_sequence& ECLEntry_t::attachment() {
return this->attachment_; }
123 void ECLEntry_t::attachment(
const attachment_sequence& s) { this->attachment_ = s; }
125 const ECLEntry_t::form_optional& ECLEntry_t::form()
const {
return this->form_; }
127 ECLEntry_t::form_optional& ECLEntry_t::form() {
return this->form_; }
129 void ECLEntry_t::form(
const form_type& x) { this->form_.set(x); }
131 void ECLEntry_t::form(
const form_optional& x) { this->form_ = x; }
133 void ECLEntry_t::form(::std::unique_ptr<form_type> x) { this->form_.set(std::move(x)); }
135 const ECLEntry_t::author_type& ECLEntry_t::author()
const {
return this->author_.get(); }
137 ECLEntry_t::author_type& ECLEntry_t::author() {
return this->author_.get(); }
139 void ECLEntry_t::author(
const author_type& x) { this->author_.set(x); }
141 void ECLEntry_t::author(::std::unique_ptr<author_type> x)
143 this->author_.set(std::move(x));
146 const ECLEntry_t::category_type& ECLEntry_t::category()
const
148 return this->category_.get();
151 ECLEntry_t::category_type& ECLEntry_t::category() {
return this->category_.get(); }
153 void ECLEntry_t::category(
const category_type& x) { this->category_.set(x); }
155 void ECLEntry_t::category(::std::unique_ptr<category_type> x)
157 this->category_.set(std::move(x));
160 const ECLEntry_t::subject_optional& ECLEntry_t::subject()
const {
return this->subject_; }
162 ECLEntry_t::subject_optional& ECLEntry_t::subject() {
return this->subject_; }
164 void ECLEntry_t::subject(
const subject_type& x) { this->subject_.set(x); }
166 void ECLEntry_t::subject(
const subject_optional& x) { this->subject_ = x; }
168 void ECLEntry_t::subject(::std::unique_ptr<subject_type> x)
170 this->subject_.set(std::move(x));
173 #include <xsd/cxx/xml/dom/parsing-source.hxx>
178 Tag_t::Tag_t() : ::xml_schema::type(), name_(this) {}
180 Tag_t::Tag_t(
const name_type& name) : ::xml_schema::type(), name_(name, this) {}
182 Tag_t::Tag_t(
const Tag_t& x, ::xml_schema::flags f, ::xml_schema::container* c)
183 : ::xml_schema::type(x, f, c), name_(x.name_, f, this)
187 Tag_t::Tag_t(const ::xercesc::DOMElement& e,
188 ::xml_schema::flags f,
189 ::xml_schema::container* c)
190 : ::xml_schema::type(e, f | ::xml_schema::flags::base, c), name_(this)
192 if((f & ::xml_schema::flags::base) == 0)
194 ::xsd::cxx::xml::dom::parser<char> p(e,
false,
false,
true);
199 void Tag_t::parse(::xsd::cxx::xml::dom::parser<char>& p, ::xml_schema::flags f)
201 while(p.more_attributes())
203 const ::xercesc::DOMAttr& i(p.next_attribute());
204 const ::xsd::cxx::xml::qualified_name<char> n(
205 ::xsd::cxx::xml::dom::name<char>(i));
207 if(n.name() ==
"name" && n.namespace_().empty())
209 this->name_.set(name_traits::create(i, f,
this));
216 throw ::xsd::cxx::tree::expected_attribute<char>(
"name",
"");
220 Tag_t* Tag_t::_clone(::xml_schema::flags f, ::xml_schema::container* c)
const
222 return new class Tag_t(*
this, f, c);
229 static_cast< ::xml_schema::type&
>(*this) = x;
230 this->name_ = x.name_;
241 Attachment_t::Attachment_t() : ::xml_schema::base64_binary(), type_(this), filename_(this)
245 Attachment_t::Attachment_t(
const type_type& type,
const filename_type& filename)
246 : ::xml_schema::base64_binary(), type_(type, this), filename_(filename, this)
250 Attachment_t::Attachment_t(const ::xml_schema::base64_binary& _xsd_base64_binary_base,
251 const type_type& type,
252 const filename_type& filename)
253 : ::xml_schema::base64_binary(_xsd_base64_binary_base)
255 , filename_(filename, this)
260 ::xml_schema::flags f,
261 ::xml_schema::container* c)
262 : ::xml_schema::base64_binary(x, f, c)
263 , type_(x.type_, f, this)
264 , filename_(x.filename_, f, this)
268 Attachment_t::Attachment_t(const ::xercesc::DOMElement& e,
269 ::xml_schema::flags f,
270 ::xml_schema::container* c)
271 : ::xml_schema::base64_binary(e, f | ::xml_schema::flags::base, c)
275 if((f & ::xml_schema::flags::base) == 0)
277 ::xsd::cxx::xml::dom::parser<char> p(e,
false,
false,
true);
282 void Attachment_t::parse(::xsd::cxx::xml::dom::parser<char>& p, ::xml_schema::flags f)
284 while(p.more_attributes())
286 const ::xercesc::DOMAttr& i(p.next_attribute());
287 const ::xsd::cxx::xml::qualified_name<char> n(
288 ::xsd::cxx::xml::dom::name<char>(i));
290 if(n.name() ==
"type" && n.namespace_().empty())
292 this->type_.set(type_traits::create(i, f,
this));
296 if(n.name() ==
"filename" && n.namespace_().empty())
298 this->filename_.set(filename_traits::create(i, f,
this));
305 throw ::xsd::cxx::tree::expected_attribute<char>(
"type",
"");
308 if(!filename_.present())
310 throw ::xsd::cxx::tree::expected_attribute<char>(
"filename",
"");
314 Attachment_t* Attachment_t::_clone(::xml_schema::flags f,
315 ::xml_schema::container* c)
const
324 static_cast< ::xml_schema::base64_binary&
>(*this) = x;
325 this->type_ = x.type_;
326 this->filename_ = x.filename_;
332 Attachment_t::~Attachment_t() {}
337 Field_t::Field_t() : ::xml_schema::string(), name_(this) {}
339 Field_t::Field_t(
const name_type& name) : ::xml_schema::string(), name_(name, this) {}
341 Field_t::Field_t(
const char* _xsd_string_base,
const name_type& name)
342 : ::xml_schema::string(_xsd_string_base), name_(name, this)
346 Field_t::Field_t(const ::std::string& _xsd_string_base,
const name_type& name)
347 : ::xml_schema::string(_xsd_string_base), name_(name, this)
351 Field_t::Field_t(const ::xml_schema::string& _xsd_string_base,
const name_type& name)
352 : ::xml_schema::string(_xsd_string_base), name_(name, this)
356 Field_t::Field_t(
const Field_t& x, ::xml_schema::flags f, ::xml_schema::container* c)
357 : ::xml_schema::string(x, f, c), name_(x.name_, f, this)
361 Field_t::Field_t(const ::xercesc::DOMElement& e,
362 ::xml_schema::flags f,
363 ::xml_schema::container* c)
364 : ::xml_schema::string(e, f | ::xml_schema::flags::base, c), name_(this)
366 if((f & ::xml_schema::flags::base) == 0)
368 ::xsd::cxx::xml::dom::parser<char> p(e,
false,
false,
true);
373 void Field_t::parse(::xsd::cxx::xml::dom::parser<char>& p, ::xml_schema::flags f)
375 while(p.more_attributes())
377 const ::xercesc::DOMAttr& i(p.next_attribute());
378 const ::xsd::cxx::xml::qualified_name<char> n(
379 ::xsd::cxx::xml::dom::name<char>(i));
381 if(n.name() ==
"name" && n.namespace_().empty())
383 this->name_.set(name_traits::create(i, f,
this));
390 throw ::xsd::cxx::tree::expected_attribute<char>(
"name",
"");
394 Field_t* Field_t::_clone(::xml_schema::flags f, ::xml_schema::container* c)
const
396 return new class Field_t(*
this, f, c);
403 static_cast< ::xml_schema::string&
>(*this) = x;
404 this->name_ = x.name_;
410 Field_t::~Field_t() {}
415 Form_t::Form_t() : ::xml_schema::type(), field_(this), name_(this) {}
417 Form_t::Form_t(
const name_type& name)
418 : ::xml_schema::type(), field_(this), name_(name, this)
422 Form_t::Form_t(
const Form_t& x, ::xml_schema::flags f, ::xml_schema::container* c)
423 : ::xml_schema::type(x, f, c), field_(x.field_, f, this), name_(x.name_, f, this)
427 Form_t::Form_t(const ::xercesc::DOMElement& e,
428 ::xml_schema::flags f,
429 ::xml_schema::container* c)
430 : ::xml_schema::type(e, f | ::xml_schema::flags::base, c), field_(this), name_(this)
432 if((f & ::xml_schema::flags::base) == 0)
434 ::xsd::cxx::xml::dom::parser<char> p(e,
true,
false,
true);
439 void Form_t::parse(::xsd::cxx::xml::dom::parser<char>& p, ::xml_schema::flags f)
441 for(; p.more_content(); p.next_content(
false))
443 const ::xercesc::DOMElement& i(p.cur_element());
444 const ::xsd::cxx::xml::qualified_name<char> n(
445 ::xsd::cxx::xml::dom::name<char>(i));
449 if(n.name() ==
"field" && n.namespace_().empty())
451 ::std::unique_ptr<field_type> r(field_traits::create(i, f,
this));
453 this->field_.push_back(::std::move(r));
460 while(p.more_attributes())
462 const ::xercesc::DOMAttr& i(p.next_attribute());
463 const ::xsd::cxx::xml::qualified_name<char> n(
464 ::xsd::cxx::xml::dom::name<char>(i));
466 if(n.name() ==
"name" && n.namespace_().empty())
468 this->name_.set(name_traits::create(i, f,
this));
475 throw ::xsd::cxx::tree::expected_attribute<char>(
"name",
"");
479 Form_t* Form_t::_clone(::xml_schema::flags f, ::xml_schema::container* c)
const
481 return new class Form_t(*
this, f, c);
488 static_cast< ::xml_schema::type&
>(*this) = x;
489 this->field_ = x.field_;
490 this->name_ = x.name_;
501 ECLEntry_t::ECLEntry_t()
502 : ::xml_schema::type()
512 ECLEntry_t::ECLEntry_t(
const author_type& author,
const category_type& category)
513 : ::xml_schema::type()
517 , author_(author, this)
518 , category_(category, this)
524 ::xml_schema::flags f,
525 ::xml_schema::container* c)
526 : ::xml_schema::type(x, f, c)
527 , tag_(x.tag_, f, this)
528 , attachment_(x.attachment_, f, this)
529 , form_(x.form_, f, this)
530 , author_(x.author_, f, this)
531 , category_(x.category_, f, this)
532 , subject_(x.subject_, f, this)
536 ECLEntry_t::ECLEntry_t(const ::xercesc::DOMElement& e,
537 ::xml_schema::flags f,
538 ::xml_schema::container* c)
539 : ::xml_schema::type(e, f | ::xml_schema::flags::base, c)
547 if((f & ::xml_schema::flags::base) == 0)
549 ::xsd::cxx::xml::dom::parser<char> p(e,
true,
false,
true);
554 void ECLEntry_t::parse(::xsd::cxx::xml::dom::parser<char>& p, ::xml_schema::flags f)
556 for(; p.more_content(); p.next_content(
false))
558 const ::xercesc::DOMElement& i(p.cur_element());
559 const ::xsd::cxx::xml::qualified_name<char> n(
560 ::xsd::cxx::xml::dom::name<char>(i));
564 if(n.name() ==
"tag" && n.namespace_().empty())
566 ::std::unique_ptr<tag_type> r(tag_traits::create(i, f,
this));
568 this->tag_.push_back(::std::move(r));
574 if(n.name() ==
"attachment" && n.namespace_().empty())
576 ::std::unique_ptr<attachment_type> r(attachment_traits::create(i, f,
this));
578 this->attachment_.push_back(::std::move(r));
584 if(n.name() ==
"form" && n.namespace_().empty())
586 ::std::unique_ptr<form_type> r(form_traits::create(i, f,
this));
590 this->form_.set(::std::move(r));
598 while(p.more_attributes())
600 const ::xercesc::DOMAttr& i(p.next_attribute());
601 const ::xsd::cxx::xml::qualified_name<char> n(
602 ::xsd::cxx::xml::dom::name<char>(i));
604 if(n.name() ==
"author" && n.namespace_().empty())
606 this->author_.set(author_traits::create(i, f,
this));
610 if(n.name() ==
"category" && n.namespace_().empty())
612 this->category_.set(category_traits::create(i, f,
this));
616 if(n.name() ==
"subject" && n.namespace_().empty())
618 this->subject_.set(subject_traits::create(i, f,
this));
623 if(!author_.present())
625 throw ::xsd::cxx::tree::expected_attribute<char>(
"author",
"");
628 if(!category_.present())
630 throw ::xsd::cxx::tree::expected_attribute<char>(
"category",
"");
634 ECLEntry_t* ECLEntry_t::_clone(::xml_schema::flags f, ::xml_schema::container* c)
const
643 static_cast< ::xml_schema::type&
>(*this) = x;
645 this->attachment_ = x.attachment_;
646 this->form_ = x.form_;
647 this->author_ = x.author_;
648 this->category_ = x.category_;
649 this->subject_ = x.subject_;
655 ECLEntry_t::~ECLEntry_t() {}
659 ::std::ostream& operator<<(::std::ostream& o,
const Tag_t& i)
661 o << ::std::endl <<
"name: " << i.name();
665 ::std::ostream& operator<<(::std::ostream& o,
const Attachment_t& i)
667 o << static_cast<const ::xml_schema::base64_binary&>(i);
669 o << ::std::endl <<
"type: " << i.type();
670 o << ::std::endl <<
"filename: " << i.filename();
674 ::std::ostream& operator<<(::std::ostream& o,
const Field_t& i)
676 o << static_cast<const ::xml_schema::string&>(i);
678 o << ::std::endl <<
"name: " << i.name();
682 ::std::ostream& operator<<(::std::ostream& o,
const Form_t& i)
684 for(Form_t::field_const_iterator b(i.field().begin()), e(i.field().end()); b != e;
687 o << ::std::endl <<
"field: " << *b;
690 o << ::std::endl <<
"name: " << i.name();
694 ::std::ostream& operator<<(::std::ostream& o,
const ECLEntry_t& i)
696 for(ECLEntry_t::tag_const_iterator b(i.tag().begin()), e(i.tag().end()); b != e; ++b)
698 o << ::std::endl <<
"tag: " << *b;
701 for(ECLEntry_t::attachment_const_iterator b(i.attachment().begin()),
702 e(i.attachment().end());
706 o << ::std::endl <<
"attachment: " << *b;
711 o << ::std::endl <<
"form: " << *i.form();
714 o << ::std::endl <<
"author: " << i.author();
715 o << ::std::endl <<
"category: " << i.category();
718 o << ::std::endl <<
"subject: " << *i.subject();
725 #include <xsd/cxx/tree/error-handler.hxx>
726 #include <xsd/cxx/xml/sax/std-input-source.hxx>
728 ::std::unique_ptr< ::ECLEntry_t> entry(const ::std::string& u,
729 ::xml_schema::flags f,
730 const ::xml_schema::properties& p)
732 ::xsd::cxx::xml::auto_initializer i((f & ::xml_schema::flags::dont_initialize) == 0,
733 (f & ::xml_schema::flags::keep_dom) == 0);
735 ::xsd::cxx::tree::error_handler<char> h;
737 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument> d(
738 ::xsd::cxx::xml::dom::parse<char>(u, h, p, f));
740 h.throw_if_failed< ::xsd::cxx::tree::parsing<char> >();
742 return ::std::unique_ptr< ::ECLEntry_t>(
743 ::entry(std::move(d), f | ::xml_schema::flags::own_dom, p));
746 ::std::unique_ptr< ::ECLEntry_t> entry(const ::std::string& u,
747 ::xml_schema::error_handler& h,
748 ::xml_schema::flags f,
749 const ::xml_schema::properties& p)
751 ::xsd::cxx::xml::auto_initializer i((f & ::xml_schema::flags::dont_initialize) == 0,
752 (f & ::xml_schema::flags::keep_dom) == 0);
754 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument> d(
755 ::xsd::cxx::xml::dom::parse<char>(u, h, p, f));
758 throw ::xsd::cxx::tree::parsing<char>();
760 return ::std::unique_ptr< ::ECLEntry_t>(
761 ::entry(std::move(d), f | ::xml_schema::flags::own_dom, p));
764 ::std::unique_ptr< ::ECLEntry_t> entry(const ::std::string& u,
765 ::xercesc::DOMErrorHandler& h,
766 ::xml_schema::flags f,
767 const ::xml_schema::properties& p)
769 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument> d(
770 ::xsd::cxx::xml::dom::parse<char>(u, h, p, f));
773 throw ::xsd::cxx::tree::parsing<char>();
775 return ::std::unique_ptr< ::ECLEntry_t>(
776 ::entry(std::move(d), f | ::xml_schema::flags::own_dom, p));
779 ::std::unique_ptr< ::ECLEntry_t> entry(::std::istream& is,
780 ::xml_schema::flags f,
781 const ::xml_schema::properties& p)
783 ::xsd::cxx::xml::auto_initializer i((f & ::xml_schema::flags::dont_initialize) == 0,
784 (f & ::xml_schema::flags::keep_dom) == 0);
786 ::xsd::cxx::xml::sax::std_input_source isrc(is);
787 return ::entry(isrc, f, p);
790 ::std::unique_ptr< ::ECLEntry_t> entry(::std::istream& is,
791 ::xml_schema::error_handler& h,
792 ::xml_schema::flags f,
793 const ::xml_schema::properties& p)
795 ::xsd::cxx::xml::auto_initializer i((f & ::xml_schema::flags::dont_initialize) == 0,
796 (f & ::xml_schema::flags::keep_dom) == 0);
798 ::xsd::cxx::xml::sax::std_input_source isrc(is);
799 return ::entry(isrc, h, f, p);
802 ::std::unique_ptr< ::ECLEntry_t> entry(::std::istream& is,
803 ::xercesc::DOMErrorHandler& h,
804 ::xml_schema::flags f,
805 const ::xml_schema::properties& p)
807 ::xsd::cxx::xml::sax::std_input_source isrc(is);
808 return ::entry(isrc, h, f, p);
811 ::std::unique_ptr< ::ECLEntry_t> entry(::std::istream& is,
812 const ::std::string& sid,
813 ::xml_schema::flags f,
814 const ::xml_schema::properties& p)
816 ::xsd::cxx::xml::auto_initializer i((f & ::xml_schema::flags::dont_initialize) == 0,
817 (f & ::xml_schema::flags::keep_dom) == 0);
819 ::xsd::cxx::xml::sax::std_input_source isrc(is, sid);
820 return ::entry(isrc, f, p);
823 ::std::unique_ptr< ::ECLEntry_t> entry(::std::istream& is,
824 const ::std::string& sid,
825 ::xml_schema::error_handler& h,
826 ::xml_schema::flags f,
827 const ::xml_schema::properties& p)
829 ::xsd::cxx::xml::auto_initializer i((f & ::xml_schema::flags::dont_initialize) == 0,
830 (f & ::xml_schema::flags::keep_dom) == 0);
832 ::xsd::cxx::xml::sax::std_input_source isrc(is, sid);
833 return ::entry(isrc, h, f, p);
836 ::std::unique_ptr< ::ECLEntry_t> entry(::std::istream& is,
837 const ::std::string& sid,
838 ::xercesc::DOMErrorHandler& h,
839 ::xml_schema::flags f,
840 const ::xml_schema::properties& p)
842 ::xsd::cxx::xml::sax::std_input_source isrc(is, sid);
843 return ::entry(isrc, h, f, p);
846 ::std::unique_ptr< ::ECLEntry_t> entry(::xercesc::InputSource& i,
847 ::xml_schema::flags f,
848 const ::xml_schema::properties& p)
850 ::xsd::cxx::tree::error_handler<char> h;
852 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument> d(
853 ::xsd::cxx::xml::dom::parse<char>(i, h, p, f));
855 h.throw_if_failed< ::xsd::cxx::tree::parsing<char> >();
857 return ::std::unique_ptr< ::ECLEntry_t>(
858 ::entry(std::move(d), f | ::xml_schema::flags::own_dom, p));
861 ::std::unique_ptr< ::ECLEntry_t> entry(::xercesc::InputSource& i,
862 ::xml_schema::error_handler& h,
863 ::xml_schema::flags f,
864 const ::xml_schema::properties& p)
866 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument> d(
867 ::xsd::cxx::xml::dom::parse<char>(i, h, p, f));
870 throw ::xsd::cxx::tree::parsing<char>();
872 return ::std::unique_ptr< ::ECLEntry_t>(
873 ::entry(std::move(d), f | ::xml_schema::flags::own_dom, p));
876 ::std::unique_ptr< ::ECLEntry_t> entry(::xercesc::InputSource& i,
877 ::xercesc::DOMErrorHandler& h,
878 ::xml_schema::flags f,
879 const ::xml_schema::properties& p)
881 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument> d(
882 ::xsd::cxx::xml::dom::parse<char>(i, h, p, f));
885 throw ::xsd::cxx::tree::parsing<char>();
887 return ::std::unique_ptr< ::ECLEntry_t>(
888 ::entry(std::move(d), f | ::xml_schema::flags::own_dom, p));
891 ::std::unique_ptr< ::ECLEntry_t> entry(const ::xercesc::DOMDocument& doc,
892 ::xml_schema::flags f,
893 const ::xml_schema::properties& p)
895 if(f & ::xml_schema::flags::keep_dom)
897 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument> d(
898 static_cast< ::xercesc::DOMDocument*
>(doc.cloneNode(
true)));
900 return ::std::unique_ptr< ::ECLEntry_t>(
901 ::entry(std::move(d), f | ::xml_schema::flags::own_dom, p));
904 const ::xercesc::DOMElement& e(*doc.getDocumentElement());
905 const ::xsd::cxx::xml::qualified_name<char> n(::xsd::cxx::xml::dom::name<char>(e));
907 if(n.name() ==
"entry" && n.namespace_() ==
"")
909 ::std::unique_ptr< ::ECLEntry_t> r(
910 ::xsd::cxx::tree::traits< ::ECLEntry_t, char>::create(e, f, 0));
914 throw ::xsd::cxx::tree::unexpected_element<char>(
915 n.name(), n.namespace_(),
"entry",
"");
918 ::std::unique_ptr< ::ECLEntry_t> entry(
919 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument> d,
920 ::xml_schema::flags f,
921 const ::xml_schema::properties&)
923 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument> c(
924 ((f & ::xml_schema::flags::keep_dom) && !(f & ::xml_schema::flags::own_dom))
925 ?
static_cast< ::xercesc::DOMDocument*
>(d->cloneNode(
true))
928 ::xercesc::DOMDocument& doc(c.get() ? *c : *d);
929 const ::xercesc::DOMElement& e(*doc.getDocumentElement());
931 const ::xsd::cxx::xml::qualified_name<char> n(::xsd::cxx::xml::dom::name<char>(e));
933 if(f & ::xml_schema::flags::keep_dom)
934 doc.setUserData(::xml_schema::dom::tree_node_key, (c.get() ? &c : &d), 0);
936 if(n.name() ==
"entry" && n.namespace_() ==
"")
938 ::std::unique_ptr< ::ECLEntry_t> r(
939 ::xsd::cxx::tree::traits< ::ECLEntry_t, char>::create(e, f, 0));
943 throw ::xsd::cxx::tree::unexpected_element<char>(
944 n.name(), n.namespace_(),
"entry",
"");
948 #include <xsd/cxx/tree/error-handler.hxx>
949 #include <xsd/cxx/xml/dom/serialization-source.hxx>
951 void entry(::std::ostream& o,
952 const ::ECLEntry_t& s,
953 const ::xml_schema::namespace_infomap& m,
954 const ::std::string& e,
955 ::xml_schema::flags f)
957 ::xsd::cxx::xml::auto_initializer i((f & ::xml_schema::flags::dont_initialize) == 0);
959 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument> d(::entry(s, m, f));
961 ::xsd::cxx::tree::error_handler<char> h;
963 ::xsd::cxx::xml::dom::ostream_format_target t(o);
964 if(!::xsd::cxx::xml::dom::serialize(t, *d, e, h, f))
966 h.throw_if_failed< ::xsd::cxx::tree::serialization<char> >();
970 void entry(::std::ostream& o,
971 const ::ECLEntry_t& s,
972 ::xml_schema::error_handler& h,
973 const ::xml_schema::namespace_infomap& m,
974 const ::std::string& e,
975 ::xml_schema::flags f)
977 ::xsd::cxx::xml::auto_initializer i((f & ::xml_schema::flags::dont_initialize) == 0);
979 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument> d(::entry(s, m, f));
980 ::xsd::cxx::xml::dom::ostream_format_target t(o);
981 if(!::xsd::cxx::xml::dom::serialize(t, *d, e, h, f))
983 throw ::xsd::cxx::tree::serialization<char>();
987 void entry(::std::ostream& o,
988 const ::ECLEntry_t& s,
989 ::xercesc::DOMErrorHandler& h,
990 const ::xml_schema::namespace_infomap& m,
991 const ::std::string& e,
992 ::xml_schema::flags f)
994 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument> d(::entry(s, m, f));
995 ::xsd::cxx::xml::dom::ostream_format_target t(o);
996 if(!::xsd::cxx::xml::dom::serialize(t, *d, e, h, f))
998 throw ::xsd::cxx::tree::serialization<char>();
1002 void entry(::xercesc::XMLFormatTarget& t,
1003 const ::ECLEntry_t& s,
1004 const ::xml_schema::namespace_infomap& m,
1005 const ::std::string& e,
1006 ::xml_schema::flags f)
1008 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument> d(::entry(s, m, f));
1010 ::xsd::cxx::tree::error_handler<char> h;
1012 if(!::xsd::cxx::xml::dom::serialize(t, *d, e, h, f))
1014 h.throw_if_failed< ::xsd::cxx::tree::serialization<char> >();
1018 void entry(::xercesc::XMLFormatTarget& t,
1019 const ::ECLEntry_t& s,
1020 ::xml_schema::error_handler& h,
1021 const ::xml_schema::namespace_infomap& m,
1022 const ::std::string& e,
1023 ::xml_schema::flags f)
1025 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument> d(::entry(s, m, f));
1026 if(!::xsd::cxx::xml::dom::serialize(t, *d, e, h, f))
1028 throw ::xsd::cxx::tree::serialization<char>();
1032 void entry(::xercesc::XMLFormatTarget& t,
1033 const ::ECLEntry_t& s,
1034 ::xercesc::DOMErrorHandler& h,
1035 const ::xml_schema::namespace_infomap& m,
1036 const ::std::string& e,
1037 ::xml_schema::flags f)
1039 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument> d(::entry(s, m, f));
1040 if(!::xsd::cxx::xml::dom::serialize(t, *d, e, h, f))
1042 throw ::xsd::cxx::tree::serialization<char>();
1046 void entry(::xercesc::DOMDocument& d, const ::ECLEntry_t& s, ::xml_schema::flags)
1048 ::xercesc::DOMElement& e(*d.getDocumentElement());
1049 const ::xsd::cxx::xml::qualified_name<char> n(::xsd::cxx::xml::dom::name<char>(e));
1051 if(n.name() ==
"entry" && n.namespace_() ==
"")
1057 throw ::xsd::cxx::tree::unexpected_element<char>(
1058 n.name(), n.namespace_(),
"entry",
"");
1062 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument> entry(
1063 const ::ECLEntry_t& s,
1064 const ::xml_schema::namespace_infomap& m,
1065 ::xml_schema::flags f)
1067 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument> d(
1068 ::xsd::cxx::xml::dom::serialize<char>(
"entry",
"", m, f));
1074 void operator<<(::xercesc::DOMElement& e,
const Tag_t& i)
1076 e << static_cast<const ::xml_schema::type&>(i);
1081 ::xercesc::DOMAttr& a(::xsd::cxx::xml::dom::create_attribute(
"name", e));
1087 void operator<<(::xercesc::DOMElement& e,
const Attachment_t& i)
1089 e << static_cast<const ::xml_schema::base64_binary&>(i);
1094 ::xercesc::DOMAttr& a(::xsd::cxx::xml::dom::create_attribute(
"type", e));
1102 ::xercesc::DOMAttr& a(::xsd::cxx::xml::dom::create_attribute(
"filename", e));
1108 void operator<<(::xercesc::DOMElement& e,
const Field_t& i)
1110 e << static_cast<const ::xml_schema::string&>(i);
1115 ::xercesc::DOMAttr& a(::xsd::cxx::xml::dom::create_attribute(
"name", e));
1121 void operator<<(::xercesc::DOMElement& e,
const Form_t& i)
1123 e << static_cast<const ::xml_schema::type&>(i);
1127 for(Form_t::field_const_iterator b(i.field().begin()), n(i.field().end()); b != n;
1130 ::xercesc::DOMElement& s(::xsd::cxx::xml::dom::create_element(
"field", e));
1138 ::xercesc::DOMAttr& a(::xsd::cxx::xml::dom::create_attribute(
"name", e));
1144 void operator<<(::xercesc::DOMElement& e,
const ECLEntry_t& i)
1146 e << static_cast<const ::xml_schema::type&>(i);
1150 for(ECLEntry_t::tag_const_iterator b(i.tag().begin()), n(i.tag().end()); b != n; ++b)
1152 ::xercesc::DOMElement& s(::xsd::cxx::xml::dom::create_element(
"tag", e));
1159 for(ECLEntry_t::attachment_const_iterator b(i.attachment().begin()),
1160 n(i.attachment().end());
1164 ::xercesc::DOMElement& s(::xsd::cxx::xml::dom::create_element(
"attachment", e));
1173 ::xercesc::DOMElement& s(::xsd::cxx::xml::dom::create_element(
"form", e));
1181 ::xercesc::DOMAttr& a(::xsd::cxx::xml::dom::create_attribute(
"author", e));
1189 ::xercesc::DOMAttr& a(::xsd::cxx::xml::dom::create_attribute(
"category", e));
1198 ::xercesc::DOMAttr& a(::xsd::cxx::xml::dom::create_attribute(
"subject", e));
1204 #include <xsd/cxx/post.hxx>