VR-Forces 4.0.4 Class Documentation
include/vrfobjcore/vrfObjPlanAdministrator.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 2007 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile: vrfObjPlanAdministrator.h,v $ $Revision: 1.4 $ $State: Exp $
00007 *******************************************************************************/
00008 
00011 
00012 #ifndef DtVrfObjPlanAdministrator_H_
00013 #define DtVrfObjPlanAdministrator_H_
00014 
00015 class DtSimMessage;
00016 class DtVrfObject;
00017 class DtVrfObjectManager;
00018 class DtString;
00019 
00020 #include <map>
00021 
00023 enum PlanFileVersion
00024 {
00025    PF_VERS_0_1,            
00026    PF_VERS_1_0,             
00027    PF_VERS_2_0             
00028 };
00029 
00041 
00042 #include "vrfobjcore/vrfobjcoreDefines.h"
00043 
00044 class DtlObjPtr;
00045 
00046 class DT_DLL_vrfobjcore DtVrfObjectPlanAdministrator 
00047 {
00048 public:
00049 
00050    typedef std::map<DtString, char*> CachedPlanMap;
00051 
00052 public:
00053 
00055    DtVrfObjectPlanAdministrator(DtVrfObjectManager* vrfObjectManager);
00056 
00059    virtual ~DtVrfObjectPlanAdministrator();
00060 
00063    virtual void cachePlan(const DtString& sObjName, DtlObjPtr planBlock);
00064 
00066    virtual void clearCachedPlans();
00067 
00069    virtual bool init();
00070 
00074    virtual const char* lookupCachedPlan(const DtString& sObjName);
00075 
00078    virtual bool readPlanFile(const DtString& filename);
00079 
00081    virtual void writePlanFile(const DtString& filename) const;
00082 
00086    virtual void enablePlanExecutionState();
00087    virtual void disablePlanExecutionState();
00089 
00091    virtual bool planExecutionEnabled();
00092 
00094    static void setPlanCallback(DtSimMessage* msg, void* usr);
00096    virtual void processSetPlan(DtSimMessage* msg);
00097 
00099    static void setMultiplePlanCallback(DtSimMessage* msg, void* usr);
00101    virtual void processSetMultiplePlan(DtSimMessage* msg);
00102 
00104    static void requestPlanCallback(DtSimMessage* msg, void* usr);
00106    virtual void processRequestPlan(DtSimMessage* msg);
00107 
00109    static void requestMultiPlanCallback(DtSimMessage* msg, void* usr);
00114    virtual void processRequestMultiPlan(DtSimMessage* msg);
00115 
00117    static void abandonPlanCallback(DtSimMessage* msg, void* usr);
00119    virtual void processAbandonPlan(DtSimMessage* msg);
00120 
00122    static void restartPlanCallback(DtSimMessage* msg, void* usr);
00124    virtual void processRestartPlan(DtSimMessage* msg);
00125 
00126 protected:
00127 
00129    DtVrfObjectPlanAdministrator();
00130 
00132    DtVrfObjectPlanAdministrator(const DtVrfObjectPlanAdministrator& orig);
00133 
00135    DtVrfObjectPlanAdministrator& operator=(
00136       const DtVrfObjectPlanAdministrator& orig);
00137 
00138 protected:
00139    DtVrfObjectManager* myVrfObjectManager;
00140 
00146    CachedPlanMap  myCachedPlans;
00147    
00148    bool myExecuting;
00149    
00151    static PlanFileVersion planFileCurrentVersion;
00152 
00153 };
00154 
00155 #endif
00156 

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)