12 Cut<Type>::Cut(
const Cut<Type> & ) {}
18 typename Cut<Type>::OR Cut<Type>::operator || (
const Cut<Type> & A)
const {
23 typename Cut<Type>::AND Cut<Type>::operator && (
const Cut<Type> & A)
const {
28 typename Cut<Type>::NOT Cut<Type>::operator ! ()
const {
38 Cut<Type>::AND::AND(
const AND & right):Cut<Type>(),
39 _pA(right._pA->clone()),
40 _pB(right._pB->clone())
46 Cut<Type>::AND::AND(
const Cut<Type> & A,
const Cut<Type> & B):Cut<Type>(),
53 Cut<Type>::AND::~AND()
61 typename Cut<Type>::AND *Cut<Type>::AND::clone()
const 63 return new AND(*
this);
67 bool Cut<Type>::AND::operator () (
const Type & t)
const {
68 return _pA->operator()(t) && _pB->operator()(t);
78 Cut<Type>::OR::OR(
const OR & right):Cut<Type>(),
79 _pA(right._pA->clone()),
80 _pB(right._pB->clone())
86 Cut<Type>::OR::OR(
const Cut<Type> & A,
const Cut<Type> & B):Cut<Type>(),
100 template <
class Type>
101 typename Cut<Type>::OR *Cut<Type>::OR::clone()
const 103 return new OR(*
this);
106 template <
class Type>
107 bool Cut<Type>::OR::operator () (
const Type & t)
const {
108 return _pA->operator()(t) || _pB->operator()(t);
118 template <
class Type>
119 Cut<Type>::NOT::NOT(
const NOT & right):Cut<Type>(),
120 _pA(right._pA->clone())
125 template <
class Type>
126 Cut<Type>::NOT::NOT(
const Cut<Type> & A):Cut<Type>(),
131 template <
class Type>
132 Cut<Type>::NOT::~NOT()
138 template <
class Type>
139 typename Cut<Type>::NOT *Cut<Type>::NOT::clone()
const 141 return new NOT(*
this);
144 template <
class Type>
145 bool Cut<Type>::NOT::operator () (
const Type & t)
const {
146 return !_pA->operator()(t);
159 template <
class Type>
160 Cut<Type>::Predicate::Predicate(
const Predicate & right):
161 _pA(right._pA->clone())
166 template <
class Type>
167 Cut<Type>::Predicate::Predicate(
const Cut<Type> & A):
172 template <
class Type>
173 Cut<Type>::Predicate::~Predicate()
179 template <
class Type>
180 typename Cut<Type>::Predicate *Cut<Type>::Predicate::clone()
const 182 return new Predicate(*
this);
185 template <
class Type>
186 bool Cut<Type>::Predicate::operator () (
const Type & t)
const {
187 return _pA->operator()(t);