VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
whileStmt.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2018 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 DtWhileStmtTypeName[] = "While";
17 
18 class DtRwCondExpr;
19 class DtWhileBlock;
20 class DtSimCondExpr;
21 
29 #include "vrfplan/vrfplanDefines.h"
31 {
32 public:
33 
35  DtWhileStmt(DtReaderWriterRegistry* parentRegistry = NULL);
36 
38  DtWhileStmt(const DtWhileStmt& orig,
39  DtReaderWriterRegistry* parentRegistry = NULL);
40 
42  virtual ~DtWhileStmt();
43 
45  DtWhileStmt& operator=(const DtWhileStmt& orig);
46 
48  virtual DtSimStatement* clone(
49  DtReaderWriterRegistry* parentRegistry = NULL) const;
50 
52  virtual int type() const;
53 
57  virtual bool validate();
58 
61  virtual void execute(DtPlan& planContext);
62 
64  virtual int subBlockCount() const;
66  virtual DtSimBlock* subBlock(int index);
67 
77  virtual DtString stringRep(int subBlockIndex = DtSR_STMT) const;
78 
80  virtual const DtSimCondExpr* condExpr() const;
82  virtual void setCondExpr(const DtSimCondExpr* arg);
83 
84  virtual DtWhileBlock* whileBlock() const;
85  virtual void setWhileBlock(DtWhileBlock* arg);
86 
89  virtual int netRepSize() const;
90 
92  virtual bool setFromNet(const char* contentBuffer,
93  unsigned contentSize);
94 
106  virtual bool setToNet();
107 
109  virtual void upgradeTriggerUUID(const boost::unordered_map<DtUUID, DtUUID>&);
110 
112  virtual void reset();
113 
114 public:
116  static DtSimStatement* creator(DtReaderWriterRegistry* parentRegistry=NULL);
117 
118 protected:
119  virtual bool compare(DtSimStatement* rhs);
120 
121 protected:
122 
125 };
DtRwCondExpr myCondExpr
Definition: whileStmt.h:123
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.
DtWhileBlock * myBlock
Definition: whileStmt.h:124
virtual void execute(DtPlan &planContext)=0
Execute the current statement and make any changes to the Plan state as appropriate.
Definition: readerWriterRegistry.h:39
class DtSimBlock:
Definition: simBlock.h:29
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.
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:90
DtSimCondExpr is an abstract base class representing various Conditional Expressions used by the Plan...
Definition: simCondExpr.h:49
class DtWhileBlock:
Definition: whileBlock.h:28
class DtRwCondExpr:
Definition: rwCondExpr.h:24
class DtSimStatement:
Definition: simStatement.h:41
class DtWhileStmt:
Definition: whileStmt.h:30
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).
const char DtWhileStmtTypeName[]
Definition: whileStmt.h:16
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 Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)