VR-Forces 4.3 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ifStmt.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1999 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: ifStmt.h,v $ $Revision: 1.18 $ $State: Exp $
7 *********************************************************************/
8 
11 
12 #ifndef DtIfStmt_H_
13 #define DtIfStmt_H_
14 
15 class DtIfStmt;
16 
17 #include "vrfutil/simCondExpr.h"
18 #include "vrfplan/rwCondExpr.h"
19 #include "vrfplan/simStatement.h"
20 #include <vlutil/vlNetTypes.h>
21 
22 const char DtIfStmtTypeName[] = "If";
23 
24 class DtRwCondExpr;
25 class DtIfBlock;
26 
27 
28 
32 {
33  DtNetU16 myCondExprSize;
34  DtNetU8 myCondExprType;
37  DtNetU8 myPadding1;
38  DtNetU16 myPadding2;
39 };
40 
49 #include "vrfplan/vrfplanDefines.h"
51 {
52 public:
53 
56 
58  DtIfStmt(DtReaderWriterRegistry* parentRegistry = NULL);
59 
61  DtIfStmt(const DtIfStmt& orig,
62  DtReaderWriterRegistry* parentRegistry = NULL);
63 
65  virtual ~DtIfStmt();
66 
68  DtIfStmt& operator=(const DtIfStmt& orig);
69 
71 
72  virtual DtSimStatement* clone(
73  DtReaderWriterRegistry* parentRegistry = NULL) const;
74 
76  virtual int type() const;
77 
80  virtual void execute(DtPlan& planContext);
81 
84  virtual void step(DtPlan& planContext);
85 
87  virtual int subBlockCount() const;
89  virtual DtSimBlock* subBlock(int index);
90 
101  virtual DtString stringRep(int subBlockIndex = DtSR_STMT) const;
102 
105  virtual void exitFromIf(DtPlan& planContext);
106 
108  virtual const DtSimCondExpr* condExpr() const;
109  virtual void setCondExpr(DtSimCondExpr* arg);
110 
112  virtual DtIfBlock* thenBlock() const;
113  virtual void setThenBlock(DtIfBlock* arg);
114 
116  virtual DtIfBlock* elseBlock() const;
117  virtual void setElseBlock(DtIfBlock* arg);
118 
130  virtual int netRepSize() const;
131 
133  virtual bool setFromNet(const char* contentBuffer,
134  unsigned contentSize);
135 
147  virtual bool setToNet();
148 
149 public:
150 
151  static DtSimStatement * creator(DtReaderWriterRegistry* parentRegistry = NULL);
152 
153 protected:
154  virtual bool compare(DtSimStatement* rhs);
155 
156 protected:
157 
159 
162  bool myResult;
163 
166 };
167 
168 #endif

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)