/** * @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 //------------------------------------------------------------------------------------------------------------- namespace InfrastructureManagement { namespace Interface { class DtcImplCustom final : public Interface::DtcImpl { Q_OBJECT public: explicit DtcImplCustom(const std::shared_ptr &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; int getAssetIdFromOpticalCode(int opticalCode) const override; int getAssetIdFromMountingPointId(int mainStructureElementId, int mountingPointId) const override; 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 getAllAssetsPerRoom(const std::function &predicate, QMap > &allAssets) override; bool getAllAssetsPerBuilding(const std::function &predicate, QMap > &allAssets) const 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; bool checkSchedule(int scheduleId) override; bool getScheduleDifferences(int scheduleId, QList &diffList) override; int getMountedAssetId(int structureElementId) const override; int getStructueElementIdFromAssetId(int assetId) const override; QList getSections() override; QMap getFootprintsByExerciseId(int exerciseId) override; QMap getUtmFootprintsByExerciseId(int exerciseId, int &zone, bool isGroundLevel) override; QPolygonF getUtmFootprintById(int mseId, int &zoneOut, bool isGroundLevel) override; QVector 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 getFloorIdsFromBuilding(int buildingId) override; QList getFloorsFromBuilding(int buildingId); double getHalfFloorHeight(int buildingId, int floorId) override; QVector getRoomIdsFromFloorId(int buildingId, int floorId) override; QVector getBuildingIdsByExercise ( int exerciseId) override; QByteArray getVulnerabilityModelData ( int buildingId) override; class Private; Private *d; }; } //Interface } // namespace InfrastructureManagement