![]() |
VR-Forces 4.0.4 Class Documentation
|
Instances of DtVrfObjectPredicate are used to evaluate a condition, given a DtVrfObject as an argument. More...

Public Member Functions | |
| DtVrfObjectPredicate (bool negate=false) | |
| constructor | |
| virtual | ~DtVrfObjectPredicate () |
| destructor | |
| DtVrfObjectPredicate (const DtVrfObjectPredicate &orig) | |
| copy constructor | |
| DtVrfObjectPredicate & | operator= (const DtVrfObjectPredicate &orig) |
| assignment operator | |
| virtual DtVrfObjectPredicate * | clone () const =0 |
| clone function | |
| bool | operator== (const DtVrfObjectPredicate &orig) const |
| Equality operators used to compare predicates. | |
| bool | operator!= (const DtVrfObjectPredicate &orig) const |
| virtual bool | negated () const |
| virtual void | setNegate (bool negate) |
| bool | isTrue (const DtVrfObject *vrfObject) |
| This function evaluates the eval function (to be defined in derived classes) given a DtVrfObject and returns the result, negated if indicated. | |
Static Public Member Functions | |
| static const DtVrfObjectPredicate & | nullPredicate () |
| Returns an instance of a DtNullVrfObjectPredicate. | |
Protected Member Functions | |
| virtual bool | eval (const DtVrfObject *vrfObject)=0 |
| The actual test to be applied. | |
| virtual bool | predicateEqual (const DtVrfObjectPredicate &orig) const |
| Test if this instance of a predicate is equal to another. | |
Protected Attributes | |
| bool | myNegated |
Instances of DtVrfObjectPredicate are used to evaluate a condition, given a DtVrfObject as an argument.
| DtVrfObjectPredicate::DtVrfObjectPredicate | ( | bool | negate = false | ) |
constructor
| virtual DtVrfObjectPredicate::~DtVrfObjectPredicate | ( | ) | [virtual] |
destructor
| DtVrfObjectPredicate::DtVrfObjectPredicate | ( | const DtVrfObjectPredicate & | orig | ) |
copy constructor
| DtVrfObjectPredicate& DtVrfObjectPredicate::operator= | ( | const DtVrfObjectPredicate & | orig | ) |
assignment operator
| virtual DtVrfObjectPredicate* DtVrfObjectPredicate::clone | ( | ) | const [pure virtual] |
clone function
Implemented in DtObjectTypeEqualPredicate, DtCompositePredicate, DtEchelonIdChangedPredicate, DtFilterFunctionPredicate, DtForceTypePredicate, DtLclVerticesNotEqualPredicate, DtNullVrfObjectPredicate, DtRelVerticesNotEqualPredicate, DtDestroyedPredicate, DtAbleToMovePredicate, DtTaskableSubordinatePredicate, and DtIndependentlyTaskedPredicate.
| bool DtVrfObjectPredicate::operator== | ( | const DtVrfObjectPredicate & | orig | ) | const |
Equality operators used to compare predicates.
Do not attempt to override these. Override predicateEqual() so that the negate functionality can be correctly considered.
| bool DtVrfObjectPredicate::operator!= | ( | const DtVrfObjectPredicate & | orig | ) | const |
| virtual bool DtVrfObjectPredicate::negated | ( | ) | const [virtual] |
| virtual void DtVrfObjectPredicate::setNegate | ( | bool | negate | ) | [virtual] |
| bool DtVrfObjectPredicate::isTrue | ( | const DtVrfObject * | vrfObject | ) |
This function evaluates the eval function (to be defined in derived classes) given a DtVrfObject and returns the result, negated if indicated.
| static const DtVrfObjectPredicate& DtVrfObjectPredicate::nullPredicate | ( | ) | [static] |
Returns an instance of a DtNullVrfObjectPredicate.
| virtual bool DtVrfObjectPredicate::eval | ( | const DtVrfObject * | vrfObject | ) | [protected, pure virtual] |
The actual test to be applied.
Override eval() when creating a concrete predicate.
Implemented in DtCompositePredicate, DtForceTypePredicate, DtEchelonIdChangedPredicate, DtLclVerticesNotEqualPredicate, DtRelVerticesNotEqualPredicate, DtObjectTypeEqualPredicate, DtFilterFunctionPredicate, DtNullVrfObjectPredicate, DtDestroyedPredicate, DtAbleToMovePredicate, and DtIndependentlyTaskedPredicate.
| virtual bool DtVrfObjectPredicate::predicateEqual | ( | const DtVrfObjectPredicate & | orig | ) | const [protected, virtual] |
Test if this instance of a predicate is equal to another.
The callback mechanisms need this to function correctly. Override predicateEqual() when creating a concrete predicate to test any parameters of the predicate. Be sure to call down to the base class implementation to check if the predicates are of the same type and their negated flags are equal. Derived predicates with no parameters do not need to implement this method.
Reimplemented in DtCompositePredicate, DtForceTypePredicate, DtEchelonIdChangedPredicate, DtLclVerticesNotEqualPredicate, DtRelVerticesNotEqualPredicate, DtObjectTypeEqualPredicate, and DtFilterFunctionPredicate.
bool DtVrfObjectPredicate::myNegated [protected] |