VR-Forces 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  virtual int numPredicates() const;
53 
54 protected:
55 
57  virtual bool eval(const DtSimObject* vrfObject) const;
58 
60  virtual bool predicateEqual(const DtVrfObjectPredicate& orig) const;
61 
63  virtual bool canEvalTrue(const DtSimObject* vrfObject) const override;
65  virtual bool canEvalFalse(const DtSimObject* vrfObject) const override;
66 
67  virtual void typeSpecificStringRep(std::ostream& str, int indentLevel) const;
68 
69 protected:
70 
71  DtList myPredicates;
72 };
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:88
virtual DtVrfObjectPredicate * clone() const =0
clone function
DtList myPredicates
Definition: compositePredicate.h:71

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)