Blame view

src/ParamGetImpl/DDServerInterface/AMDAPlugin.cc 2.07 KB
fbe3c2bb   Benjamin Renard   First commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
 * AMDAPlugin.cc
 *
 *  Created on: Nov 25, 2012
 *      Author: f.casimir
 */

//=============================================================================
// Include section
//=============================================================================

// Standard libraries include files
//-----------------------------------------------------------------------------
#include <iostream>

// Include oriented definitions 
//-----------------------------------------------------------------------------

// Module Kernel include files
//-----------------------------------------------------------------------------

#include "NodeCfg.hh"
#include "XMLParameterConfigurator.hh"
#include "ServicesServer.hh"
#include "ParameterManager.hh"
#include "PluginManager.hh"
#include "ParamGetDDBase.hh"
#include "GetDDBaseNode.hh"
#include "VirtualInstrumentManager.hh"

using namespace AMDA::Parameters;
using namespace AMDA::XMLParameterConfigurator;

// Other modules include files
//-----------------------------------------------------------------------------

//=============================================================================
// Library function
//=============================================================================

/**
 * Retrieve the Plugin version we're going to expect
 */
extern "C" const char* getPluginVersion() 
{
	return "(Version)";
}

/**
 * Tells us to register our functionality to an engine kernel
 */
3caf58ee   Hacene SI HADJ MOHAND   compil mais march...
52
extern "C" void registerPlugin(AMDA::Plugins::PluginManager & pm)
fbe3c2bb   Benjamin Renard   First commit
53
54
55
56
{
	ParamGetFactory fact = boost::factory<ParamGetDDBase*>();
	ServicesServer *servicesServer = ServicesServer::getInstance();
	servicesServer->addParamGetFactory("DDBASE", fact);
3caf58ee   Hacene SI HADJ MOHAND   compil mais march...
57
                    servicesServer->linkParamGetWithPlugin("DDBASE", pm.getCurrentPluginPath());
fbe3c2bb   Benjamin Renard   First commit
58
59
60
61
62
63
64
65
	XMLParameterConfigurator* lXMLConf =  dynamic_cast<XMLParameterConfigurator*>(servicesServer->getConfigurator().get());
	lXMLConf->addNodeParser("param/get/vi",AMDA::XMLConfigurator::NodeCfgSPtr(new GetDDBaseNode));
}

extern "C" void unregisterPlugin()
{
	AMDA::DDServerInterface::VirtualInstrumentManager::releaseInstance();
}