RVLAlg::AndTerminator Class Reference

Build a new Terminator by combining the results of two others with a logical AND. More...

#include <boolterm.hh>

Inheritance diagram for RVLAlg::AndTerminator:

RVLAlg::Terminator List of all members.

Public Member Functions

 AndTerminator (Terminator &a, Terminator &b)
 ~AndTerminator ()
virtual bool query ()

Protected Attributes

Terminatorfirst
Terminatorsecond

Detailed Description

Build a new Terminator by combining the results of two others with a logical AND.

Currently obeys the short-circuit evaluation behavior in the C++ standard for logical operations. Thus, if the first.query is false (continue looping) then the second query never occurs.

Note that this object does NOT own the other two Terminators, and thus deleting one of them will cause nasty results.

Ideally, it would be nice to have some sort of operator behavior so you could write

term = (A AND B AND C) OR D

where A,B,C,D were all Terminators, but I don't know how to do this yet. Of course, in most cases, one can get the desired results just by combining the query calls with the proper logical operations, but I can forsee cases where we might need to pass a single Terminator into an algorithm, in which case being able to build one out of combinations of others would be useful.

Definition at line 78 of file boolterm.hh.


Constructor & Destructor Documentation

RVLAlg::AndTerminator::AndTerminator ( Terminator a,
Terminator b 
)

Definition at line 81 of file boolterm.hh.

RVLAlg::AndTerminator::~AndTerminator (  ) 

Definition at line 82 of file boolterm.hh.


Member Function Documentation

virtual bool RVLAlg::AndTerminator::query (  )  [virtual]

Implements RVLAlg::Terminator.

Definition at line 84 of file boolterm.hh.

References first, RVLAlg::Terminator::query(), and second.


Member Data Documentation

Terminator& RVLAlg::AndTerminator::first [protected]

Definition at line 89 of file boolterm.hh.

Referenced by query().

Terminator& RVLAlg::AndTerminator::second [protected]

Definition at line 90 of file boolterm.hh.

Referenced by query().


The documentation for this class was generated from the following file:
Generated on 5 Jan 2017 for RvlAlg by  doxygen 1.4.7