OEUnaryPredicate¶
template<class Arg>
class OEUnaryPredicate : public OEUnaryFunction<Arg,bool>
This class represents OEUnaryPredicate.
This abstract base-class defines predicates in OEChem. Predicates
are a special class of functors which, by convention, has several
restriction. These restrictions make predicates predictable and
reliable. To the degree possible, these restrictions are enforced by
the API. OEUnaryPredicate::CreateCopy
is a virtual
constructor which allows copying of concrete derived objects using a
reference to this base class.
By definition, a predicates is a functor which always return a
boolean. By convention, the
OEUnaryPredicate::operator()
of a predicate does
not modify the object it takes as an argument and itself is not
modified by the evaluation. These conventions guarantee that the
result of a series of predicate evaluations will not be order
dependent.
The following methods are publicly inherited from OEUnaryFunction:
The following atom predicate classes classes derive from this class:
The following bond predicate classes derive from this class:
The following template predicate classes derive from this class:
operator()¶
bool operator()(const Arg &a) const =0
CreateCopy¶
base_type *CreateCopy() const =0
CreatePredicateCopy¶
OEUnaryPredicate<Arg> *CreatePredicateCopy() const