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.cxx | 85 ++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 xsd-examples/cxx/parser/polymorphism/supermen-pimpl.cxx (limited to 'xsd-examples/cxx/parser/polymorphism/supermen-pimpl.cxx') diff --git a/xsd-examples/cxx/parser/polymorphism/supermen-pimpl.cxx b/xsd-examples/cxx/parser/polymorphism/supermen-pimpl.cxx new file mode 100644 index 0000000..efed827 --- /dev/null +++ b/xsd-examples/cxx/parser/polymorphism/supermen-pimpl.cxx @@ -0,0 +1,85 @@ +// file : cxx/parser/polymorphism/supermen-pimpl.cxx +// copyright : not copyrighted - public domain +// + +#include + +#include "supermen-pimpl.hxx" + +using std::cout; +using std::endl; + +// person_pimpl +// +void person_pimpl:: +pre () +{ + cout << "starting to parse person" << endl; +} + +void person_pimpl:: +name (const std::string& v) +{ + cout << "name: " << v << endl; +} + +void person_pimpl:: +post_person () +{ + cout << "finished parsing person" << endl + << endl; +} + +// superman_pimpl +// +void superman_pimpl:: +pre () +{ + cout << "starting to parse superman" << endl; +} + +void superman_pimpl:: +can_fly (bool v) +{ + cout << "can-fly: " << v << endl; +} + +void superman_pimpl:: +post_person () +{ + post_superman (); +} + +void superman_pimpl:: +post_superman () +{ + cout << "finished parsing superman" << endl + << endl; +} + +// batman_pimpl +// +void batman_pimpl:: +pre () +{ + cout << "starting to parse batman" << endl; +} + +void batman_pimpl:: +wing_span (unsigned int v) +{ + cout << "wing-span: " << v << endl; +} + +void batman_pimpl:: +post_superman () +{ + post_batman (); +} + +void batman_pimpl:: +post_batman () +{ + cout << "finished parsing batman" << endl + << endl; +} -- cgit v1.1