Files
qt-migration-legatus/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/ism_dtc_impl_custom.h
T
torstenandCopilot 93020295ad Add BUILD_RTI guards to InfrastructureManagement and AudioVideoManagement DDS handlers
- ism_dtc_impl_custom.h/cpp: Wrap all DDS-dependent method declarations and implementations with BUILD_RTI guards
- dds_handler.cpp (InfrastructureManagement): Guard RTI DDS initialization code
- dds_handler.h/cpp (AudioVideoManagement): Guard DomainParticipant types and methods
- Enables building without RTI Connext DDS dependencies (BUILD_RTI=OFF)
- Stub types used when guards are disabled

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-22 11:55:44 +02:00

84 lines
4.2 KiB
C++
Executable File

/**
* @RDE_HEADER@
* ISM Custom functions (extends ism_db_impl.cpp/.h)
* $Id$
* $HeadURL$
* $Author$
* Created by Iuliana Ojog, SLSE, 2016-11-26
*/
#pragma once
#include <InfrastructureManagement/ism_dtc_impl.h>
//-------------------------------------------------------------------------------------------------------------
namespace InfrastructureManagement
{
namespace Interface
{
class DtcImplCustom final : public Interface::DtcImpl
{
Q_OBJECT
public:
explicit DtcImplCustom(const std::shared_ptr<DDSConnector::DdsConnector> &ddsConnector);
~DtcImplCustom();
public:
long structureElementCacheSize() const;
protected:
void reloadStructureElementCacheIfEmpty();
long reloadStructureElementCache();
protected Q_SLOT:
void updateStructureElementCache(const InfrastructureManagement::MainStructureElement &data, DataModification modType);
public:
bool isElementAssignedToExercise(const MainStructureElement &mse, int exerciseId) const override;
bool getMountingPointAssetId(int structureElementId, int assetId, int &mountingPointAssetId) const override;
bool getAssetIdFromMountingPoint(int structureElementId, int mountingPointAssetId, int &assetId) const override;
int getOpsCodeFromJSon(const std::string &s) const;
int getOpticalCodeFromAssetId(int assetId) const override;
#if BUILD_RTI
int getAssetIdFromOpticalCode(int opticalCode) const override;
int getAssetIdFromMountingPointId(int mainStructureElementId, int mountingPointId) const override;
bool getAllAssetsPerRoom(const std::function<bool(const InstrumentationAsset &)> &predicate,
QMap<int, QVector<InstrumentationAsset> > &allAssets) override;
bool getAllAssetsPerBuilding(const std::function<bool(const InstrumentationAsset &)> &predicate,
QMap<int, QVector<InstrumentationAsset> > &allAssets) const override;
int getStructueElementIdFromAssetId(int assetId) const override;
#endif
bool getOpsDataFromMseIdAndSeId(int mainStructureElementId, int structureElementId, int &roomId, Core::GeoPosition &geoPosition) const override;
bool getStructureElementById(int structureElementId, StructureElement &structureElement) const override;
bool getStructureElementInMntPointAssetByAssetId(int assetId, StructureElement &structureElement) const override;
bool getStructureElementByBuildingIdAndMountingPointId(int mainStructureElementId, int mountingPointId, StructureElement &structureElement) override;
bool getBuildingId(int structureElementId, int &buildingId) const override;
QString getBuildingDisplayName(int buildingId) override;
QString getBuildingDisplayName(const MainStructureElement &mse) const override;
MountingPointPlan getMountingPointPlan(int scheduleId, int structureElementId) const override;
int getBuildingRoomsCount(int buildingId) override;
BridgeStatus getBridgeStatus(int buildingId) override;
#if BUILD_RTI
bool checkSchedule(int scheduleId) override;
bool getScheduleDifferences(int scheduleId, QList<MountingPointPlan> &diffList) override;
int getMountedAssetId(int structureElementId) const override;
QList<int> getSections() override;
#endif
QMap<int, MainFootprint> getFootprintsByExerciseId(int exerciseId) override;
QMap<int, QPolygonF> getUtmFootprintsByExerciseId(int exerciseId, int &zone, bool isGroundLevel) override;
QPolygonF getUtmFootprintById(int mseId, int &zoneOut, bool isGroundLevel) override;
QVector <int> getBuildingByPolygon(int exerciseId, const QPolygonF &polygon, bool completeEnclosed, bool isGroundLevel) override;
int getSurroundingBuildingByPolygon(int exerciseId, const QPolygonF &polygon, bool isGroundLevel) override;
int getBuildingIdAtPosition(int exerciseId, const QPointF &utmPos, bool isGroundLevel) override;
QVector <int> getFloorIdsFromBuilding(int buildingId) override;
QList <StructureElement> getFloorsFromBuilding(int buildingId);
double getHalfFloorHeight(int buildingId, int floorId) override;
QVector <int> getRoomIdsFromFloorId(int buildingId, int floorId) override;
QVector <int> getBuildingIdsByExercise ( int exerciseId) override;
QByteArray getVulnerabilityModelData ( int buildingId) override;
class Private;
Private *d;
};
} //Interface
} // namespace InfrastructureManagement