ConfigurationXMLSchema.cpp
Go to the documentation of this file.
1 // Copyright (c) 2005-2014 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 "ConfigurationXMLSchema.h"
42 
44 {
45  // configuration
46  //
47 
49  database () const
50  {
51  return this->database_;
52  }
53 
56  {
57  return this->database_;
58  }
59 
60  void configuration::
62  {
63  this->database_ = s;
64  }
65 
66 
67  // database
68  //
69 
71  uniqueName () const
72  {
73  return this->uniqueName_.get ();
74  }
75 
78  {
79  return this->uniqueName_.get ();
80  }
81 
82  void database::
84  {
85  this->uniqueName_.set (x);
86  }
87 
88  void database::
89  uniqueName (::std::unique_ptr< uniqueName_type > x)
90  {
91  this->uniqueName_.set (std::move (x));
92  }
93 
96  {
97  return this->basenameMatchPattern_.get ();
98  }
99 
102  {
103  return this->basenameMatchPattern_.get ();
104  }
105 
106  void database::
108  {
109  this->basenameMatchPattern_.set (x);
110  }
111 
112  void database::
113  basenameMatchPattern (::std::unique_ptr< basenameMatchPattern_type > x)
114  {
115  this->basenameMatchPattern_.set (std::move (x));
116  }
117 
120  {
121  return this->objectDbRootFolder_.get ();
122  }
123 
126  {
127  return this->objectDbRootFolder_.get ();
128  }
129 
130  void database::
132  {
133  this->objectDbRootFolder_.set (x);
134  }
135 
136  void database::
137  objectDbRootFolder (::std::unique_ptr< objectDbRootFolder_type > x)
138  {
139  this->objectDbRootFolder_.set (std::move (x));
140  }
141 }
142 
143 #include <xsd/cxx/xml/dom/parsing-source.hxx>
144 
145 namespace asr_object_database
146 {
147  // configuration
148  //
149 
152  : ::xml_schema::type (),
153  database_ (this)
154  {
155  }
156 
161  : ::xml_schema::type (x, f, c),
162  database_ (x.database_, f, this)
163  {
164  }
165 
167  configuration (const ::xercesc::DOMElement& e,
170  : ::xml_schema::type (e, f | ::xml_schema::flags::base, c),
171  database_ (this)
172  {
173  if ((f & ::xml_schema::flags::base) == 0)
174  {
175  ::xsd::cxx::xml::dom::parser< char > p (e, true, false, false);
176  this->parse (p, f);
177  }
178  }
179 
180  void configuration::
181  parse (::xsd::cxx::xml::dom::parser< char >& p,
183  {
184  for (; p.more_content (); p.next_content (false))
185  {
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));
189 
190  // database
191  //
192  if (n.name () == "database" && n.namespace_ () == "http://xml.ralfschleicher.de/asr_object_database/")
193  {
194  ::std::unique_ptr< database_type > r (
195  database_traits::create (i, f, this));
196 
197  this->database_.push_back (::std::move (r));
198  continue;
199  }
200 
201  break;
202  }
203  }
204 
207  ::xml_schema::container* c) const
208  {
209  return new class configuration (*this, f, c);
210  }
211 
214  {
215  if (this != &x)
216  {
217  static_cast< ::xml_schema::type& > (*this) = x;
218  this->database_ = x.database_;
219  }
220 
221  return *this;
222  }
223 
226  {
227  }
228 
229  // database
230  //
231 
232  database::
233  database (const uniqueName_type& uniqueName,
234  const basenameMatchPattern_type& basenameMatchPattern,
235  const objectDbRootFolder_type& objectDbRootFolder)
236  : ::xml_schema::type (),
237  uniqueName_ (uniqueName, this),
238  basenameMatchPattern_ (basenameMatchPattern, this),
239  objectDbRootFolder_ (objectDbRootFolder, this)
240  {
241  }
242 
243  database::
247  : ::xml_schema::type (x, f, c),
248  uniqueName_ (x.uniqueName_, f, this),
251  {
252  }
253 
254  database::
255  database (const ::xercesc::DOMElement& e,
258  : ::xml_schema::type (e, f | ::xml_schema::flags::base, c),
259  uniqueName_ (this),
260  basenameMatchPattern_ (this),
261  objectDbRootFolder_ (this)
262  {
263  if ((f & ::xml_schema::flags::base) == 0)
264  {
265  ::xsd::cxx::xml::dom::parser< char > p (e, true, false, false);
266  this->parse (p, f);
267  }
268  }
269 
270  void database::
271  parse (::xsd::cxx::xml::dom::parser< char >& p,
273  {
274  for (; p.more_content (); p.next_content (false))
275  {
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));
279 
280  // uniqueName
281  //
282  if (n.name () == "uniqueName" && n.namespace_ () == "http://xml.ralfschleicher.de/asr_object_database/")
283  {
284  ::std::unique_ptr< uniqueName_type > r (
285  uniqueName_traits::create (i, f, this));
286 
287  if (!uniqueName_.present ())
288  {
289  this->uniqueName_.set (::std::move (r));
290  continue;
291  }
292  }
293 
294  // basenameMatchPattern
295  //
296  if (n.name () == "basenameMatchPattern" && n.namespace_ () == "http://xml.ralfschleicher.de/asr_object_database/")
297  {
298  ::std::unique_ptr< basenameMatchPattern_type > r (
299  basenameMatchPattern_traits::create (i, f, this));
300 
301  if (!basenameMatchPattern_.present ())
302  {
303  this->basenameMatchPattern_.set (::std::move (r));
304  continue;
305  }
306  }
307 
308  // objectDbRootFolder
309  //
310  if (n.name () == "objectDbRootFolder" && n.namespace_ () == "http://xml.ralfschleicher.de/asr_object_database/")
311  {
312  ::std::unique_ptr< objectDbRootFolder_type > r (
313  objectDbRootFolder_traits::create (i, f, this));
314 
315  if (!objectDbRootFolder_.present ())
316  {
317  this->objectDbRootFolder_.set (::std::move (r));
318  continue;
319  }
320  }
321 
322  break;
323  }
324 
325  if (!uniqueName_.present ())
326  {
327  throw ::xsd::cxx::tree::expected_element< char > (
328  "uniqueName",
329  "http://xml.ralfschleicher.de/asr_object_database/");
330  }
331 
332  if (!basenameMatchPattern_.present ())
333  {
334  throw ::xsd::cxx::tree::expected_element< char > (
335  "basenameMatchPattern",
336  "http://xml.ralfschleicher.de/asr_object_database/");
337  }
338 
339  if (!objectDbRootFolder_.present ())
340  {
341  throw ::xsd::cxx::tree::expected_element< char > (
342  "objectDbRootFolder",
343  "http://xml.ralfschleicher.de/asr_object_database/");
344  }
345  }
346 
349  ::xml_schema::container* c) const
350  {
351  return new class database (*this, f, c);
352  }
353 
356  {
357  if (this != &x)
358  {
359  static_cast< ::xml_schema::type& > (*this) = x;
360  this->uniqueName_ = x.uniqueName_;
363  }
364 
365  return *this;
366  }
367 
368  database::
370  {
371  }
372 }
373 
374 #include <istream>
375 #include <xsd/cxx/xml/sax/std-input-source.hxx>
376 #include <xsd/cxx/tree/error-handler.hxx>
377 
378 namespace asr_object_database
379 {
380  ::std::unique_ptr< ::asr_object_database::configuration >
384  {
385  ::xsd::cxx::xml::auto_initializer i (
386  (f & ::xml_schema::flags::dont_initialize) == 0,
387  (f & ::xml_schema::flags::keep_dom) == 0);
388 
389  ::xsd::cxx::tree::error_handler< char > h;
390 
391  ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
392  ::xsd::cxx::xml::dom::parse< char > (
393  u, h, p, f));
394 
395  h.throw_if_failed< ::xsd::cxx::tree::parsing< char > > ();
396 
397  return ::std::unique_ptr< ::asr_object_database::configuration > (
399  std::move (d), f | ::xml_schema::flags::own_dom, p));
400  }
401 
402  ::std::unique_ptr< ::asr_object_database::configuration >
407  {
408  ::xsd::cxx::xml::auto_initializer i (
409  (f & ::xml_schema::flags::dont_initialize) == 0,
410  (f & ::xml_schema::flags::keep_dom) == 0);
411 
412  ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
413  ::xsd::cxx::xml::dom::parse< char > (
414  u, h, p, f));
415 
416  if (!d.get ())
417  throw ::xsd::cxx::tree::parsing< char > ();
418 
419  return ::std::unique_ptr< ::asr_object_database::configuration > (
421  std::move (d), f | ::xml_schema::flags::own_dom, p));
422  }
423 
424  ::std::unique_ptr< ::asr_object_database::configuration >
426  ::xercesc::DOMErrorHandler& h,
429  {
430  ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
431  ::xsd::cxx::xml::dom::parse< char > (
432  u, h, p, f));
433 
434  if (!d.get ())
435  throw ::xsd::cxx::tree::parsing< char > ();
436 
437  return ::std::unique_ptr< ::asr_object_database::configuration > (
439  std::move (d), f | ::xml_schema::flags::own_dom, p));
440  }
441 
442  ::std::unique_ptr< ::asr_object_database::configuration >
443  configuration_ (::std::istream& is,
446  {
447  ::xsd::cxx::xml::auto_initializer i (
448  (f & ::xml_schema::flags::dont_initialize) == 0,
449  (f & ::xml_schema::flags::keep_dom) == 0);
450 
451  ::xsd::cxx::xml::sax::std_input_source isrc (is);
453  }
454 
455  ::std::unique_ptr< ::asr_object_database::configuration >
456  configuration_ (::std::istream& is,
460  {
461  ::xsd::cxx::xml::auto_initializer i (
462  (f & ::xml_schema::flags::dont_initialize) == 0,
463  (f & ::xml_schema::flags::keep_dom) == 0);
464 
465  ::xsd::cxx::xml::sax::std_input_source isrc (is);
467  }
468 
469  ::std::unique_ptr< ::asr_object_database::configuration >
470  configuration_ (::std::istream& is,
471  ::xercesc::DOMErrorHandler& h,
474  {
475  ::xsd::cxx::xml::sax::std_input_source isrc (is);
477  }
478 
479  ::std::unique_ptr< ::asr_object_database::configuration >
480  configuration_ (::std::istream& is,
481  const ::std::string& sid,
484  {
485  ::xsd::cxx::xml::auto_initializer i (
486  (f & ::xml_schema::flags::dont_initialize) == 0,
487  (f & ::xml_schema::flags::keep_dom) == 0);
488 
489  ::xsd::cxx::xml::sax::std_input_source isrc (is, sid);
491  }
492 
493  ::std::unique_ptr< ::asr_object_database::configuration >
494  configuration_ (::std::istream& is,
495  const ::std::string& sid,
499  {
500  ::xsd::cxx::xml::auto_initializer i (
501  (f & ::xml_schema::flags::dont_initialize) == 0,
502  (f & ::xml_schema::flags::keep_dom) == 0);
503 
504  ::xsd::cxx::xml::sax::std_input_source isrc (is, sid);
506  }
507 
508  ::std::unique_ptr< ::asr_object_database::configuration >
509  configuration_ (::std::istream& is,
510  const ::std::string& sid,
511  ::xercesc::DOMErrorHandler& h,
514  {
515  ::xsd::cxx::xml::sax::std_input_source isrc (is, sid);
517  }
518 
519  ::std::unique_ptr< ::asr_object_database::configuration >
520  configuration_ (::xercesc::InputSource& i,
523  {
524  ::xsd::cxx::tree::error_handler< char > h;
525 
526  ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
527  ::xsd::cxx::xml::dom::parse< char > (
528  i, h, p, f));
529 
530  h.throw_if_failed< ::xsd::cxx::tree::parsing< char > > ();
531 
532  return ::std::unique_ptr< ::asr_object_database::configuration > (
534  std::move (d), f | ::xml_schema::flags::own_dom, p));
535  }
536 
537  ::std::unique_ptr< ::asr_object_database::configuration >
538  configuration_ (::xercesc::InputSource& i,
542  {
543  ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
544  ::xsd::cxx::xml::dom::parse< char > (
545  i, h, p, f));
546 
547  if (!d.get ())
548  throw ::xsd::cxx::tree::parsing< char > ();
549 
550  return ::std::unique_ptr< ::asr_object_database::configuration > (
552  std::move (d), f | ::xml_schema::flags::own_dom, p));
553  }
554 
555  ::std::unique_ptr< ::asr_object_database::configuration >
556  configuration_ (::xercesc::InputSource& i,
557  ::xercesc::DOMErrorHandler& h,
560  {
561  ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
562  ::xsd::cxx::xml::dom::parse< char > (
563  i, h, p, f));
564 
565  if (!d.get ())
566  throw ::xsd::cxx::tree::parsing< char > ();
567 
568  return ::std::unique_ptr< ::asr_object_database::configuration > (
570  std::move (d), f | ::xml_schema::flags::own_dom, p));
571  }
572 
573  ::std::unique_ptr< ::asr_object_database::configuration >
574  configuration_ (const ::xercesc::DOMDocument& doc,
577  {
578  if (f & ::xml_schema::flags::keep_dom)
579  {
580  ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
581  static_cast< ::xercesc::DOMDocument* > (doc.cloneNode (true)));
582 
583  return ::std::unique_ptr< ::asr_object_database::configuration > (
585  std::move (d), f | ::xml_schema::flags::own_dom, p));
586  }
587 
588  const ::xercesc::DOMElement& e (*doc.getDocumentElement ());
589  const ::xsd::cxx::xml::qualified_name< char > n (
590  ::xsd::cxx::xml::dom::name< char > (e));
591 
592  if (n.name () == "configuration" &&
593  n.namespace_ () == "http://xml.ralfschleicher.de/asr_object_database/")
594  {
595  ::std::unique_ptr< ::asr_object_database::configuration > r (
596  ::xsd::cxx::tree::traits< ::asr_object_database::configuration, char >::create (
597  e, f, 0));
598  return r;
599  }
600 
601  throw ::xsd::cxx::tree::unexpected_element < char > (
602  n.name (),
603  n.namespace_ (),
604  "configuration",
605  "http://xml.ralfschleicher.de/asr_object_database/");
606  }
607 
608  ::std::unique_ptr< ::asr_object_database::configuration >
609  configuration_ (::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d,
612  {
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))
617  : 0);
618 
619  ::xercesc::DOMDocument& doc (c.get () ? *c : *d);
620  const ::xercesc::DOMElement& e (*doc.getDocumentElement ());
621 
622  const ::xsd::cxx::xml::qualified_name< char > n (
623  ::xsd::cxx::xml::dom::name< char > (e));
624 
625  if (f & ::xml_schema::flags::keep_dom)
626  doc.setUserData (::xml_schema::dom::tree_node_key,
627  (c.get () ? &c : &d),
628  0);
629 
630  if (n.name () == "configuration" &&
631  n.namespace_ () == "http://xml.ralfschleicher.de/asr_object_database/")
632  {
633  ::std::unique_ptr< ::asr_object_database::configuration > r (
634  ::xsd::cxx::tree::traits< ::asr_object_database::configuration, char >::create (
635  e, f, 0));
636  return r;
637  }
638 
639  throw ::xsd::cxx::tree::unexpected_element < char > (
640  n.name (),
641  n.namespace_ (),
642  "configuration",
643  "http://xml.ralfschleicher.de/asr_object_database/");
644  }
645 }
646 
647 #include <xsd/cxx/post.hxx>
648 
649 // Begin epilogue.
650 //
651 //
652 // End epilogue.
653 
d
database & operator=(const database &x)
const objectDbRootFolder_type & objectDbRootFolder() const
::xsd::cxx::tree::type type
::xsd::cxx::tree::type container
void parse(::xsd::cxx::xml::dom::parser< char > &, ::xml_schema::flags)
::xsd::cxx::tree::flags flags
::xml_schema::string objectDbRootFolder_type
const database_sequence & database() const
::xsd::cxx::tree::one< objectDbRootFolder_type > objectDbRootFolder_
const uniqueName_type & uniqueName() const
database(const uniqueName_type &, const basenameMatchPattern_type &, const objectDbRootFolder_type &)
::xsd::cxx::tree::one< uniqueName_type > uniqueName_
configuration & operator=(const configuration &x)
void parse(::xsd::cxx::xml::dom::parser< char > &, ::xml_schema::flags)
::xsd::cxx::tree::properties< char > properties
const XMLCh *const tree_node_key
::xsd::cxx::tree::string< char, simple_type > string
::std::unique_ptr< ::asr_object_database::configuration > configuration_(::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d, ::xml_schema::flags f, const ::xml_schema::properties &)
virtual configuration * _clone(::xml_schema::flags f=0, ::xml_schema::container *c=0) const
::xsd::cxx::xml::error_handler< char > error_handler
::xsd::cxx::tree::one< basenameMatchPattern_type > basenameMatchPattern_
::std::unique_ptr< ::asr_object_database::configuration > configuration_(const ::std::string &u, ::xml_schema::flags f, const ::xml_schema::properties &p)
r
virtual database * _clone(::xml_schema::flags f=0, ::xml_schema::container *c=0) const
::xsd::cxx::tree::sequence< database_type > database_sequence
::xml_schema::string basenameMatchPattern_type
const basenameMatchPattern_type & basenameMatchPattern() const


asr_object_database
Author(s): Allgeyer Tobias, Aumann Florian, Borella Jocelyn, Braun Kai, Heizmann Heinrich, Heller Florian, Kasper Alexander, Marek Felix, Mehlhaus Jonas, Meißner Pascal, Schleicher Ralf, Stöckle Patrick, Walter Milena
autogenerated on Mon Feb 28 2022 21:49:21