VR-Forces 4.3 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtNavigationFeatureManager.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2015 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCore/DtTickable.h>
13 #include <vrvCore/DtUniqueID.h>
14 
16 
17 #include <matrix/vlVector.h>
18 
19 #include <boost/unordered_map.hpp>
20 
21 #include <map>
22 
23 namespace makVrv
24 {
25  class DtDe;
26  class DtAgentManagerInterface;
27  class DtNavigationFeatureStringParser;
28  class DtBuoyOrBeaconFacade;
29  class DtBuoyLayer;
30  class DtNavigationFeature;
31 
38  : public DtTickable
39  {
40  public:
42  typedef std::map<DtUniqueID, DtNavigationFeature*>
44 
47  DtAgentManagerInterface& sceneInterface,
48  DtBuoyLayer& buoyLayer );
49 
51  virtual ~DtNavigationFeatureManager();
52 
56  bool readObjectStyleListFile( const std::string& path,
57  const std::string& layerListFileName );
58 
61  virtual void addObject( DtNavigationFeature* object ) = 0;
62 
64  DtNavigationFeature* findObject( DtUniqueID elementId );
65 
68  virtual bool destroyObject( DtUniqueID id );
69 
71 
72  const ObjectMap& objects() const;
73  ObjectMap& objects();
75 
77 
78 
79 
80 
81 
82 
83  virtual bool needsUpdate( DtTime tNow ) = 0;
84 
88  virtual void update( DtTime tNow ) = 0;
90 
93  virtual DtUniqueID findObjectWithPosition( const DtVector& position );
94 
95  protected:
98 
101 
104 
106  virtual void attachToBuoy( DtNavigationFeature& controller,
107  DtBuoyOrBeaconFacade& buoy ) = 0;
108 
110  virtual void detachFromBuoy( DtNavigationFeature& controller,
111  DtBuoyOrBeaconFacade& buoy ) = 0;
112 
115  virtual void moveObjectToDetachedObjectList( DtUniqueID controllerId );
116 
119  virtual void moveObjectToAttachedObjectList( DtUniqueID controllerId );
120 
123  virtual void initializeFeatureCreators() = 0;
124 
127  virtual void slot_featureToBeDeleted( const std::string& myLayerName,
128  DtUniqueID featureId );
129 
132  virtual void slot_buoyCreated( DtBuoyOrBeaconFacade& buoy,
133  const DtVector& initialPosition ) = 0;
134 
137  virtual void slot_buoyAboutToBeDestroyed( const DtBuoyOrBeaconFacade& buoy );
138 
142  void slot_sceneCreated();
143 
145  void slot_postInitialize();
146 
147  protected:
148  // The name of the file we read for object layers to register for
149  const char* ObjectLayerList;
150 
151  // The name of the attribute file we read to map S57 attributes to
152  // object shape switch values, color, colpat, topshp, catspm
154 
155  protected:
161  std::string myName;
162 
163  typedef std::list<std::string> ObjectStylesList;
164 
167 
169  typedef boost::unordered_map<DtUniqueID, DtVector>
171 
174 
178 
181  typedef boost::unordered_map<DtUniqueID, DtUniqueID>
183 
186 
189 
190  boost::signals::connection myPostInitializeConnection;
191 
192  };
193 }

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)