VR-Forces 4.6.1 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 
64 protected:
66  virtual void registerInterfaceMessageCallbacks();
67 
69  static void requestPlanListCallback(DtSimMessage* msg, void* usr);
70 
71  static void objectAddedCallback(DtVrfObject* object, void* usr);
72 
74  virtual void objectAdded(DtVrfObject* object);
75 
76  static void objectAboutToBeRemovedCallback(DtVrfObject* object, void* usr);
77 
79  virtual void objectAboutToBeRemoved(DtVrfObject* object);
80 
82  static void setPlanCallback(DtSimMessage* msg, void* usr);
86  virtual void processSetPlan(DtSimMessage* msg);
87 
88  virtual void addOrUpdatePlan(DtPlan* aNewPlan);
89 
91  static void deletePlanCallback(DtSimMessage* msg, void* usr);
92 
95  virtual void processDeletePlan(DtSimMessage* msg);
96 
98  static void launchGlobalPlanCallback(DtSimMessage* msg, void* usr);
99 
102  virtual void processLaunchGlobalPlan(DtSimMessage* msg);
103 
108  virtual void setPlan(DtIfPlan* plan);
109 
112  virtual void watchPlan(DtPlan*);
113 
114  static void planStatementChangedCallback(const DtPlan&, void* usr);
115  virtual void processPlanStatementChanged(const DtPlan&);
116 
117  virtual bool processPlanStream(DtlInputStream*);
118 
119 private:
125  DtGlobalPlanManager& operator=(const DtGlobalPlanManager& orig);
126 
127 protected:
129 
132 };

Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)