VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
DtVrfObjectPredicate Class Reference

Instances of DtVrfObjectPredicate are used to evaluate a condition, given a DtVrfObject as an argument. More...

Inheritance diagram for DtVrfObjectPredicate:
Inheritance graph
[legend]

Public Member Functions

 DtVrfObjectPredicate (bool negate=false)
 constructor
virtual ~DtVrfObjectPredicate ()
 destructor
 DtVrfObjectPredicate (const DtVrfObjectPredicate &orig)
 copy constructor
DtVrfObjectPredicateoperator= (const DtVrfObjectPredicate &orig)
 assignment operator
virtual DtVrfObjectPredicateclone () 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.
virtual bool canBeTrue (const DtVrfObject *vrfObject)
virtual bool canBeFalse (const DtVrfObject *vrfObject)
virtual void stringRep (std::ostream &str, int indentLevel=0) const

Static Public Member Functions

static const DtVrfObjectPredicatenullPredicate ()
 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.
virtual bool canEvalTrue (const DtVrfObject *vrfObject)
virtual bool canEvalFalse (const DtVrfObject *vrfObject)
virtual void typeSpecificStringRep (std::ostream &str, int indentLevel) const
 Override in specific subclasses to print the predicate description to the stream.

Protected Attributes

bool myNegated

Detailed Description

Instances of DtVrfObjectPredicate are used to evaluate a condition, given a DtVrfObject as an argument.

Constructor & Destructor Documentation

DtVrfObjectPredicate::DtVrfObjectPredicate ( bool  negate = false)

constructor

virtual DtVrfObjectPredicate::~DtVrfObjectPredicate ( )
virtual

destructor

DtVrfObjectPredicate::DtVrfObjectPredicate ( const DtVrfObjectPredicate orig)

copy constructor

Member Function Documentation

DtVrfObjectPredicate& DtVrfObjectPredicate::operator= ( const DtVrfObjectPredicate orig)

assignment operator

virtual DtVrfObjectPredicate* DtVrfObjectPredicate::clone ( ) const
pure virtual
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.

virtual bool DtVrfObjectPredicate::canBeTrue ( const DtVrfObject vrfObject)
virtual
Returns
True if this predicate can return true in any cases.
virtual bool DtVrfObjectPredicate::canBeFalse ( const DtVrfObject vrfObject)
virtual
Returns
True if this predicate can return false in any cases.
virtual void DtVrfObjectPredicate::stringRep ( std::ostream &  str,
int  indentLevel = 0 
) const
virtual
static const DtVrfObjectPredicate& DtVrfObjectPredicate::nullPredicate ( )
static

Returns an instance of a DtNullVrfObjectPredicate.

virtual bool DtVrfObjectPredicate::eval ( const DtVrfObject vrfObject)
protectedpure virtual
virtual bool DtVrfObjectPredicate::predicateEqual ( const DtVrfObjectPredicate orig) const
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.

Returns
True when the predicates are of the same type (using typeid())and their negated flags are equal.

Reimplemented in DtCompositePredicate, DtForceTypePredicate, DtEchelonIdChangedPredicate, DtLclVerticesNotEqualPredicate, DtRelVerticesNotEqualPredicate, DtObjectTypeEqualPredicate, DtFilterFunctionPredicate, and DtEngineeringObjEffectivePredicate.

virtual bool DtVrfObjectPredicate::canEvalTrue ( const DtVrfObject vrfObject)
inlineprotectedvirtual
Returns
true if this predicate's eval() function can ever return true. If predicate subclass tests a static property of an object, override this function to return appropriately.

Reimplemented in DtCompositePredicate, and DtObjectTypeEqualPredicate.

virtual bool DtVrfObjectPredicate::canEvalFalse ( const DtVrfObject vrfObject)
inlineprotectedvirtual
Returns
true if this predicate's eval() function can ever return false. If predicate subclass tests a static property of an object, override this function to return appropriately.

Reimplemented in DtCompositePredicate, and DtObjectTypeEqualPredicate.

virtual void DtVrfObjectPredicate::typeSpecificStringRep ( std::ostream &  str,
int  indentLevel 
) const
protectedvirtual

Override in specific subclasses to print the predicate description to the stream.

Reimplemented in DtCompositePredicate, DtObjectTypeEqualPredicate, DtForceTypePredicate, DtFilterFunctionPredicate, and DtDestroyedPredicate.

Member Data Documentation

bool DtVrfObjectPredicate::myNegated
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)