VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
compositePredicate.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2003 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: compositePred.h,v $ $Revision: 1.8 $ $State: Exp $
7 *******************************************************************************/
8 #ifndef compositePredicate_H_
9 #define compositePredicate_H_
10 
13 
15 
17 #include <vlpi/disEnums.h>
18 #include <vlutil/vlHashlist.h>
19 
27 {
28 public:
29 
31  DtCompositePredicate(bool negate = false);
32 
34  virtual ~DtCompositePredicate();
35 
38 
41  const DtCompositePredicate& orig);
42 
44  virtual DtVrfObjectPredicate* clone() const;
45 
47  virtual void addPredicate(const DtVrfObjectPredicate& predicate);
48 
50  virtual void removePredicate(const DtVrfObjectPredicate& predicate);
51 
53  virtual bool hasPredicate(const DtVrfObjectPredicate& predicate) const;
54 
55 protected:
56 
58  virtual bool eval(const DtVrfObject* object);
59 
61  virtual bool predicateEqual(const DtVrfObjectPredicate& orig) const;
62 
64  virtual bool canEvalTrue(const DtVrfObject* vrfObject);
66  virtual bool canEvalFalse(const DtVrfObject* vrfObject);
67 
68  virtual void typeSpecificStringRep(std::ostream& str, int indentLevel) const;
69 
70 protected:
71 
72  DtList myPredicates;
73 };
74 
75 #endif
Contains the DtCompositePredicate class declaration.
Definition: compositePredicate.h:26
DtVrfObject is used to represent any type of simulated object (entities, aggregate, control objects) in a VR-Forces application.
Definition: vrfObject.h:215
DtVrfObjectPredicate & operator=(const DtVrfObjectPredicate &orig)
assignment operator
virtual bool eval(const DtVrfObject *vrfObject)=0
The actual test to be applied.
Instances of DtVrfObjectPredicate are used to evaluate a condition, given a DtVrfObject as an argumen...
Definition: vrfObjectPredicate.h:21
virtual void typeSpecificStringRep(std::ostream &str, int indentLevel) const
Override in specific subclasses to print the predicate description to the stream. ...
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
virtual bool predicateEqual(const DtVrfObjectPredicate &orig) const
Test if this instance of a predicate is equal to another.
virtual DtVrfObjectPredicate * clone() const =0
clone function
virtual bool canEvalFalse(const DtVrfObject *vrfObject)
Definition: vrfObjectPredicate.h:90
virtual bool canEvalTrue(const DtVrfObject *vrfObject)
Definition: vrfObjectPredicate.h:86
DtList myPredicates
Definition: compositePredicate.h:72

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)