/** * @RDE_HEADER@ * ISM Handler Sound Areas * $Id$ * $HeadURL$ * $Author$ * Created by Filip Biedziak, NLE, 2020-08-05 */ #pragma once #include #include "base.h" namespace InfrastructureManagement { class ObjectEffectArea; class MainHandler; class HandlerEffectArea final : public Base { public: explicit HandlerEffectArea(MainHandler *mainHandler); ~HandlerEffectArea(); bool init(); ObjectEffectArea *createEffectAreaForMse(const InfrastructureManagement::MainStructureElement &mse); QHash getObjectEffectAreaMap() const { return m_objectEffectAreaMap; } ObjectEffectArea *getEffectAreaFromId(int32_t id) const { return m_objectEffectAreaMap.value(id, nullptr); } private: int getSeId(const int mountPointId, const InfrastructureManagement::MainStructureElement &mse) const; /** * @brief assetIdsFromJsonArray reads the EGCU IDs of the sound area from a Json object. * @param jsonObj Json object with an entry 'egcuMountpoints' * @return vector with EGCU IDs */ std::vector egcuIdsFromJsonObject(const QJsonObject &jsonObj, const MainStructureElement &mse) const; /** * @brief geometryFromJsonArray reads the vertices of the sound area from a Json object. * @param jsonObj Json object with an entry 'geometry' * @return vector with 2D geo coordinates */ std::vector geometryFromJsonObject(const QJsonObject &jsonObj) const; private: QHash m_objectEffectAreaMap; }; } // namespace InfrastructureManagement