VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
doUntilStmt.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2021 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
11 #include "vrfplan/rwCondExpr.h"
13 
14 #include <vlutil/vlNetTypes.h>
15 
16 const char DtDoUntilStmtTypeName[] = "DoUntil";
17 
18 class DtRwCondExpr;
19 class DtDoUntilBlock;
20 class DtSimCondExpr;
21 //class DtSimMessage;
22 
30 #include "vrfplan/vrfplanDefines.h"
32 {
33 public:
34 
36  DtDoUntilStmt(DtReaderWriterRegistry* parentRegistry = NULL);
37 
39  DtDoUntilStmt(const DtDoUntilStmt& orig,
40  DtReaderWriterRegistry* parentRegistry = NULL);
41 
43  virtual ~DtDoUntilStmt();
44 
47 
49  virtual DtSimStatement* clone(
50  DtReaderWriterRegistry* parentRegistry = NULL) const;
51 
53  virtual int type() const;
54 
58  virtual bool validate();
59 
62  virtual void execute(DtPlan& planContext);
63 
65  virtual int subBlockCount() const;
67  virtual DtSimBlock* subBlock(int index);
68 
78  virtual DtString stringRep(int subBlockIndex = DtSR_STMT) const;
79 
81  virtual const DtSimCondExpr* condExpr() const;
83  virtual void setCondExpr(const DtSimCondExpr* arg);
84 
85  virtual DtDoUntilBlock* doUntilBlock() const;
86  virtual void setDoUntilBlock(DtDoUntilBlock* arg);
87 
90  virtual int netRepSize() const;
91 
93  virtual bool setFromNet(const char* contentBuffer,
94  unsigned contentSize);
95 
107  virtual bool setToNet();
108 
110  virtual void upgradeTriggerUUID(const boost::unordered_map<DtUUID, DtUUID>&);
111 
113  virtual void reset();
114 
116  static void evaluateCondExprCallback(DtPlan& plan, void* usrData);
117 
120  static void skipTaskCallback(void * usr);
121 
122 public:
124  static DtSimStatement* creator(DtReaderWriterRegistry* parentRegistry=NULL);
125 
126 protected:
127  virtual bool compare(DtSimStatement* rhs);
130  void interrupt(DtPlan& planContext);
133  virtual void evaluateConditional(DtPlan& planContext);
134  virtual void skipTask();
135 
136 protected:
137 
141 };
virtual void setCondExpr(const DtSimCondExpr *arg)=0
Sets the conditional expression used to evaluate the wait until.
virtual DtSimStatement * clone(DtReaderWriterRegistry *parentRegistry=NULL) const =0
virtual copy constructor A typical clone function.
virtual int subBlockCount() const
Get the number of blocks nested inside this statement.
const char DtDoUntilStmtTypeName[]
Definition: doUntilStmt.h:16
virtual void execute(DtPlan &planContext)=0
Execute the current statement and make any changes to the Plan state as appropriate.
Definition: readerWriterRegistry.h:39
bool myIsSkipped
Definition: doUntilStmt.h:140
class DtDoUntilStmt:
Definition: doUntilStmt.h:31
DtDoUntilBlock * myBlock
Definition: doUntilStmt.h:139
class DtSimBlock:
Definition: simBlock.h:27
virtual void reset()
Called when the plan is reset, will iterate over all statements to reset as well. ...
class DtSimConditionalStatement:
Definition: simConditionalStatement.h:25
virtual DtSimBlock * subBlock(int index)
Get a pointer to any particular block nested inside this statement.
DtRwCondExpr myCondExpr
Definition: doUntilStmt.h:138
virtual bool setFromNet(const char *contentBuffer, unsigned contentSize)
Extracts statement Id from buffer.
virtual int netRepSize() const
Returns sizeof(DtNetSimStatement).
class DtPlan:
Definition: plan.h:91
DtSimCondExpr is an abstract base class representing various Conditional Expressions used by the Plan...
Definition: simCondExpr.h:49
class DtDoUntilBlock:
Definition: doUntilBlock.h:26
class DtRwCondExpr:
Definition: rwCondExpr.h:24
class DtSimStatement:
Definition: simStatement.h:35
virtual bool setToNet()
Casts myNetRep to DtNetSimStatement* and fills in structure.
virtual bool validate()
Checks the statement for validity, and potentially fixes the statement to be valid.
#define DT_DLL_vrfplan
This file is used to determine how to build.
Definition: vrfplanDefines.h:28
virtual void upgradeTriggerUUID(const boost::unordered_map< DtUUID, DtUUID > &)
For those statements that need to, map from the old to new trigger UUID.
virtual const DtSimCondExpr * condExpr() const =0
Returns the conditional expression used to evaluate the wait until.
DtSimStatement & operator=(const DtSimStatement &orig)
Assignment operator (protected because this is an abstract base class).
virtual int type() const =0
Returns the type of statement Type (defined in simStmtTypes.h)
virtual bool compare(DtSimStatement *)
Called from isSameStatement.
virtual DtString stringRep(int subBlockIndex=DtSR_STMT) const =0
Get a readable string representation of this statement.

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)