aboutsummaryrefslogtreecommitdiff
path: root/examples/cxx/parser/polyroot/supermen-pimpl-tiein.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'examples/cxx/parser/polyroot/supermen-pimpl-tiein.hxx')
-rw-r--r--examples/cxx/parser/polyroot/supermen-pimpl-tiein.hxx77
1 files changed, 77 insertions, 0 deletions
diff --git a/examples/cxx/parser/polyroot/supermen-pimpl-tiein.hxx b/examples/cxx/parser/polyroot/supermen-pimpl-tiein.hxx
new file mode 100644
index 0000000..41dfe84
--- /dev/null
+++ b/examples/cxx/parser/polyroot/supermen-pimpl-tiein.hxx
@@ -0,0 +1,77 @@
+// file : examples/cxx/parser/polyroot/supermen-pimpl-tiein.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 person_pskel
+{
+public:
+ virtual void
+ pre ();
+
+ virtual void
+ name (const std::string&);
+
+ virtual void
+ post_person ();
+};
+
+class superman_pimpl: public superman_pskel
+{
+public:
+ superman_pimpl ();
+
+ 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 ();
+
+private:
+ person_pimpl base_impl_;
+};
+
+class batman_pimpl: public batman_pskel
+{
+public:
+ batman_pimpl ();
+
+ virtual void
+ pre ();
+
+ virtual void
+ wing_span (unsigned int);
+
+ // By default, post_batman() calls post_superman() which calls
+ // post_person(). In case of polymorphic parsing we want the
+ // opposite: post_person() calls post_superman() which calls
+ // post_batman().
+ //
+ virtual void
+ post_person ();
+
+ virtual void
+ post_superman ();
+
+ virtual void
+ post_batman ();
+
+private:
+ superman_pimpl base_impl_;
+};
+
+#endif // SUPERMEN_PIMPL_HXX