Re: Decision Tables
- From: Ben Bacarisse <ben.usenet@xxxxxxxxx>
- Date: Wed, 30 Jan 2008 00:11:57 +0000
kwikius <andy@xxxxxxxxxxxxxxxxxxxxxxxxx> writes:
<snip most of the code, but it enables this:>
int main()
{
D d1("John","Smith","England");
D d2("John","Jones","England");
typedef Dpred<&D::first_name> d_first_name;
typedef Dpred<&D::last_name> d_last_name;
typedef Dpred<&D::country> d_country;
std::cout << (d_first_name(d1,d2) && d_last_name(d1,d2) &&
d_country(d1,d2)) << '\n';
d_first_name first_name(d1,d2);
d_last_name last_name(d1,d2);
d_country country(d1,d2);
std::cout << (first_name && (last_name || country)) << '\n';
std::cout << (first_name && !last_name && country) << '\n';
}
I may be missing your point, but I *think* the OP wanted a way to
"store" (or at least represent) compound predicates which can the be
evaluated against an unknown data item. I don't think your example
shows this.
--
Ben.
.
- Follow-Ups:
- Re: Decision Tables
- From: kwikius
- Re: Decision Tables
- References:
- Decision Tables
- From: Leslie Sanford
- Re: Decision Tables
- From: Ben Bacarisse
- Re: Decision Tables
- From: kwikius
- Re: Decision Tables
- From: kwikius
- Decision Tables
- Prev by Date: Re: Decision Tables
- Next by Date: Re: Decision Tables
- Previous by thread: Re: Decision Tables
- Next by thread: Re: Decision Tables
- Index(es):
Relevant Pages
|