VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
vrfObjectPredicate.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2001 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 #pragma once
6 
7 
8 
10 
11 
12 #include <vlutil/vlMachineTypes.h>
13 #include <ostream>
14 
15 class DtVrfObject;
16 
22 {
23 public:
24 
26  DtVrfObjectPredicate(bool negate = false);
27 
29  virtual ~DtVrfObjectPredicate();
30 
33 
35  DtVrfObjectPredicate& operator=(const DtVrfObjectPredicate& orig);
36 
38  virtual DtVrfObjectPredicate* clone() const = 0;
39 
43  bool operator==(const DtVrfObjectPredicate& orig) const;
44  bool operator!=(const DtVrfObjectPredicate& orig) const;
45 
46  virtual bool negated() const;
47  virtual void setNegate(bool negate);
48 
51  bool isTrue(const DtVrfObject* vrfObject);
52 
53 
55  virtual bool canBeTrue(const DtVrfObject* vrfObject);
57  virtual bool canBeFalse(const DtVrfObject* vrfObject);
58 
59  virtual void stringRep(std::ostream& str, int indentLevel = 0) const;
60 
61 public:
62 
64  static const DtVrfObjectPredicate& nullPredicate();
65 
66 protected:
67 
70  virtual bool eval(const DtVrfObject* vrfObject) = 0;
71 
81  virtual bool predicateEqual(const DtVrfObjectPredicate& orig) const;
82 
86  virtual bool canEvalTrue(const DtVrfObject* vrfObject) { return true; };
90  virtual bool canEvalFalse(const DtVrfObject* vrfObject) { return true; };
91 
93  virtual void typeSpecificStringRep(std::ostream& str, int indentLevel) const;
94 
95 protected:
96 
97  bool myNegated;
98 };

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)