VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Scenario Import/Export (csvScenarioImporterExporterGui)

The Scenario Import/Export example demonstrates the following:

The Importing/Exporting scenarios example installes a new scenario importer/exporter that will read a comma delimited file and restore entity/aggregate laydown as well as tactical graphic objects.

Since this example is loaded as a plugin, it can be used in conjunction with the released VR-Forces application. Make sure to enable the csvScenarioImporterExporter example from the launcher application

Usage

In the Launcher, click the Plug-ins button to bring up the Plug-ins Selection dialog. Enable the plugin. Then launch VR-Forces.

To view the new behavior:

  1. Load Scenario...
  2. Export Scenario... selecting CSV format
  3. New Scenario...
  4. Import Scenario... selecting file just exported to verify that objects were exported correctly.

Notes

Scenario Import/Export does not export VR Forces specific data, such as Plans and Tasks.

Classes

DtVrfCSVScenarioDescriptionImporterExporterClass that will import/export information to/from the scenario. Extension of DtCSVScenarioDescriptionImporterExporter.
DtCSVScenarioDescriptionImporterExporterClass that will fill in internal structures with information from a comma delimited file or write the comma delimited file from scenario information.

Plugin Entry Points

/*******************************************************************************
** Copyright (c) 2012 MAK Technologies, Inc.
** All rights reserved.
*******************************************************************************/
//\file examplePlugin.cxx
//\brief Loads the plugin and initializes menu items
//This file defines the generic DT_DLL_VRF_PLUGIN_EXPORT_MACRO. Use that macro when
//you want to export symbols. Also, in your CMakeLists.txt file, make sure to
//define the VRFPLUGIN_EXPORTS define to tell the compiler to define the macro as an
//export
#include "csvScenarioImporterExporterGui.h"
#include <vrvCore/DtDe.h>
using namespace makVrv;
using namespace makVrf;
//This function is called after the DE has been initialized but before it starts ticking. This function
//will only be called once
{
DtScenarioDescriptionManager::instance(de).addScenarioDescriptionImporterExporter
}
//Entry point that must be defined by all plugins, this is called as part of the process that loads the plugin, before the de
//is fully initialized
bool initDeModule(DtDe* de)
{
return true;
}
{
info.pluginName = "CSV Importer Exporter Gui";
info.pluginDescription = "This is an example of how to import/export a comma delimeted format file to produce lay down information for entities and tactical graphics";
info.pluginVersion = "1.00";
info.pluginCreator = "MAK Technologies";
info.pluginCreatorEmail = "sales@mak.com";
info.pluginContactWebPage = "www.mak.com";
info.pluginContactMailingAddress = "10 Fawcett Street, Suite 204, Cambridge, MA 02138 USA";
info.pluginContactPhone = "(617) 876 8085";
}

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)