diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2024-03-06 10:24:46 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2024-03-06 10:24:46 +0100 |
commit | 372a0e99c2f61543d9e14d9933b59d9d1f4cb26e (patch) | |
tree | bbadf39aed0610c8f8f7b41fefff47773b8ac205 /xsd/examples/cxx/tree/custom/wildcard/wildcard-custom.cxx | |
parent | 23d41842168ac1a1580111b9c5c73500ceee3d57 (diff) | |
parent | 4538829ab86b5a1cd4e845e7eab165029c9d6d46 (diff) |
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'xsd/examples/cxx/tree/custom/wildcard/wildcard-custom.cxx')
-rw-r--r-- | xsd/examples/cxx/tree/custom/wildcard/wildcard-custom.cxx | 84 |
1 files changed, 0 insertions, 84 deletions
diff --git a/xsd/examples/cxx/tree/custom/wildcard/wildcard-custom.cxx b/xsd/examples/cxx/tree/custom/wildcard/wildcard-custom.cxx deleted file mode 100644 index 006f93a..0000000 --- a/xsd/examples/cxx/tree/custom/wildcard/wildcard-custom.cxx +++ /dev/null @@ -1,84 +0,0 @@ -// file : examples/cxx/tree/custom/wildcard/wildcard-custom.cxx -// copyright : not copyrighted - public domain - -#include <ostream> - -// Include wildcard.hxx instead of wildcard-custom.hxx here. -// -#include "wildcard.hxx" - -namespace wildcard -{ - data:: - data (const xml_schema::string& d) - : data_base (d), scope_present_ (false) - { - } - - data:: - data (const xercesc::DOMElement& e, - xml_schema::flags f, - xml_schema::container* c) - : data_base (e, f, c), scope_present_ (false) - { - // Check if we've got the scope attribute. - // - namespace xml = xsd::cxx::xml; - xml::string name ("scope"); - - if (e.hasAttribute (name.c_str ())) - { - scope (xml::transcode<char> (e.getAttribute (name.c_str ()))); - } - } - - data:: - data (const data& d, - xml_schema::flags f, - xml_schema::container* c) - : data_base (d, f, c), - scope_present_ (d.scope_present_), - scope_ (d.scope_) - { - } - - data* data:: - _clone (xml_schema::flags f, xml_schema::container* c) const - { - return new data (*this, f, c); - } - - void - operator<< (xercesc::DOMElement& e, const data& x) - { - // Use our base to serialize data and id. - // - const data_base& b (x); - e << b; - - // Add the scope attribute if present. - // - if (x.scope_present ()) - { - namespace xml = xsd::cxx::xml; - xml::string name ("scope"); - xml::string value (x.scope ()); - - e.setAttribute (name.c_str (), value.c_str ()); - } - } - - std::ostream& - operator<< (std::ostream& os, const data& x) - { - // Use our base to print date and id. - // - const data_base& b (x); - os << b; - - if (x.scope_present ()) - os << std::endl << "scope: " << x.scope (); - - return os; - } -} |