VR-Forces 5.0.2 Developer's Guide
 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 
10 
11 
13 #include "vrfobjcore/simObject.h"
14 #include <vlutil/vlMachineTypes.h>
15 #include <ostream>
16 
21 {
22 public:
23 
25  DtVrfObjectPredicate(bool negate = false);
26 
28  virtual ~DtVrfObjectPredicate();
29 
32 
34  DtVrfObjectPredicate& operator=(const DtVrfObjectPredicate& orig);
35 
37  virtual DtVrfObjectPredicate* clone() const = 0;
38 
42  bool operator==(const DtVrfObjectPredicate& orig) const;
43  bool operator!=(const DtVrfObjectPredicate& orig) const;
44 
45  virtual bool negated() const;
46  virtual void setNegate(bool negate);
47 
50  bool isTrue(const DtSimObject* vrfObject) const;
51 
52 
54  virtual bool canBeTrue(const DtSimObject* vrfObject);
56  virtual bool canBeFalse(const DtSimObject* vrfObject);
57 
58  virtual void stringRep(std::ostream& str, int indentLevel = 0) const;
59 
60 public:
61 
63  static const DtVrfObjectPredicate& nullPredicate();
64 
65 protected:
66 
69  virtual bool eval(const DtSimObject* vrfObject) const = 0;
70 
80  virtual bool predicateEqual(const DtVrfObjectPredicate& orig) const;
81 
85  virtual bool canEvalTrue(const DtSimObject* vrfObject) const { return true; };
89  virtual bool canEvalFalse(const DtSimObject* vrfObject) const { return true; };
90 
92  virtual void typeSpecificStringRep(std::ostream& str, int indentLevel) const;
93 
94 protected:
95 
96  bool myNegated;
97 };
DT_DLL_terrainCS bool operator==(const DtDegMinSec &lhs, const DtDegMinSec &rhs)
virtual bool canEvalFalse(const DtSimObject *vrfObject) const
Definition: vrfObjectPredicate.h:89
Contains the DtVrfObjectPredicate class declaration.
Definition: vrfObjectPredicate.h:20
virtual bool canEvalTrue(const DtSimObject *vrfObject) const
Definition: vrfObjectPredicate.h:85
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
bool myNegated
Definition: vrfObjectPredicate.h:96
Represents a single simulation object in the exercise. Object may be VRF simulation, or non-VRF simulated, and may be simulated by the local sim engine, or by a remote sim engine. Only public (external) state of the object is available. All data is read-only. All access to data of the object is thread safe within the simulation frame.
Definition: simObject.h:79
DT_DLL_terrainCS bool operator!=(const DtDegMinSec &lhs, const DtDegMinSec &rhs)

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)