VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
vrfMsdlOrbatImporterExporter.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2017 MaK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
11 
12 
13 #include "vrfGuiCore/vrfGuiCore.h"
16 #include <vrfutil/rwUUID.h>
17 #include <vrfutil/rwOrbatData.h>
20 
21 #include <set>
22 
23 class DtFilename;
24 class DtSimMessage;
25 
26 namespace makVrv
27 {
28  class DtDe;
29 }
30 
31 class DtIfOrbatOperation;
32 
33 namespace makVrf
34 {
38  {
39  public:
40  typedef std::map<DtUUID, DtRwOrbatData> OrbatDataMap;
41 
42  public:
45 
48 
51 
54  virtual void exportOrbat(const DtFilename&, const DtMsdlHierarchyPropertyMappings& = DtMsdlHierarchyPropertyMappings(),
55  const std::set<std::string>& smsFilenames = std::set<std::string>());
56 
60  virtual bool importOrbat(const DtFilename&, std::vector<DtRwOrbatData>& imported, const DtMsdlHierarchyPropertyMappings& = DtMsdlHierarchyPropertyMappings());
61 
65  virtual DtVrfGuiOrbatManager::OrbatTreeWithRwOrbatData orbatFromFile(const DtFilename&,
67  virtual DtVrfGuiOrbatManager::OrbatTreeWithRwOrbatData orbatFromFile(const DtFilename&,
69 
71  static void registerInstance(makVrv::DtDe&, DtVrfMsdlOrbatImporterExporter*);
72 
73  virtual void clear();
74 
75  public:
77  boost::signals2::signal<void (const DtFilename&)> signal_failedToImportOrbatEntries;
78 
80  boost::signals2::signal<void (DtIfOrbatOperation&)> signal_aboutToImportOrbatEntries;
81 
83  boost::signals2::signal<void (const DtIfOrbatOperation&)> signal_importedOrbatEntries;
84 
86  boost::signals2::signal<void ()> signal_aboutToExportOrbatEntries;
87 
89  boost::signals2::signal<void ()> signal_exportedOrbatEntries;
90 
91  protected:
93  virtual void saveAdditionalScenarioInformation(std::ostream&, const DtScenario&) const;
94 
96  virtual void exportForces(const DtMsdlHierarchyPropertyMappings& m);
97 
99  virtual void exportOrganization(const DtVrfGuiOrbatManager::OrbatTreeWithStateView&, const DtMsdlHierarchyPropertyMappings& m);
100 
102  virtual void exportUnit(const DtVrfGuiOrbatManager::OrbatWithStateView&, const DtMsdlHierarchyPropertyMappings& m);
103 
105  virtual void exportEquipmentItem(const DtVrfGuiOrbatManager::OrbatWithStateView&, const DtMsdlHierarchyPropertyMappings& m);
106 
107  virtual void createFromMSDLItem(DtMsdlSimulatedElement*, DtVrfGuiOrbatManager::OrbatTreeWithRwOrbatData& msg,
108  OrbatDataMap& flatMap, const DtUUID& parentUUID = DtUUID::nullUUID(), int unparentedMaxOrbat = 0);
109 
111  virtual void matchForcesToForceManager();
112 
113  virtual int nextForceType() const;
114 
115  protected:
117 
118  typedef std::map<int, Msdl_UUID> ForcesUUIDMap;
119 
121 
122  typedef std::map<std::string, std::string> ForceHandleToForceUUID;
123 
126  };
127 }
UUID is a unique ID wrapper class.
Definition: uuid.h:59
Definition: ifOrbatOperation.h:20
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
ForceHandleToForceUUID myForceUUIDToForceHandle
Definition: vrfMsdlOrbatImporterExporter.h:125
Definition: scenario.h:52
std::map< DtUUID, OrbatWithRwOrbatData > OrbatTreeWithRwOrbatData
Definition: vrfGuiOrbatManager.h:67
The main class that is used to import/export values from/to an Msdl file. This class will not actuall...
Definition: msdlScenarioDescriptionImporterExporter.h:161
boost::signals2::signal< void()> signal_exportedOrbatEntries
Signal sent when orbat has been exported.
Definition: vrfMsdlOrbatImporterExporter.h:89
boost::signals2::signal< void(const DtIfOrbatOperation &)> signal_importedOrbatEntries
Signal sent after the orbat has been imported.
Definition: vrfMsdlOrbatImporterExporter.h:83
Contains the DtUUID class declaration.
boost::signals2::signal< void()> signal_aboutToExportOrbatEntries
Signal sent before orbat is to be exported.
Definition: vrfMsdlOrbatImporterExporter.h:86
boost::signals2::signal< void(const DtFilename &)> signal_failedToImportOrbatEntries
Signal sent if orbat file could not be loaded.
Definition: vrfMsdlOrbatImporterExporter.h:77
This class is the interface for a scenario description importer/exporter. Subclasses will implement t...
Definition: scenarioDescriptionImporterExporter.h:27
#define DT_DLL_VRFGUICORE
Contains DLL export macros.
Definition: vrfGuiCore.h:25
static const DtUUID & nullUUID()
ForcesUUIDMap myForceMap
Definition: vrfMsdlOrbatImporterExporter.h:120
Contains makVrv::DtVirtualBaseClass class.
Definition: msdlHierarchyPropertyMappings.h:56
This class will import/export MSDL files into/from an associated ORBAT hierarchy. ...
Definition: vrfMsdlOrbatImporterExporter.h:36
boost::signals2::signal< void(DtIfOrbatOperation &)> signal_aboutToImportOrbatEntries
Signal sent before the orbat is to be imported.
Definition: vrfMsdlOrbatImporterExporter.h:80
File: simMsg.h.
Definition: simMessage.h:35
Definition: vrfGuiOrbatManager.h:61
std::map< int, Msdl_UUID > ForcesUUIDMap
Definition: vrfMsdlOrbatImporterExporter.h:118
std::map< DtUUID, OrbatWithStateView > OrbatTreeWithStateView
Definition: vrfGuiOrbatManager.h:57
std::map< std::string, std::string > ForceHandleToForceUUID
Definition: vrfMsdlOrbatImporterExporter.h:122
makVrv::DtDe & myDe
Definition: vrfMsdlOrbatImporterExporter.h:116
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:72
ForceHandleToForceUUID myForceHandleToForceUUID
Definition: vrfMsdlOrbatImporterExporter.h:124
std::map< DtUUID, DtRwOrbatData > OrbatDataMap
Definition: vrfMsdlOrbatImporterExporter.h:40
Class that represents a simulated element (aggregate or entity) in the simulation.
Definition: msdlScenarioDescriptionImporterExporter.h:69

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)