summaryrefslogtreecommitdiff
path: root/examples/cxx/tree/custom/wildcard/wildcard-custom.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2009-09-17 07:15:29 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2009-09-17 07:15:29 +0200
commitf0510d2f90467de8e8f260b47d79a9baaf9bef17 (patch)
tree0b9929946f06a9cbe9b9e8f2a7600dae4e048f79 /examples/cxx/tree/custom/wildcard/wildcard-custom.hxx
Start tracking XSD with git
Diffstat (limited to 'examples/cxx/tree/custom/wildcard/wildcard-custom.hxx')
-rw-r--r--examples/cxx/tree/custom/wildcard/wildcard-custom.hxx67
1 files changed, 67 insertions, 0 deletions
diff --git a/examples/cxx/tree/custom/wildcard/wildcard-custom.hxx b/examples/cxx/tree/custom/wildcard/wildcard-custom.hxx
new file mode 100644
index 0000000..2c58cc8
--- /dev/null
+++ b/examples/cxx/tree/custom/wildcard/wildcard-custom.hxx
@@ -0,0 +1,67 @@
+// file : examples/cxx/tree/custom/wildcard/wildcard-custom.hxx
+// author : Boris Kolpackov <boris@codesynthesis.com>
+// copyright : not copyrighted - public domain
+
+// Do not include this file directly, use wildcard.hxx instead. This
+// file is included into generated wildcard.hxx so we do not need to
+// guard against multiple inclusions.
+//
+
+namespace wildcard
+{
+ class data: public data_base
+ {
+ // Standard constructors.
+ //
+ public:
+ data (const xml_schema::string&);
+
+ data (const xercesc::DOMElement&,
+ xml_schema::flags = 0,
+ xml_schema::container* = 0);
+
+ data (const data&,
+ xml_schema::flags = 0,
+ xml_schema::container* = 0);
+
+ virtual data*
+ _clone (xml_schema::flags = 0,
+ xml_schema::container* = 0) const;
+
+ // Our customizations.
+ //
+ public:
+ bool
+ scope_present () const
+ {
+ return scope_present_;
+ }
+
+ const xml_schema::string&
+ scope () const
+ {
+ return scope_;
+ }
+
+ void
+ scope (const xml_schema::string& s)
+ {
+ scope_present_ = true;
+ scope_ = s;
+ }
+
+ private:
+ bool scope_present_;
+ xml_schema::string scope_;
+ };
+
+ // Serialization operator.
+ //
+ void
+ operator<< (xercesc::DOMElement&, const data&);
+
+ // std::ostream insertion operator.
+ //
+ std::ostream&
+ operator<< (std::ostream&, const data&);
+}