![]() |
VR-Forces Developer's Guide
|
Contains the DtVrfObjectPredicate class declaration.
Instances of DtVrfObjectPredicate are used to evaluate a condition, given a DtVrfObject as an argument.

Public Member Functions | |
| DtVrfObjectPredicate (bool negate=false) | |
| virtual | ~DtVrfObjectPredicate () |
| DtVrfObjectPredicate (const DtVrfObjectPredicate &orig) | |
| DtVrfObjectPredicate & | operator= (const DtVrfObjectPredicate &orig) |
| virtual DtVrfObjectPredicate * | clone () const =0 |
| bool | operator== (const DtVrfObjectPredicate &orig) const |
| bool | operator!= (const DtVrfObjectPredicate &orig) const |
| virtual bool | negated () const |
| virtual void | setNegate (bool negate) |
| bool | isTrue (const DtSimObject *vrfObject) const |
| virtual bool | canBeTrue (const DtSimObject *vrfObject) |
| virtual bool | canBeFalse (const DtSimObject *vrfObject) |
| virtual void | stringRep (std::ostream &str, int indentLevel=0) const |
Static Public Member Functions | |
| static const DtVrfObjectPredicate & | nullPredicate () |
Protected Member Functions | |
| virtual bool | eval (const DtSimObject *vrfObject) const =0 |
| virtual bool | predicateEqual (const DtVrfObjectPredicate &orig) const |
| virtual bool | canEvalTrue (const DtSimObject *vrfObject) const |
| virtual bool | canEvalFalse (const DtSimObject *vrfObject) const |
| virtual void | typeSpecificStringRep (std::ostream &str, int indentLevel) const |
Protected Attributes | |
| bool | myNegated |
| DtVrfObjectPredicate::DtVrfObjectPredicate | ( | bool | negate = false | ) |
constructor
|
virtual |
destructor
| DtVrfObjectPredicate::DtVrfObjectPredicate | ( | const DtVrfObjectPredicate & | orig | ) |
copy constructor
| DtVrfObjectPredicate& DtVrfObjectPredicate::operator= | ( | const DtVrfObjectPredicate & | orig | ) |
assignment operator
|
pure virtual |
clone function
Implemented in DtObjecKindLE, DtEchelonIdChangedPredicate, DtForceTypePredicate, DtNullVrfObjectPredicate, DtCompositePredicate, DtEntityTypeEqualPredicate, DtDestroyedPredicate, DtFilterFunctionPredicate, DtAbleToMovePredicate, DtIndependentlyTaskedPredicate, DtOverlayLayersPredicate, DtEngineeringObjEffectivePredicate, DtFormationableSubordinatePredicate, DtTaskableSubordinatePredicate, DtEmbarkedOnPredicate, DtJoystickMovementControlledPredicate, DtIsVrfSimulatedPredicate, and DtAggregateSpatialModelPredicate.
| 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 |
|
virtual |
| bool DtVrfObjectPredicate::isTrue | ( | const DtSimObject * | vrfObject | ) | const |
This function evaluates the eval function (to be defined in derived classes) given a DtSimObject and returns the result, negated if indicated.
|
virtual |
|
virtual |
|
virtual |
|
static |
Returns an instance of a DtNullVrfObjectPredicate.
|
protectedpure virtual |
The actual test to be applied. Override eval() when creating a concrete predicate.
Implemented in DtObjecKindLE, DtForceTypePredicate, DtCompositePredicate, DtEchelonIdChangedPredicate, DtEntityTypeEqualPredicate, DtNullVrfObjectPredicate, DtOverlayLayersPredicate, DtFilterFunctionPredicate, DtDestroyedPredicate, DtAbleToMovePredicate, DtIndependentlyTaskedPredicate, DtEngineeringObjEffectivePredicate, DtEmbarkedOnPredicate, DtJoystickMovementControlledPredicate, and DtIsVrfSimulatedPredicate.
|
protectedvirtual |
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 DtObjecKindLE, DtForceTypePredicate, DtCompositePredicate, DtEchelonIdChangedPredicate, DtEntityTypeEqualPredicate, DtOverlayLayersPredicate, DtFilterFunctionPredicate, and DtEngineeringObjEffectivePredicate.
|
inlineprotectedvirtual |
Reimplemented in DtCompositePredicate, DtEntityTypeEqualPredicate, and DtOverlayLayersPredicate.
|
inlineprotectedvirtual |
Reimplemented in DtCompositePredicate, DtEntityTypeEqualPredicate, and DtOverlayLayersPredicate.
|
protectedvirtual |
Override in specific subclasses to print the predicate description to the stream.
Reimplemented in DtObjecKindLE, DtCompositePredicate, DtForceTypePredicate, DtEntityTypeEqualPredicate, DtOverlayLayersPredicate, DtFilterFunctionPredicate, and DtDestroyedPredicate.
|
protected |