VR-Forces 4.1.1 Class Documentation
Scenario Import/Export

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

Select Settings, Plugins... and on the Plugins Editor page, use the combo box at the top of the page to select the plug-in. Then enable the Load

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.

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 <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 = "150 Cambridge Park Drive 3rd Floor - Cambridge, MA 02140 USA";
info.pluginContactPhone = "(617) 876 8085";
}

Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)