BALL  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | List of all members
BALL::KernelPredicate< T > Class Template Reference

Kernel predicate class. More...

#include <BALL/KERNEL/predicate.h>

Inheritance diagram for BALL::KernelPredicate< T >:
BALL::UnaryPredicate< Composite >

Public Member Functions

virtual ~KernelPredicate ()
 
KernelPredicates Kernel predicates

This chapter describes a set of unary predicates acting on Composite instances, that can be used to identify the class type of a composite at runtime.

This predicates are functionally similar to the RTTI:isKindOf function. They decide whether a given composite is an instance of a certain class (or of a class derived thereof). For instance, the application of a MoleculePredicate to a composite will yield true, if the given composite was an instance of Molecule (or Protein , as Protein is derived from Molecule). Otherwise false is returned.
Each KernelPredicate possesses three methods:

-operator (const Composite&) -operator (const Composite&) const

The two operators are functionally identical (two methods are needed, because the class is derived from TUnaryPredicate and we want to make sure both methods are overwritten). operator() returns true, if the given composite is a kind of the class corresponding to the respective predicate, false otherwise.

See Also
UnaryPredicate
RTTI
virtual bool operator() (const Composite &composite) const
 Constant virtual RTTI evaluation operator. More...
 
- Public Member Functions inherited from BALL::UnaryPredicate< Composite >
virtual ~UnaryPredicate ()
 

Detailed Description

template<class T>
class BALL::KernelPredicate< T >

Kernel predicate class.

Definition at line 57 of file KERNEL/predicate.h.

Constructor & Destructor Documentation

template<class T >
virtual BALL::KernelPredicate< T >::~KernelPredicate ( )
inlinevirtual

Definition at line 64 of file KERNEL/predicate.h.

Member Function Documentation

template<class T >
bool BALL::KernelPredicate< T >::operator() ( const Composite composite) const
virtual

Constant virtual RTTI evaluation operator.

Reimplemented from BALL::UnaryPredicate< Composite >.

Definition at line 68 of file KERNEL/predicate.h.