Skip to content
Sections
Personal tools
You are here: Home » BALLView » Documentation » 1.2 » group__Predicates_html

Kernel Predicates
[Kernel Classes]


Classes

class BALL::Expression
Expression class. More...
class BALL::ExpressionPredicate
ExpressionPredicate. More...
class BALL::Selector
Atom Selection from Regular Expression. More...
class BALL::TruePredicate
Default predicate. More...

KernelPredicates Kernel predicates

This chapter describes a set of unary predicates acting on 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



typedef UnaryPredicate< Composite > KernelPredicateType
 
 

Powered by Plone

This site conforms to the following standards: