Files
qt-migration-legatus/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/handler_instrumentation_asset.h
T
torstenandCopilot d5af8b9764 Session 026: Lts/Services Qt5:: to Qt6:: migration
- Migrated all 104 CMakeLists.txt files in Lts/Services
- Replaced Qt5::Core, Qt5::Gui, Qt5::Widgets, Qt5::Network, Qt5::Svg,
  Qt5::Concurrent, Qt5::WebSockets, Qt5::Sql, Qt5::Xml, Qt5::Test,
  Qt5::SerialPort with Qt6:: equivalents
- 1244 files modified (CMakeLists.txt and source files)
- Zero Qt5:: references remaining in Lts/Services
- QTextCodec, QDesktopWidget: No blocking issues found
- QRegExp: 7 occurrences remain (deprecated but functional)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-25 19:23:30 +02:00

64 lines
2.9 KiB
C++
Executable File

/**
* @RDE_HEADER@
* ISM Handler Instrumentation Assets
* $Id$
* $HeadURL$
* $Author$
* Created by Iuliana Ojog, SLSE, 2016-11-26
*/
#pragma once
#include <QHash>
#include "base.h"
//-------------------------------------------------------------------------------------------------------------
namespace InfrastructureManagement
{
class ObjectInstrumentationAsset;
class MainHandler;
class HandlerInstrumentationAsset final : public Base
, protected Interface::Fts::InstrumentationAssetModifyRequestHandler
, protected Interface::Fts::InstrumentationAssetRemoveRequestHandler
, protected Interface::Fts::InstrumentationAssetSetStateRequestHandler
, protected Interface::Fts::InstrumentationAssetUnmountRequestHandler
{
public:
explicit HandlerInstrumentationAsset(MainHandler *mainHandler);
~HandlerInstrumentationAsset();
bool init();
ObjectInstrumentationAsset *createInstrumentationAssetForMse(int buildingId, int structureElementId);
bool removeInstrumentationAssetForMse(int assetId);
bool setAssetState(int assetId, InstrumentationAssetState state);
bool setAssetAvailableInExercise(int32_t assetId, const std::vector<int32_t> &exercises);
QHash<int, ObjectInstrumentationAsset *> getObjectInstrumentationAssetMap() const
{
return m_ObjectInstrumentationAssetMap;
}
ObjectInstrumentationAsset *getAssetFromBarcode(const QString &barcode) const;
ObjectInstrumentationAsset *getAssetFromId(int32_t assetId) const ;
ObjectInstrumentationAsset *getAssetFromBarcodeAndId(const QString &barcode, int32_t assetId) const;
private:
void onInstrumentationAssetModifyRequest(const rti::core::SampleIdentity &cookie,
const InstrumentationAssetModifyRequest &request) override;
Core::FunctionReplyObject instrumentationAssetCreate(const InstrumentationAssetModifyRequest &request, int *assetId = nullptr);
Core::FunctionReplyObject instrumentationAssetModify(const InstrumentationAssetModifyRequest &request);
void onInstrumentationAssetRemoveRequest(const rti::core::SampleIdentity &cookie,
const Core::RemoveElementRequest &request) override;
Core::FunctionReplyObject onInstrumentationAssetRemove(const Core::RemoveElementRequest &request);
void onInstrumentationAssetSetStateRequest(const rti::core::SampleIdentity &cookie,
const InstrumentationAssetSetStateRequest &request) override;
Core::FunctionReplyObject instrumentationAssetSetState(const InstrumentationAssetSetStateRequest &request);
void onInstrumentationAssetUnmountRequest(const rti::core::SampleIdentity &cookie,
const InstrumentationAssetUnmountRequest &request) override;
Core::FunctionReplyObject instrumentationAssetUnmount(const InstrumentationAssetUnmountRequest &request);
private:
QHash<int, ObjectInstrumentationAsset *> m_ObjectInstrumentationAssetMap;
};
}