aboutsummaryrefslogtreecommitdiff
path: root/examples/cxx/serializer/polyroot/supermen-simpl-mixin.cxx
blob: 68ac06d0d4580b92258dd4255923cdb3e8cbf527 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// file      : examples/cxx/serializer/polyroot/supermen-simpl-mixin.cxx
// copyright : not copyrighted - public domain

#include "supermen-simpl-mixin.hxx"

//
//
void person_simpl::
pre (const person& p)
{
  person_ = &p;
}

std::string person_simpl::
name ()
{
  return person_->name ();
}

//
//
bool superman_simpl::
can_fly ()
{
  return static_cast<const superman*> (person_)->can_fly ();
}

//
//
unsigned int batman_simpl::
wing_span ()
{
  return static_cast<const batman*> (person_)->wing_span ();
}