61 lines
1.7 KiB
C++
Executable File
61 lines
1.7 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* GUI Plugin for AreaEffectSimulation - Contamination
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Patric Karwat, SLSE, 2016-07-07
|
|
*/
|
|
|
|
#include "aes_base_gui_plugin.h"
|
|
|
|
#include <Plugins/AreaEffectSimulation/aes_data_plugin_interface.h>
|
|
#include <Plugins/ProjectDataManagement/pdm_data_plugin_interface.h>
|
|
#include <Plugins/ProjectDataManagement/pdm_gui_plugin_interface.h>
|
|
#include <Plugins/SituationMapPlugin/situation_map_gui_plugin_interface.h>
|
|
#include <LtsSession/lts_session.h>
|
|
#include <AreaEffectSimulation/aes_operator_rights.h>
|
|
|
|
namespace AreaEffectSimulation
|
|
{
|
|
|
|
AesBaseInterface::AesBaseInterface(LtsSession::LtsSession *session, NGL::INGLLogger &logger)
|
|
: GuiPluginBase::Interface(session, logger)
|
|
, m_dtc(nullptr)
|
|
, m_ftc(nullptr)
|
|
, m_pdmDtc(nullptr)
|
|
, m_pdmGuiIfc(nullptr)
|
|
, m_sitmapGuIfc(nullptr)
|
|
{}
|
|
|
|
|
|
bool AesBaseInterface::fetchInterfaces()
|
|
{
|
|
if (!m_session->getDtc<AreaEffectSimulation::DataInterface>(m_dtc))
|
|
return false;
|
|
if (!m_session->getFtc<AreaEffectSimulation::DataInterface>(m_ftc))
|
|
return false;
|
|
if (!m_session->getDtc<ProjectDataManagement::DataInterface>(m_pdmDtc))
|
|
return false;
|
|
if (!m_session->getForeignGuiInterface<ProjectDataManagement::ForeignGuiInterface>(m_pdmGuiIfc))
|
|
return false;
|
|
if (!m_session->getForeignGuiInterface<ParticipantManagement::ForeignGuiComboboxInterface>(m_ppmGuiCbxIfc))
|
|
return false;
|
|
|
|
m_session->getForeignGuiInterface<SituationMap::ForeignGuiInterface>(m_sitmapGuIfc); // optional
|
|
|
|
return true;
|
|
}
|
|
|
|
void AesBaseInterface::clearInterfaces()
|
|
{
|
|
m_ppmGuiCbxIfc = nullptr;
|
|
m_sitmapGuIfc = nullptr;
|
|
m_pdmGuiIfc = nullptr;
|
|
m_pdmDtc = nullptr;
|
|
m_ftc = nullptr;
|
|
m_dtc = nullptr;
|
|
}
|
|
|
|
} // namespace AreaEffectSimulation
|