From 707cc94fe52463870a9c6c8e2e66eaaa389e601d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 24 Feb 2009 15:16:26 +0200 Subject: Start tracking XSD/e with git after version 3.0.0 --- .../polymorphism/supermen-simpl-tiein.hxx | 69 ++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 examples/cxx/serializer/polymorphism/supermen-simpl-tiein.hxx (limited to 'examples/cxx/serializer/polymorphism/supermen-simpl-tiein.hxx') diff --git a/examples/cxx/serializer/polymorphism/supermen-simpl-tiein.hxx b/examples/cxx/serializer/polymorphism/supermen-simpl-tiein.hxx new file mode 100644 index 0000000..806d017 --- /dev/null +++ b/examples/cxx/serializer/polymorphism/supermen-simpl-tiein.hxx @@ -0,0 +1,69 @@ +// file : examples/cxx/serializer/polymorphism/supermen-simpl-tiein.hxx +// author : Boris Kolpackov +// copyright : not copyrighted - public domain + +#ifndef SUPERMEN_SIMPL_HXX +#define SUPERMEN_SIMPL_HXX + +#include "supermen.hxx" +#include "supermen-sskel.hxx" + +struct person_simpl: person_sskel +{ + virtual void + pre (const person&); + + virtual std::string + name (); + + // Derived serializers need access to this variable. + // +public: + const person* person_; +}; + +struct superman_simpl: superman_sskel +{ + superman_simpl (); + + virtual bool + can_fly (); + + const superman& + superman_ (); + +private: + person_simpl base_impl_; +}; + +struct batman_simpl: batman_sskel +{ + batman_simpl (); + + virtual unsigned int + wing_span (); + + const batman& + batman_ (); + +private: + superman_simpl base_impl_; +}; + +struct supermen_simpl: supermen_sskel +{ + virtual void + pre (const supermen&); + + virtual bool + person_next (); + + virtual const ::person& + person (); + +private: + const supermen* supermen_; + supermen::const_iterator i_; +}; + +#endif // SUPERMEN_SIMPL_HXX -- cgit v1.1