Commit abf3f45a authored by Jussi Lindgren's avatar Jussi Lindgren
Browse files

Toolkit: Scenario exporters will now include the openvibe version

parent ef57c9d9
......@@ -41,6 +41,9 @@ boolean CAlgorithmXMLScenarioExporter::exportStart(IMemoryBuffer& rMemoryBuffer,
if(false) { }
else if(rIdentifier==OVTK_Algorithm_ScenarioExporter_NodeId_OpenViBEScenario ) l_sNodeName="OpenViBE-Scenario";
else if(rIdentifier==OVTK_Algorithm_ScenarioExporter_NodeId_Creator ) l_sNodeName="Creator";
else if(rIdentifier==OVTK_Algorithm_ScenarioExporter_NodeId_CreatorVersion ) l_sNodeName="CreatorVersion";
else if(rIdentifier==OVTK_Algorithm_ScenarioExporter_NodeId_Boxes ) l_sNodeName="Boxes";
else if(rIdentifier==OVTK_Algorithm_ScenarioExporter_NodeId_Box ) l_sNodeName="Box";
......
......@@ -3,6 +3,9 @@
#define OVTK_Algorithm_ScenarioExporter_NodeId_OpenViBEScenario OpenViBE::CIdentifier(0x1CD93114, 0x6A544E8C)
#define OVTK_Algorithm_ScenarioExporter_NodeId_Creator OpenViBE::CIdentifier(0x430C9234, 0x4825E245)
#define OVTK_Algorithm_ScenarioExporter_NodeId_CreatorVersion OpenViBE::CIdentifier(0x1B01311A, 0x2405842B)
#define OVTK_Algorithm_ScenarioExporter_NodeId_Boxes OpenViBE::CIdentifier(0x4BCB7EA2, 0x49B95B54)
#define OVTK_Algorithm_ScenarioExporter_NodeId_Box OpenViBE::CIdentifier(0xF7341CA6, 0x05DBB935)
#define OVTK_Algorithm_ScenarioExporter_NodeId_Box_Identifier OpenViBE::CIdentifier(0x388E37B5, 0x3F471DB7)
......
#include "ovtkCAlgorithmScenarioExporter.h"
#include <vector>
#include <sstream>
using namespace OpenViBE;
using namespace OpenViBE::Kernel;
......@@ -76,6 +77,12 @@ boolean CAlgorithmScenarioExporter::process(void)
this->exportStart(l_oTemporaryMemoryBuffer, OVTK_Algorithm_ScenarioExporter_NodeId_OpenViBEScenario);
this->exportString(l_oTemporaryMemoryBuffer, OVTK_Algorithm_ScenarioExporter_NodeId_Creator, CString(OV_PROJECT_NAME));
std::stringstream l_sOpenViBEVersion;
l_sOpenViBEVersion << OV_VERSION_MAJOR << "." << OV_VERSION_MINOR << "." << OV_VERSION_PATCH;
this->exportString(l_oTemporaryMemoryBuffer, OVTK_Algorithm_ScenarioExporter_NodeId_CreatorVersion, CString(l_sOpenViBEVersion.str().c_str()));
this->exportStart(l_oTemporaryMemoryBuffer, OVTK_Algorithm_ScenarioExporter_NodeId_Boxes);
while((l_oBoxIdentifer=l_pScenario->getNextBoxIdentifier(l_oBoxIdentifer))!=OV_UndefinedIdentifier)
l_oHelper.exportBox(l_oTemporaryMemoryBuffer, *l_pScenario->getBoxDetails(l_oBoxIdentifer));
......
......@@ -398,6 +398,8 @@ boolean CAlgorithmScenarioImporterContext::processStart(const CIdentifier& rIden
{
if(false) { }
else if(rIdentifier==OVTK_Algorithm_ScenarioExporter_NodeId_OpenViBEScenario) { }
else if(rIdentifier==OVTK_Algorithm_ScenarioExporter_NodeId_Creator) { }
else if(rIdentifier==OVTK_Algorithm_ScenarioExporter_NodeId_CreatorVersion) { }
else if(rIdentifier==OVTK_Algorithm_ScenarioExporter_NodeId_VisualisationTree) { }
else if(rIdentifier==OVTK_Algorithm_ScenarioExporter_NodeId_VisualisationWidget) { m_oSymbolicScenario.m_vVisualisationWidget.push_back(SVisualisationWidget()); }
else if(rIdentifier==OVTK_Algorithm_ScenarioExporter_NodeId_VisualisationWidget_Attributes) { }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment