blob: 6e7bcd3a31983117faa4266ce9ed64598784e25f (
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
|
// file : examples/cxx/hybrid/filter/people-custom-simpl.cxx
// 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;
}
|