From 5e527213a2430bb3018e5eebd909aef294edf9b5 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 18 Dec 2020 18:48:46 +0300 Subject: Switch to build2 --- .../cxx/parser/polymorphism/supermen-pimpl.hxx | 68 ++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 xsd-examples/cxx/parser/polymorphism/supermen-pimpl.hxx (limited to 'xsd-examples/cxx/parser/polymorphism/supermen-pimpl.hxx') 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..0d103b5 --- /dev/null +++ b/xsd-examples/cxx/parser/polymorphism/supermen-pimpl.hxx @@ -0,0 +1,68 @@ +// file : cxx/parser/polymorphism/supermen-pimpl.hxx +// 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 -- cgit v1.1