diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2009-02-24 15:16:26 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2009-02-24 15:16:26 +0200 |
commit | 707cc94fe52463870a9c6c8e2e66eaaa389e601d (patch) | |
tree | 13e10ff28bf4455d915f9d59b401bdbb62a393cb /examples/cxx/hybrid/filter/people-custom-pimpl.cxx |
Start tracking XSD/e with git after version 3.0.03.0.0
Diffstat (limited to 'examples/cxx/hybrid/filter/people-custom-pimpl.cxx')
-rw-r--r-- | examples/cxx/hybrid/filter/people-custom-pimpl.cxx | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/examples/cxx/hybrid/filter/people-custom-pimpl.cxx b/examples/cxx/hybrid/filter/people-custom-pimpl.cxx new file mode 100644 index 0000000..e8a096f --- /dev/null +++ b/examples/cxx/hybrid/filter/people-custom-pimpl.cxx @@ -0,0 +1,26 @@ +// file : examples/cxx/hybrid/filter/people-custom-pimpl.cxx +// author : Boris Kolpackov <boris@codesynthesis.com> +// copyright : not copyrighted - public domain + +// Include people-pimpl.hxx (which includes people-custom-pimpl.hxx) +// instead of people-custom-pimpl.hxx. +// +#include "people-pimpl.hxx" + +void people_pimpl:: +age_filter (unsigned short min, unsigned short max) +{ + min_age_ = min; + max_age_ = max; +} + +void people_pimpl:: +person (const ::person& p) +{ + // Check if the age constraints are met. + // + unsigned short age = p.age (); + + if (age >= min_age_ && age <= max_age_) + people_base_pimpl::person (p); +} |