VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtBuoyBeaconLayer.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/vrvCore.h>
13 #include <vrvCore/DtUniqueID.h>
14 
16 
17 #include <matrix/vlVector.h>
18 
19 #include <map>
20 #include <list>
21 #include <string>
22 
23 #include <boost/unordered_map.hpp>
24 
25 namespace makVrv
26 {
27  class DtDe;
28  class DtAgentManagerInterface;
29  class DtBuoyOrBeaconFacade;
30  class DtBuoyBeaconModelStringParser;
31  class DtTextureAtlasIndexParser;
32 
37  {
38  public:
40  typedef std::map<DtUniqueID, DtBuoyOrBeaconFacade*> BuoyBeaconMap;
41 
47  {
48  AttachableLights = 0,
49  AttachableDaymarks = 1,
50  AttachableTopmarks = 2
51  };
52 
54  static const int NumAttachableTypes = 3;
55 
59  typedef bool HasAttachable[NumAttachableTypes];
60 
62  DtBuoyBeaconLayer(DtDe& de, DtAgentManagerInterface& sceneInterface);
63 
65  virtual ~DtBuoyBeaconLayer();
66 
71  // The initial (streamed-in) location of the object
75  virtual void addBuoyOrBeacon( DtBuoyOrBeaconFacade* buoy,
76  const DtVector& initialPosition, HasAttachable attachables );
77 
80  virtual bool destroyBuoyOrBeacon( DtUniqueID elementId );
81 
84  virtual DtBuoyOrBeaconFacade* findBuoyOrBeacon( DtUniqueID elementId );
85 
87  const BuoyBeaconMap& buoysAndBeacons() const;
88 
92  DtUniqueID findBuoyOrBeaconWithAttachablePosition( AttachableTypes type,
93  const DtVector& position );
94 
98  void moveBuoyOrBeaconToDetachedFromList( AttachableTypes type,
99  DtUniqueID elementId );
100 
104  void moveBuoyOrBeaconToAttachedToList( AttachableTypes type,
105  DtUniqueID elementId );
106 
109  void set2dIconsEnabled(bool enabled);
110 
111  protected:
112 
116  void slot_sceneCreated();
117 
119  void slot_postInitialize();
120 
123  virtual void initializeFeatureCreators();
124 
126  typedef boost::unordered_multimap<std::string, std::string> StylesMap;
127 
131  bool readStyleListFile( const std::string& path,
132  const std::string& layerListFileName, StylesMap& map );
133 
134  protected:
135  static const char* S57AttrMapFilename;
136  static const char* S57ModelDefByNameMap;
137  static const char* S57LayerList;
138  static const char* S57Defaults;
139  static const char* S57IconMap;
140 
141  protected:
148  std::string myName;
149 
151 
154  typedef boost::unordered_map<DtUniqueID, DtVector>
156 
159  PendingItemAttachmentMap myDetachedBuoysAndBeacons[NumAttachableTypes];
160 
163  PendingItemAttachmentMap myAttachedBuoysAndBeacons[NumAttachableTypes];
164 
165  boost::signals::connection myPostInitializeConnection;
166  };
167 }
DtSignalConnectionManager myConnections
Definition: DtBuoyBeaconLayer.h:145
BuoyBeaconMap myBuoysAndBeacons
Definition: DtBuoyBeaconLayer.h:144
DtAgentManagerInterface & mySceneInterface
Definition: DtBuoyBeaconLayer.h:143
static const char * S57IconMap
Definition: DtBuoyBeaconLayer.h:139
static const char * S57Defaults
Definition: DtBuoyBeaconLayer.h:138
StylesMap myStylesMap
Definition: DtBuoyBeaconLayer.h:150
DtDe & myDe
Definition: DtBuoyBeaconLayer.h:142
DtTextureAtlasIndexParser * myTextureAtlasIndexParser
Definition: DtBuoyBeaconLayer.h:147
Definition: DtTextureAtlasIndexParser.h:23
DtBuoyBeaconModelStringParser * myBuoyMarkerStringParser
Definition: DtBuoyBeaconLayer.h:146
The DtBuoyBeaconLayer is the base implementation of a layer of data which contains buoys and beacons ...
Definition: DtBuoyBeaconLayer.h:36
AttachableTypes
These are used to tell managers of attachable items what type of item they manage; they are also used...
Definition: DtBuoyBeaconLayer.h:46
std::map< DtUniqueID, DtBuoyOrBeaconFacade * > BuoyBeaconMap
List of Buoys and Beacons.
Definition: DtBuoyBeaconLayer.h:40
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
static const char * S57LayerList
Definition: DtBuoyBeaconLayer.h:137
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:24
static const char * S57ModelDefByNameMap
Definition: DtBuoyBeaconLayer.h:136
The DtBuoyBeaconModelStringParser parses the buoy attributes found in the strings used by streamed bu...
Definition: DtBuoyBeaconModelStringParser.h:56
static const char * S57AttrMapFilename
Definition: DtBuoyBeaconLayer.h:135
unsigned long long DtUniqueID
Definition: DtUniqueID.h:22
boost::unordered_map< DtUniqueID, DtVector > PendingItemAttachmentMap
List of buoy and beacons ids and locations that should be attached to an attachable item...
Definition: DtBuoyBeaconLayer.h:155
std::string myName
Definition: DtBuoyBeaconLayer.h:148
Base class to provide boost signal/slot management.
boost::signals::connection myPostInitializeConnection
Definition: DtBuoyBeaconLayer.h:165
Contains makVrv::DtUniqueID type.
The abstract interface necessary for agents.
Definition: DtAgentManagerInterface.h:36
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
The DtEntityFacade is a facade around agents that make up an entity.
Definition: DtBuoyOrBeaconFacade.h:24
boost::unordered_multimap< std::string, std::string > StylesMap
Type for sets of style names (layers) we listen to.
Definition: DtBuoyBeaconLayer.h:126
Contains DLL export macros.

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)