aboutsummaryrefslogtreecommitdiff
path: root/examples/cxx/serializer/polyroot/supermen-simpl-mixin.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2009-02-24 15:16:26 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2009-02-24 15:16:26 +0200
commit707cc94fe52463870a9c6c8e2e66eaaa389e601d (patch)
tree13e10ff28bf4455d915f9d59b401bdbb62a393cb /examples/cxx/serializer/polyroot/supermen-simpl-mixin.cxx
Start tracking XSD/e with git after version 3.0.03.0.0
Diffstat (limited to 'examples/cxx/serializer/polyroot/supermen-simpl-mixin.cxx')
-rw-r--r--examples/cxx/serializer/polyroot/supermen-simpl-mixin.cxx35
1 files changed, 35 insertions, 0 deletions
diff --git a/examples/cxx/serializer/polyroot/supermen-simpl-mixin.cxx b/examples/cxx/serializer/polyroot/supermen-simpl-mixin.cxx
new file mode 100644
index 0000000..b6ea058
--- /dev/null
+++ b/examples/cxx/serializer/polyroot/supermen-simpl-mixin.cxx
@@ -0,0 +1,35 @@
+// file : examples/cxx/serializer/polyroot/supermen-simpl-mixin.cxx
+// author : Boris Kolpackov <boris@codesynthesis.com>
+// copyright : not copyrighted - public domain
+
+#include "supermen-simpl-mixin.hxx"
+
+//
+//
+void person_simpl::
+pre (const person& p)
+{
+ person_ = &p;
+}
+
+std::string person_simpl::
+name ()
+{
+ return person_->name ();
+}
+
+//
+//
+bool superman_simpl::
+can_fly ()
+{
+ return static_cast<const superman*> (person_)->can_fly ();
+}
+
+//
+//
+unsigned int batman_simpl::
+wing_span ()
+{
+ return static_cast<const batman*> (person_)->wing_span ();
+}