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-simpl.cxx |
Start tracking XSD/e with git after version 3.0.03.0.0
Diffstat (limited to 'examples/cxx/hybrid/filter/people-custom-simpl.cxx')
-rw-r--r-- | examples/cxx/hybrid/filter/people-custom-simpl.cxx | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/examples/cxx/hybrid/filter/people-custom-simpl.cxx b/examples/cxx/hybrid/filter/people-custom-simpl.cxx new file mode 100644 index 0000000..3e7d9ff --- /dev/null +++ b/examples/cxx/hybrid/filter/people-custom-simpl.cxx @@ -0,0 +1,32 @@ +// file : examples/cxx/hybrid/filter/people-custom-simpl.cxx +// author : Boris Kolpackov <boris@codesynthesis.com> +// copyright : not copyrighted - public domain + +// Include people-simpl.hxx (which includes people-custom-simpl.hxx) +// instead of people-custom-simpl.hxx. +// +#include "people-simpl.hxx" + +void people_simpl:: +gender_filter (gender g) +{ + gender_ = g; +} + +bool people_simpl:: +person_next () +{ + // See if we have any more person records with the gender we + // are interested in. + // + people::person_const_iterator& i = people_base_simpl_state_.person_; + people::person_const_iterator& e = people_base_simpl_state_.person_end_; + + for (; i != e; ++i) + { + if (i->gender () == gender_) + break; + } + + return i != e; +} |