VR-Forces 5.0.1 Developer's Guide
 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 #pragma once
7 
10 
12 
14 #include <vlpi/disEnums.h>
15 #include <vlutil/vlHashlist.h>
16 
24 {
25 public:
26 
28  DtCompositePredicate(bool negate = false);
29 
31  virtual ~DtCompositePredicate();
32 
35 
38  const DtCompositePredicate& orig);
39 
41  virtual DtVrfObjectPredicate* clone() const;
42 
44  virtual void addPredicate(const DtVrfObjectPredicate& predicate);
45 
47  virtual void removePredicate(const DtVrfObjectPredicate& predicate);
48 
50  virtual bool hasPredicate(const DtVrfObjectPredicate& predicate) const;
51 
52 protected:
53 
55  virtual bool eval(const DtSimObject* vrfObject) const;
56 
58  virtual bool predicateEqual(const DtVrfObjectPredicate& orig) const;
59 
61  virtual bool canEvalTrue(const DtSimObject* vrfObject) const override;
63  virtual bool canEvalFalse(const DtSimObject* vrfObject) const override;
64 
65  virtual void typeSpecificStringRep(std::ostream& str, int indentLevel) const;
66 
67 protected:
68 
69  DtList myPredicates;
70 };
Contains the DtCompositePredicate class declaration.
Definition: compositePredicate.h:23
DtVrfObjectPredicate & operator=(const DtVrfObjectPredicate &orig)
assignment operator
virtual bool eval(const DtSimObject *vrfObject) const =0
The actual test to be applied. Override eval() when creating a concrete predicate.
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
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. The callback mechanisms need this to functi...
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
virtual DtVrfObjectPredicate * clone() const =0
clone function
DtList myPredicates
Definition: compositePredicate.h:69

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)