VR-Forces 4.0.4 Class Documentation
include/vrfplan/simTrigger.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 2003 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile: simTrigger.h,v $ $Revision: 1.12 $ $State: Exp $
00007 *******************************************************************************/
00008 
00011 
00012 #ifndef DtSimTrigger_H_
00013 #define DtSimTrigger_H_
00014 
00015 class DtSimTrigger;
00016 
00017 #include <vlutil/vlString.h>
00018 #include "vrfutil/condExpr.h"
00019 #include "vrfplan/stmtIndex.h"
00020 #include "vrfplan/whenStmt.h"
00021 #include "vrfplan/whenBlock.h"
00022 
00023 class DtPlan;
00024 
00025 
00026 
00030 struct DtNetSimTrigger
00031 {
00032    DtNetU32 myWhenStmtIndex;     
00033    DtNetU8  myEnabled;           
00034    DtNetU8  myIsDone;            
00035    DtNetU8  myPadding;           
00036    DtNetU8  myPadding2;          
00037 };
00038 
00045 #include "vrfplan/vrfplanDefines.h"
00046 class DT_DLL_vrfplan DtSimTrigger
00047 {
00048 public:
00049 
00051    DtSimTrigger();
00052 
00054    DtSimTrigger(const DtStmtIndex& whenStmt, DtPlan* plan);
00055 
00057    DtSimTrigger(const DtSimTrigger& orig, DtPlan* plan = NULL);
00058 
00060    virtual ~DtSimTrigger();
00061 
00064    DtSimTrigger& operator=(const DtSimTrigger& orig);
00065 
00067    virtual void tick();
00068 
00070    virtual bool testCondition();
00071 
00073    virtual void activate();
00074 
00077    virtual const DtSimCondExpr* condition() const;
00078 
00080    virtual DtWhenBlock* whenBlock() const;
00081 
00083    virtual DtString whenOption() const;
00084 
00086    virtual const DtWhenStmt* whenStmt() const;
00087    virtual void setWhenStmt(const DtWhenStmt* arg);
00088 
00090    virtual void translateInto(const DtSimBlock& newBlock);
00091 
00092    virtual DtPlan* plan() const;
00094    virtual void setPlan(DtPlan* arg);
00095 
00096    virtual bool enabled() const;
00097    virtual void setEnabled(bool arg);
00098 
00101    virtual bool isDone() const;
00102    virtual void setIsDone(bool arg);
00103 
00104    virtual char* netRep();
00105 
00108    virtual int netRepSize() const;
00109 
00111    virtual bool setFromNet(const char* contentBuffer, 
00112       unsigned contentSize);
00113 
00116    virtual bool setToNet();
00117 
00118 protected:
00119 
00120    virtual char* createNetworkBuffer();
00121 
00122 protected:
00123 
00124    DtStmtIndex myWhenStmt;
00125    DtPlan* myPlan;
00126 
00127    bool myEnabled;
00128    bool myIsDone;
00129 
00130    char*     myNetRep;
00131 };
00132 
00133 #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)