VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator 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 
37 {
38 public:
39  typedef boost::unordered_map<DtUUID, DtVrfObject*> GlobalPlans;
40 
41 public:
43  DtGlobalPlanManager(DtSimManager* simManager);
44 
46  virtual ~DtGlobalPlanManager();
47 
48  virtual bool init();
49 
52  virtual bool readPlanFile(const DtString& filename);
53 
55  const GlobalPlans& globalPlans() const { return myGlobalPlans; };
56 
58  virtual void sendPlanList();
59 
60  virtual void completeInitialization();
61 
62 protected:
64  virtual void registerInterfaceMessageCallbacks();
65 
67  static void requestPlanListCallback(DtSimMessage* msg, void* usr);
68 
69  static void objectAddedCallback(DtVrfObject* object, void* usr);
70 
72  virtual void objectAdded(DtVrfObject* object);
73 
74  static void objectAboutToBeRemovedCallback(DtVrfObject* object, void* usr);
75 
77  virtual void objectAboutToBeRemoved(DtVrfObject* object);
78 
80  static void setPlanCallback(DtSimMessage* msg, void* usr);
84  virtual void processSetPlan(DtSimMessage* msg);
85 
86  virtual void addOrUpdatePlan(DtPlan* aNewPlan);
87 
89  static void deletePlanCallback(DtSimMessage* msg, void* usr);
90 
93  virtual void processDeletePlan(DtSimMessage* msg);
94 
96  static void launchGlobalPlanCallback(DtSimMessage* msg, void* usr);
97 
100  virtual void processLaunchGlobalPlan(DtSimMessage* msg);
101 
106  virtual void setPlan(DtIfPlan* plan);
107 
110  virtual void watchPlan(DtPlan*);
111 
112  static void planStatementChangedCallback(const DtPlan&, void* usr);
113  virtual void processPlanStatementChanged(const DtPlan&);
114 
115 private:
121  DtGlobalPlanManager& operator=(const DtGlobalPlanManager& orig);
122 
123 protected:
125 
128 };

Document ID: Generated on Mon Jul 4 01:00:18 EDT 2016 from SVN revision 166489
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)