VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
globalPlanManager.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2015 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
14 #include <map>
15 #include <vector>
16 #include <vlutil/vlString.h>
17 #include <vrfutil/rwUUID.h>
18 
19 #include <boost/unordered_map.hpp>
20 
21 class DtVrfObject;
22 class DtPlan;
23 class DtSimStatement;
24 class DtIfPlan;
25 class DtString;
26 class DtSimManager;
27 class DtSimMessage;
28 class DtlInputStream;
29 
38 {
39 public:
40  typedef boost::unordered_map<DtUUID, DtVrfObject*> GlobalPlans;
41 
42 public:
44  DtGlobalPlanManager(DtSimManager* simManager);
45 
47  virtual ~DtGlobalPlanManager();
48 
49  virtual bool init();
50 
53  virtual bool readPlanFile(const DtString& filename);
54  virtual bool readPlanFileFromZipFile(const DtFilename& scenarioZipFile, const DtString& filename);
55 
57  const GlobalPlans& globalPlans() const { return myGlobalPlans; };
58 
60  virtual void sendPlanList();
61 
62  virtual void completeInitialization();
63 
65  virtual void addOrUpdatePlan(DtPlan* aNewPlan);
66 
67 protected:
69  virtual void registerInterfaceMessageCallbacks();
70 
72  static void requestPlanListCallback(DtSimMessage* msg, void* usr);
73 
74  static void objectAddedCallback(DtVrfObject* object, void* usr);
75 
77  virtual void objectAdded(DtVrfObject* object);
78 
79  static void objectAboutToBeRemovedCallback(DtVrfObject* object, void* usr);
80 
82  virtual void objectAboutToBeRemoved(DtVrfObject* object);
83 
85  static void setPlanCallback(DtSimMessage* msg, void* usr);
89  virtual void processSetPlan(DtSimMessage* msg);
90 
92  static void deletePlanCallback(DtSimMessage* msg, void* usr);
93 
96  virtual void processDeletePlan(DtSimMessage* msg);
97 
99  static void launchGlobalPlanCallback(DtSimMessage* msg, void* usr);
100 
103  virtual void processLaunchGlobalPlan(DtSimMessage* msg);
104 
109  virtual void setPlan(DtIfPlan* plan);
110 
113  virtual void watchPlan(DtPlan*);
114 
115  static void planStatementChangedCallback(const DtPlan&, void* usr);
116  virtual void processPlanStatementChanged(const DtPlan&);
117 
118  virtual bool processPlanStream(DtlInputStream*);
119 
120 private:
126  DtGlobalPlanManager& operator=(const DtGlobalPlanManager& orig);
127 
128 protected:
130 
133 };

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)