Files
qt-migration-legatus/qt6-after/qt6-migrated-legatus/Lts/Services/skeleton/stub/handler_xxx.cpp
T
torsten 950d669538 Qt6 Migration: BUILD_RTI guards und CMake fixes
- 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>
2026-08-21 18:37:18 +02:00

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