Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
@@ -0,0 +1,93 @@
|
||||
/**
|
||||
* Plugin Ces Virtual Mines
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLTE, 2016-04-14
|
||||
*/
|
||||
|
||||
#include "plugin.h"
|
||||
|
||||
#include <ngldb/db_service_handler.h>
|
||||
|
||||
namespace CesGasPipes
|
||||
{
|
||||
|
||||
|
||||
std::shared_ptr<CentralEffectSimulation::Plugin::Interface> CesGasPipesPlugin::createInterface(CentralEffectSimulation::Plugin::DataProvider *pdp,
|
||||
const std::shared_ptr<DDSConnector::DdsConnector> &dDSConnector,
|
||||
NGL::Settings *settings,
|
||||
CentralEffectSimulation::MainHandler *mainHandler)
|
||||
{
|
||||
return std::make_shared<CesGasPipesInterfaceImpl>(pdp, dDSConnector, settings, mainHandler);
|
||||
}
|
||||
|
||||
|
||||
CesGasPipesInterfaceImpl::CesGasPipesInterfaceImpl(CentralEffectSimulation::Plugin::DataProvider *pdp,
|
||||
const std::shared_ptr<DDSConnector::DdsConnector> &dDSConnector,
|
||||
NGL::Settings *settings,
|
||||
CentralEffectSimulation::MainHandler *mainHandler)
|
||||
: m_pdp(pdp)
|
||||
, m_ddsConnector(dDSConnector)
|
||||
, m_mainHandler(mainHandler)
|
||||
, m_ddsHandler(m_mainHandler->dds())
|
||||
, m_db(m_mainHandler->db())
|
||||
, m_handlerParticipant(m_mainHandler->handlerParticipant())
|
||||
, m_logger(CentralEffectSimulation::getLogger("Plugin.GasPipes.CesMinesInterfaceImpl"))
|
||||
{
|
||||
Q_UNUSED(settings)
|
||||
}
|
||||
|
||||
CesGasPipesInterfaceImpl::~CesGasPipesInterfaceImpl()
|
||||
{
|
||||
// m_handlerParticipantBoobyTrap.reset();
|
||||
// m_handlerParticipantOffRouteMine.reset();
|
||||
}
|
||||
|
||||
|
||||
bool CesGasPipesInterfaceImpl::init(int domainId, int exerciseId)
|
||||
{
|
||||
m_domainId = domainId;
|
||||
m_exerciseId = exerciseId;
|
||||
INFO_LOG(m_logger) << "CesGasPipesInterfaceImpl::init()"
|
||||
<< " m_domainId=" << m_domainId
|
||||
<< " m_exerciseId=" << m_exerciseId;
|
||||
|
||||
|
||||
|
||||
// // initialize handlerBoobyTrap
|
||||
// m_handlerParticipantBoobyTrap = std::make_shared<HandlerParticipantBoobyTrap>(m_ddsHandler,
|
||||
// m_handlerParticipant,
|
||||
// this);
|
||||
|
||||
// if (!m_handlerParticipantBoobyTrap->init())
|
||||
// {
|
||||
// ERROR_LOG(m_logger) << "Initialisation m_handlerParticipantBoobyTrap failed.";
|
||||
// return false;
|
||||
// }
|
||||
|
||||
|
||||
// // initialize offRouteMine
|
||||
// m_handlerParticipantOffRouteMine = std::make_shared<HandlerParticipantOffRouteMine>(m_ddsHandler,
|
||||
// m_handlerParticipant,
|
||||
// this);
|
||||
|
||||
// if (!m_handlerParticipantOffRouteMine->init())
|
||||
// {
|
||||
// ERROR_LOG(m_logger) << "Initialisation m_handlerParticipantOffRouteMine failed.";
|
||||
// return false;
|
||||
// }
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
QString CesGasPipesInterfaceImpl::echo(const QString &message)
|
||||
{
|
||||
|
||||
QString ret(QStringLiteral("<<<< %1 >>>> CesGasPipesInterfaceImpl::echo").arg(message));
|
||||
INFO_LOG(m_logger) << "CesGasPipesInterfaceImpl::echo return:" << ret;
|
||||
DEBUG_LOG(m_logger) << "DEBUG: CesGasPipesInterfaceImpl::echo return:" << ret;
|
||||
return ret;
|
||||
}
|
||||
|
||||
} //namespace CesGasPipes
|
||||
Reference in new issue
Block a user