VR-Forces 4.0.4 Class Documentation
include/vrfplan/whenStmt.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 1999 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: whenStmt.h,v $ $Revision: 1.19 $ $State: Exp $
00007 *********************************************************************/
00008 
00011 
00012 #ifndef DtWhenStmt_H_
00013 #define DtWhenStmt_H_
00014 
00015 class DtWhenStmt;
00016 
00017 #include "vrfutil/rwString.h"
00018 #include "vrfutil/condExpr.h"
00019 #include "vrfplan/rwCondExpr.h"
00020 #include "vrfplan/simStmt.h"
00021 #include <vlutil/vlNetTypes.h>
00022 
00023 const char DtWhenStmtTypeName[] = "When";
00024 
00025 class DtRwCondExpr;
00026 class DtWhenBlock;
00027 
00028 
00029 
00042 
00043 struct DtNetWhenStatement
00044 {
00045    DtNetU16 myCondExprSize;            
00046    DtNetU8  myStatementCount;          
00047    DtNetU8  myCondExprType;            
00048    DtNetU8  myTriggerNameLength;       
00049    DtNetU8  myOptionLength;            
00050    DtNetU16 myPadding;                 
00051 };                                     
00052 
00062 #include "vrfplan/vrfplanDefines.h"
00063 class DT_DLL_vrfplan DtWhenStmt : public DtSimStatement
00064 {
00065 public:
00066 
00068    DtWhenStmt(DtReaderWriterRegistry* parentRegistry = NULL);
00069 
00071    DtWhenStmt(const DtWhenStmt& orig,
00072       DtReaderWriterRegistry* parentRegistry = NULL);
00073 
00075    virtual ~DtWhenStmt();
00076 
00078    DtWhenStmt& operator=(const DtWhenStmt& orig);
00079 
00081 
00082    virtual DtSimStatement* clone(
00083       DtReaderWriterRegistry* parentRegistry = NULL) const;
00084 
00086    virtual int type() const;
00087 
00090    virtual void execute(DtPlan& planContext);
00091 
00093    virtual int subBlockCount() const;
00095    virtual DtSimBlock* subBlock(int index);
00096 
00106    virtual DtString stringRep(int subBlockIndex = DtSR_STMT) const;
00107 
00111    virtual void exitFromTrigger(DtPlan& planContext);
00112 
00113    virtual const DtString& triggerName() const;
00114    virtual void setTriggerName(const DtString& arg);
00115 
00116    virtual const DtSimCondExpr* condExpr() const;
00117    virtual void setCondExpr(DtSimCondExpr* arg);
00118 
00124    virtual const DtString& option() const;
00126    virtual void setOption(const DtString& arg);
00127 
00128    virtual DtWhenBlock* whenBlock() const;
00129    virtual void setWhenBlock(DtWhenBlock* arg);
00130 
00137    virtual int netRepSize() const;
00138 
00140    virtual bool setFromNet(const char* contentBuffer, 
00141       unsigned contentSize);
00142 
00154    virtual bool setToNet();
00155 
00156 public:
00157 
00158    static DtSimStatement * creator(DtReaderWriterRegistry* parentRegistry = NULL);
00159 
00160 protected:
00161 
00162    virtual bool compare(DtSimStatement*);
00163 
00164 protected:
00165 
00166    DtRwString myTriggerName;
00167    DtRwCondExpr myCondExpr;
00168    DtRwString myOption;
00169    DtWhenBlock* myBlock;
00170 };
00171 
00172 #endif

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)