VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
waitUntilStmt.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2016 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
11 #include "vrfplan/vrfplanDefines.h"
12 #include "vrfplan/rwCondExpr.h"
14 
15 #include <vlutil/vlNetTypes.h>
16 
17 const char DtWaitUntilStmtTypeName[] = "WaitUntil";
18 
19 class DtRwCondExpr;
20 class DtSimCondExpr;
21 
29 {
30 public:
31 
33  DtWaitUntilStmt(DtReaderWriterRegistry* parentRegistry = NULL);
34 
36  DtWaitUntilStmt(const DtWaitUntilStmt& orig,
37  DtReaderWriterRegistry* parentRegistry = NULL);
38 
40  virtual ~DtWaitUntilStmt() override;
41 
44 
46  virtual DtSimStatement* clone(DtReaderWriterRegistry* parentRegistry = NULL) const override;
47 
49  virtual int type() const override;
50 
53  virtual void execute(DtPlan& planContext) override;
54 
56  virtual int subBlockCount() const override;
58  virtual DtSimBlock* subBlock(int index) override;
59 
69  virtual DtString stringRep(int subBlockIndex = DtSR_STMT) const override;
70 
72  virtual const DtSimCondExpr* condExpr() const override;
74  virtual void setCondExpr(const DtSimCondExpr* arg) override;
75 
78  virtual int netRepSize() const override;
79 
81  virtual bool setFromNet(const char* contentBuffer, unsigned contentSize) override;
82 
85  virtual bool setToNet() override;
86 
89  virtual void step(DtPlan& planContext, bool forceStep = false) override;
90 
91  bool triggered() const { return myTriggered; };
92 
93 public:
95  static DtSimStatement* creator(DtReaderWriterRegistry* parentRegistry=NULL);
96 
97 protected:
98  virtual bool compare(DtSimStatement* rhs) override;
99 
100 protected:
101 
104 };
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. It must be overridden by derived classes to return...
virtual int subBlockCount() const
Get the number of blocks nested inside this statement.
virtual void step(DtPlan &planContext, bool forceStep=false)
Asks the statement to step the context DtPlan to the next statement. The default implementation steps...
virtual void execute(DtPlan &planContext)=0
Execute the current statement and make any changes to the Plan state as appropriate. Tells the statement to activate its own behavior. Each kind of statement implements this function differently. It is passed a reference to the executing DtPlan object as a “context of execution”.
Definition: readerWriterRegistry.h:39
class DtSimBlock:
Definition: simBlock.h:27
DtRwCondExpr myCondExpr
Definition: waitUntilStmt.h:102
class DtWaitUntilStmt:
Definition: waitUntilStmt.h:28
class DtSimConditionalStatement:
Definition: simConditionalStatement.h:25
virtual DtSimBlock * subBlock(int index)
Get a pointer to any particular block nested inside this statement. Sub-blocks are indexed as C array...
virtual bool setFromNet(const char *contentBuffer, unsigned contentSize)
Extracts statement Id from buffer. First 16 bytes are a DtNetSimStatement structure. Derived class data should immediately follow this. Derived classes should call down to this one to make sure statement id gets set.
virtual int netRepSize() const
Returns sizeof(DtNetSimStatement). Derived classes should add this size to the size of their net repr...
class DtPlan:
Definition: plan.h:92
DtSimCondExpr is an abstract base class representing various Conditional Expressions used by the Plan...
Definition: simCondExpr.h:53
class DtRwCondExpr:
Definition: rwCondExpr.h:26
class DtSimStatement:
Definition: simStatement.h:38
virtual bool setToNet()
Casts myNetRep to DtNetSimStatement* and fills in structure. Derived classes should always call down ...
bool myTriggered
Definition: waitUntilStmt.h:103
#define DT_DLL_vrfplan
This file is used to determine how to build.
Definition: vrfplanDefines.h:28
bool triggered() const
Definition: waitUntilStmt.h:91
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)
const char DtWaitUntilStmtTypeName[]
Definition: waitUntilStmt.h:17
virtual bool compare(DtSimStatement *)
Called from isSameStatement. Compares net reps to see if they are the same. Override to do different ...
virtual DtString stringRep(int subBlockIndex=DtSR_STMT) const =0
Get a readable string representation of this statement.

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)