- BUILD_RTI conditional compilation für RTI Connext DDS dependencies - Namespace fixes in core_dtc.h (Core:: → DDS::Core::) - CMakeLists.txt: BUILD_RTI option und conditional dependencies - Handler minelayer: namespace closing mit BUILD_RTI guard - Build erfolgreich mit BUILD_RTI=OFF validiert Signed-off-by: Torsten Wierschin <torsten.wierschin@life-maps.com>
60 lines
1.2 KiB
C++
Executable File
60 lines
1.2 KiB
C++
Executable File
/**
|
|
* MainHandler for AssetManagement
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
*/
|
|
|
|
#include "main_handler.h"
|
|
|
|
#include <DDS/DDSConnector/dds_connector.h>
|
|
#include <ngldb/db_service_handler.h>
|
|
|
|
namespace XxxXxxXxx
|
|
{
|
|
|
|
MainHandler::MainHandler(QObject *parent) : QObject(parent)
|
|
, m_ddsHandler(nullptr)
|
|
, m_dbHandler(nullptr),
|
|
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {}
|
|
|
|
MainHandler::~MainHandler()
|
|
{
|
|
m_ddsHandler = nullptr;
|
|
m_dbHandler = nullptr;
|
|
}
|
|
|
|
bool MainHandler::init(int domainId)
|
|
{
|
|
|
|
// initialize database
|
|
m_dbHandler = std::make_shared<DbHandler>();
|
|
|
|
if (!m_dbHandler->init(0, Settings::settings(), m_logger))
|
|
{
|
|
ERROR_LOG(m_logger) << "Initialisation dbHandler failed.";
|
|
return false;
|
|
}
|
|
DEBUG_LOG(m_logger) << "Initialisation dbHandler succesful.";
|
|
|
|
// initialize DDS
|
|
m_ddsHandler = std::make_shared<DdsHandler>(domainId);
|
|
if (!m_ddsHandler->init())
|
|
{
|
|
ERROR_LOG(m_logger) << "Initialisation ddsHandler failed.";
|
|
return false;
|
|
}
|
|
DEBUG_LOG(m_logger) << "Initialisation ddsHandler succesful.";
|
|
|
|
// TODO
|
|
|
|
return true;
|
|
}
|
|
|
|
std::shared_ptr<DatabaseInterface> MainHandler::db() const
|
|
{
|
|
return m_dbHandler->db();
|
|
}
|
|
|
|
} // namespace XxxXxxXxx
|