summaryrefslogtreecommitdiff
path: root/xsd/examples/cxx/parser/polymorphism/supermen-pimpl.hxx
diff options
context:
space:
mode:
authorJörg Frings-Fürst <jff@merkur>2014-05-18 16:08:14 +0200
committerJörg Frings-Fürst <jff@merkur>2014-05-18 16:08:14 +0200
commita15cf65c44d5c224169c32ef5495b68c758134b7 (patch)
tree3419f58fc8e1b315ba8171910ee044c5d467c162 /xsd/examples/cxx/parser/polymorphism/supermen-pimpl.hxx
Imported Upstream version 3.3.0.2upstream/3.3.0.2
Diffstat (limited to 'xsd/examples/cxx/parser/polymorphism/supermen-pimpl.hxx')
-rw-r--r--xsd/examples/cxx/parser/polymorphism/supermen-pimpl.hxx69
1 files changed, 69 insertions, 0 deletions
diff --git a/xsd/examples/cxx/parser/polymorphism/supermen-pimpl.hxx b/xsd/examples/cxx/parser/polymorphism/supermen-pimpl.hxx
new file mode 100644
index 0000000..3c0f549
--- /dev/null
+++ b/xsd/examples/cxx/parser/polymorphism/supermen-pimpl.hxx
@@ -0,0 +1,69 @@
+// file : examples/cxx/parser/polymorphism/supermen-pimpl.hxx
+// author : Boris Kolpackov <boris@codesynthesis.com>
+// copyright : not copyrighted - public domain
+
+#ifndef SUPERMEN_PIMPL_HXX
+#define SUPERMEN_PIMPL_HXX
+
+#include "supermen-pskel.hxx"
+
+class person_pimpl: public virtual person_pskel
+{
+public:
+ virtual void
+ pre ();
+
+ virtual void
+ name (const std::string&);
+
+ virtual void
+ post_person ();
+};
+
+class superman_pimpl: public virtual superman_pskel,
+ public person_pimpl
+{
+public:
+ virtual void
+ pre ();
+
+ virtual void
+ can_fly (bool);
+
+ // By default, post_superman() calls post_person(). In case of
+ // polymorphic parsing we want the opposite: post_person() calls
+ // post_superman().
+ //
+ virtual void
+ post_person ();
+
+ virtual void
+ post_superman ();
+};
+
+class batman_pimpl: public virtual batman_pskel,
+ public superman_pimpl
+{
+public:
+ virtual void
+ pre ();
+
+ virtual void
+ wing_span (unsigned int);
+
+ // By default, post_batman() calls post_superman(). In case of
+ // polymorphic parsing we want the opposite: post_superman()
+ // calls post_batman().
+ //
+ virtual void
+ post_superman ();
+
+ virtual void
+ post_batman ();
+};
+
+class supermen_pimpl: public supermen_pskel
+{
+};
+
+#endif // SUPERMEN_PIMPL_HXX