/** * @RDE_HEADER@ * Asset * $Id$ * $HeadURL$ * $Author$ * Created by Christian Fröbel, SLSE, 2017-11-30 */ #pragma once #include "avm_export.h" #include #include namespace InfrastructureManagement { class InstrumentationAsset; } // namespace InfrastructureManagement namespace AudioVideoManagement { class MountingPoint; /** * Part of the data model used by the AssetAssignmentManager. * @author Christian Fröbel */ class AVM_COMMON_EXPORT Asset : public QObject { Q_OBJECT public: explicit Asset(const InfrastructureManagement::InstrumentationAsset &asset); ~Asset(); const InfrastructureManagement::InstrumentationAsset &data() const { return *m_data; } /** Emits the changed() signal. */ void update(const InfrastructureManagement::InstrumentationAsset &data); bool isMounted() const { return m_mountingPoint != nullptr; } /** May only be called when mounted. */ MountingPoint *mountingPoint() const; void mount(MountingPoint *mountingPoint); void unmount(); signals: void changed(Asset *asset); private: std::unique_ptr m_data; MountingPoint *m_mountingPoint{nullptr}; // null if not mounted }; } // namespace AudioVideoManagement