- 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>
61 lines
1.4 KiB
C++
Executable File
61 lines
1.4 KiB
C++
Executable File
/**
|
|
* Handler for all exercise objects
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Hanna E. Rathje, SLSE, 2015-09-03
|
|
*/
|
|
|
|
#include "handler_xxx_xxx.h"
|
|
#include <utility>
|
|
#include "object_xxx_xxx.h"
|
|
#include "yyy_db.h"
|
|
#include "db_handler.h"
|
|
|
|
#include <QCoreApplication>
|
|
#include <NGLLogger/NGLLoggerBootstrap.h>
|
|
|
|
namespace YyyYyyYyy
|
|
{
|
|
|
|
HandlerXxx::HandlerXxx(const std::shared_ptr<DdsHandler> &ddsHandler,
|
|
const std::shared_ptr<DbHandler> &dbHandler,
|
|
QObject *parent) : QObject(parent)
|
|
, m_ddsHandler(ddsHandler)
|
|
, m_dbHandler(dbHandler),
|
|
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {}
|
|
|
|
HandlerXxx::~HandlerXxx()
|
|
{}
|
|
|
|
bool HandlerXxx::init()
|
|
{
|
|
QVector<Database::YyyXxx> dataVec;
|
|
// read all Xxxs from database
|
|
if(!m_dbHandler->db()->select(dataVec))
|
|
{
|
|
ERROR_LOG(m_logger) << "Error reading data from database!";
|
|
return false;
|
|
}
|
|
|
|
// create languageHmi objects
|
|
for (const Database::YyyXxx &data : std::as_const(dataVec))
|
|
{
|
|
ObjectXxx *ifs(new ObjectXxx(m_ddsHandler, m_dbHandler, this));
|
|
Core::FunctionReplyObject ret = ifs->createObject(data);
|
|
if(ret.error())
|
|
{
|
|
delete ifs;
|
|
ERROR_LOG(m_logger) << ret();
|
|
return false;
|
|
}
|
|
m_xxxObjMap.insert(ifs->getId(), ifs);
|
|
}
|
|
|
|
DEBUG_LOG(m_logger) << "m_exeObjMap.size() = " << m_xxxObjMap.size();
|
|
|
|
return true;
|
|
}
|
|
|
|
} // Namespace YyyYyyYyy
|