39 #include <xsd/cxx/pre.hxx> 73 return this->uniqueName_.get ();
79 return this->uniqueName_.get ();
85 this->uniqueName_.set (x);
91 this->uniqueName_.set (std::move (x));
97 return this->basenameMatchPattern_.get ();
103 return this->basenameMatchPattern_.get ();
109 this->basenameMatchPattern_.set (x);
115 this->basenameMatchPattern_.set (std::move (x));
121 return this->objectDbRootFolder_.get ();
127 return this->objectDbRootFolder_.get ();
133 this->objectDbRootFolder_.set (x);
139 this->objectDbRootFolder_.set (std::move (x));
143 #include <xsd/cxx/xml/dom/parsing-source.hxx> 173 if ((f & ::xml_schema::flags::base) == 0)
175 ::xsd::cxx::xml::dom::parser< char > p (e,
true,
false,
false);
181 parse (::xsd::cxx::xml::dom::parser< char >& p,
184 for (; p.more_content (); p.next_content (
false))
186 const ::xercesc::DOMElement& i (p.cur_element ());
187 const ::xsd::cxx::xml::qualified_name< char > n (
188 ::xsd::cxx::xml::dom::name< char > (i));
192 if (n.name () ==
"database" && n.namespace_ () ==
"http://xml.ralfschleicher.de/asr_object_database/")
194 ::std::unique_ptr< database_type >
r (
195 database_traits::create (i, f,
this));
197 this->
database_.push_back (::std::move (r));
237 uniqueName_ (uniqueName, this),
238 basenameMatchPattern_ (basenameMatchPattern, this),
239 objectDbRootFolder_ (objectDbRootFolder, this)
263 if ((f & ::xml_schema::flags::base) == 0)
265 ::xsd::cxx::xml::dom::parser< char > p (e,
true,
false,
false);
271 parse (::xsd::cxx::xml::dom::parser< char >& p,
274 for (; p.more_content (); p.next_content (
false))
276 const ::xercesc::DOMElement& i (p.cur_element ());
277 const ::xsd::cxx::xml::qualified_name< char > n (
278 ::xsd::cxx::xml::dom::name< char > (i));
282 if (n.name () ==
"uniqueName" && n.namespace_ () ==
"http://xml.ralfschleicher.de/asr_object_database/")
284 ::std::unique_ptr< uniqueName_type >
r (
285 uniqueName_traits::create (i, f,
this));
296 if (n.name () ==
"basenameMatchPattern" && n.namespace_ () ==
"http://xml.ralfschleicher.de/asr_object_database/")
298 ::std::unique_ptr< basenameMatchPattern_type >
r (
299 basenameMatchPattern_traits::create (i, f,
this));
310 if (n.name () ==
"objectDbRootFolder" && n.namespace_ () ==
"http://xml.ralfschleicher.de/asr_object_database/")
312 ::std::unique_ptr< objectDbRootFolder_type >
r (
313 objectDbRootFolder_traits::create (i, f,
this));
327 throw ::xsd::cxx::tree::expected_element< char > (
329 "http://xml.ralfschleicher.de/asr_object_database/");
334 throw ::xsd::cxx::tree::expected_element< char > (
335 "basenameMatchPattern",
336 "http://xml.ralfschleicher.de/asr_object_database/");
341 throw ::xsd::cxx::tree::expected_element< char > (
342 "objectDbRootFolder",
343 "http://xml.ralfschleicher.de/asr_object_database/");
375 #include <xsd/cxx/xml/sax/std-input-source.hxx> 376 #include <xsd/cxx/tree/error-handler.hxx> 380 ::std::unique_ptr< ::asr_object_database::configuration >
385 ::xsd::cxx::xml::auto_initializer i (
386 (f & ::xml_schema::flags::dont_initialize) == 0,
387 (f & ::xml_schema::flags::keep_dom) == 0);
389 ::xsd::cxx::tree::error_handler< char > h;
391 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument >
d (
392 ::xsd::cxx::xml::dom::parse< char > (
395 h.throw_if_failed< ::xsd::cxx::tree::parsing< char > > ();
397 return ::std::unique_ptr< ::asr_object_database::configuration > (
399 std::move (d), f | ::xml_schema::flags::own_dom, p));
402 ::std::unique_ptr< ::asr_object_database::configuration >
408 ::xsd::cxx::xml::auto_initializer i (
409 (f & ::xml_schema::flags::dont_initialize) == 0,
410 (f & ::xml_schema::flags::keep_dom) == 0);
412 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument >
d (
413 ::xsd::cxx::xml::dom::parse< char > (
417 throw ::xsd::cxx::tree::parsing< char > ();
419 return ::std::unique_ptr< ::asr_object_database::configuration > (
421 std::move (d), f | ::xml_schema::flags::own_dom, p));
424 ::std::unique_ptr< ::asr_object_database::configuration >
426 ::xercesc::DOMErrorHandler& h,
430 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument >
d (
431 ::xsd::cxx::xml::dom::parse< char > (
435 throw ::xsd::cxx::tree::parsing< char > ();
437 return ::std::unique_ptr< ::asr_object_database::configuration > (
439 std::move (d), f | ::xml_schema::flags::own_dom, p));
442 ::std::unique_ptr< ::asr_object_database::configuration >
447 ::xsd::cxx::xml::auto_initializer i (
448 (f & ::xml_schema::flags::dont_initialize) == 0,
449 (f & ::xml_schema::flags::keep_dom) == 0);
451 ::xsd::cxx::xml::sax::std_input_source isrc (is);
455 ::std::unique_ptr< ::asr_object_database::configuration >
461 ::xsd::cxx::xml::auto_initializer i (
462 (f & ::xml_schema::flags::dont_initialize) == 0,
463 (f & ::xml_schema::flags::keep_dom) == 0);
465 ::xsd::cxx::xml::sax::std_input_source isrc (is);
469 ::std::unique_ptr< ::asr_object_database::configuration >
471 ::xercesc::DOMErrorHandler& h,
475 ::xsd::cxx::xml::sax::std_input_source isrc (is);
479 ::std::unique_ptr< ::asr_object_database::configuration >
485 ::xsd::cxx::xml::auto_initializer i (
486 (f & ::xml_schema::flags::dont_initialize) == 0,
487 (f & ::xml_schema::flags::keep_dom) == 0);
489 ::xsd::cxx::xml::sax::std_input_source isrc (is, sid);
493 ::std::unique_ptr< ::asr_object_database::configuration >
500 ::xsd::cxx::xml::auto_initializer i (
501 (f & ::xml_schema::flags::dont_initialize) == 0,
502 (f & ::xml_schema::flags::keep_dom) == 0);
504 ::xsd::cxx::xml::sax::std_input_source isrc (is, sid);
508 ::std::unique_ptr< ::asr_object_database::configuration >
511 ::xercesc::DOMErrorHandler& h,
515 ::xsd::cxx::xml::sax::std_input_source isrc (is, sid);
519 ::std::unique_ptr< ::asr_object_database::configuration >
524 ::xsd::cxx::tree::error_handler< char > h;
526 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument >
d (
527 ::xsd::cxx::xml::dom::parse< char > (
530 h.throw_if_failed< ::xsd::cxx::tree::parsing< char > > ();
532 return ::std::unique_ptr< ::asr_object_database::configuration > (
534 std::move (d), f | ::xml_schema::flags::own_dom, p));
537 ::std::unique_ptr< ::asr_object_database::configuration >
543 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument >
d (
544 ::xsd::cxx::xml::dom::parse< char > (
548 throw ::xsd::cxx::tree::parsing< char > ();
550 return ::std::unique_ptr< ::asr_object_database::configuration > (
552 std::move (d), f | ::xml_schema::flags::own_dom, p));
555 ::std::unique_ptr< ::asr_object_database::configuration >
557 ::xercesc::DOMErrorHandler& h,
561 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument >
d (
562 ::xsd::cxx::xml::dom::parse< char > (
566 throw ::xsd::cxx::tree::parsing< char > ();
568 return ::std::unique_ptr< ::asr_object_database::configuration > (
570 std::move (d), f | ::xml_schema::flags::own_dom, p));
573 ::std::unique_ptr< ::asr_object_database::configuration >
578 if (f & ::xml_schema::flags::keep_dom)
580 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument >
d (
581 static_cast< ::xercesc::DOMDocument* > (doc.cloneNode (
true)));
583 return ::std::unique_ptr< ::asr_object_database::configuration > (
585 std::move (d), f | ::xml_schema::flags::own_dom, p));
588 const ::xercesc::DOMElement& e (*doc.getDocumentElement ());
589 const ::xsd::cxx::xml::qualified_name< char > n (
590 ::xsd::cxx::xml::dom::name< char > (e));
592 if (n.name () ==
"configuration" &&
593 n.namespace_ () ==
"http://xml.ralfschleicher.de/asr_object_database/")
595 ::std::unique_ptr< ::asr_object_database::configuration >
r (
596 ::xsd::cxx::tree::traits< ::asr_object_database::configuration, char >::create (
601 throw ::xsd::cxx::tree::unexpected_element < char > (
605 "http://xml.ralfschleicher.de/asr_object_database/");
608 ::std::unique_ptr< ::asr_object_database::configuration >
613 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > c (
614 ((f & ::xml_schema::flags::keep_dom) &&
615 !(f & ::xml_schema::flags::own_dom))
616 ? static_cast< ::xercesc::DOMDocument* > (d->cloneNode (
true))
619 ::xercesc::DOMDocument& doc (c.get () ? *c : *d);
620 const ::xercesc::DOMElement& e (*doc.getDocumentElement ());
622 const ::xsd::cxx::xml::qualified_name< char > n (
623 ::xsd::cxx::xml::dom::name< char > (e));
625 if (f & ::xml_schema::flags::keep_dom)
627 (c.get () ? &c : &d),
630 if (n.name () ==
"configuration" &&
631 n.namespace_ () ==
"http://xml.ralfschleicher.de/asr_object_database/")
633 ::std::unique_ptr< ::asr_object_database::configuration >
r (
634 ::xsd::cxx::tree::traits< ::asr_object_database::configuration, char >::create (
639 throw ::xsd::cxx::tree::unexpected_element < char > (
643 "http://xml.ralfschleicher.de/asr_object_database/");
647 #include <xsd/cxx/post.hxx>
database & operator=(const database &x)
::xsd::cxx::tree::type type
void parse(::xsd::cxx::xml::dom::parser< char > &,::xml_schema::flags)
::xsd::cxx::tree::type container
const basenameMatchPattern_type & basenameMatchPattern() const
::xsd::cxx::tree::flags flags
::xml_schema::string uniqueName_type
::xml_schema::string objectDbRootFolder_type
const uniqueName_type & uniqueName() const
::std::unique_ptr< ::asr_object_database::configuration > configuration_(const ::std::string &u,::xml_schema::flags f, const ::xml_schema::properties &p)
void parse(::xsd::cxx::xml::dom::parser< char > &,::xml_schema::flags)
::xsd::cxx::tree::one< objectDbRootFolder_type > objectDbRootFolder_
::std::unique_ptr< ::asr_object_database::configuration > configuration_(::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d,::xml_schema::flags f, const ::xml_schema::properties &)
database(const uniqueName_type &, const basenameMatchPattern_type &, const objectDbRootFolder_type &)
::xsd::cxx::tree::one< uniqueName_type > uniqueName_
configuration & operator=(const configuration &x)
virtual configuration * _clone(::xml_schema::flags f=0,::xml_schema::container *c=0) const
virtual database * _clone(::xml_schema::flags f=0,::xml_schema::container *c=0) const
::xsd::cxx::tree::properties< char > properties
const XMLCh *const tree_node_key
::xsd::cxx::tree::string< char, simple_type > string
database_sequence database_
::xsd::cxx::xml::error_handler< char > error_handler
const database_sequence & database() const
const objectDbRootFolder_type & objectDbRootFolder() const
::xsd::cxx::tree::one< basenameMatchPattern_type > basenameMatchPattern_
::xsd::cxx::tree::sequence< database_type > database_sequence
::xml_schema::string basenameMatchPattern_type