Main Page | Modules | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members

NumberOfBondsPredicate Class Reference

Predicate class for atoms bearing a certain number of bonds. More...

#include <standardPredicates.h>

Inheritance diagram for NumberOfBondsPredicate:

ExpressionPredicate UnaryPredicate< Atom > AromaticBondsPredicate DoubleBondsPredicate SingleBondsPredicate TripleBondsPredicate List of all members.

Public Member Functions

 NumberOfBondsPredicate () throw ()
 Default constructor.
virtual bool operator() (const Atom &atom) const throw ()
 Evaluate the predicate for the atom atom.

Protected Member Functions

bool testPredicate_ (const Atom &atom, Bond::Order order) const throw ()

Detailed Description

Predicate class for atoms bearing a certain number of bonds.

Arguments of this class are required to consist of an relational operator and a number between 1 and 8. The default is ">0" which means that the atom under siege has to bear at least one bond to make this predicate's operator () () return true.


Member Function Documentation

virtual bool NumberOfBondsPredicate::operator() const Atom atom  )  const throw () [virtual]
 

Evaluate the predicate for the atom atom.

Parameters:
atom the atom to test
Returns:
true, if the predicate is true, false otherwise

Reimplemented from ExpressionPredicate.

Reimplemented in SingleBondsPredicate, DoubleBondsPredicate, TripleBondsPredicate, and AromaticBondsPredicate.