#include <boolterm.hh>
Inheritance diagram for RVLAlg::AndTerminator:
Public Member Functions | |
AndTerminator (Terminator &a, Terminator &b) | |
~AndTerminator () | |
virtual bool | query () |
Protected Attributes | |
Terminator & | first |
Terminator & | second |
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.
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.
virtual bool RVLAlg::AndTerminator::query | ( | ) | [virtual] |
Implements RVLAlg::Terminator.
Definition at line 84 of file boolterm.hh.
References first, RVLAlg::Terminator::query(), and second.
Terminator& RVLAlg::AndTerminator::first [protected] |
Terminator& RVLAlg::AndTerminator::second [protected] |