Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
+18
@@ -0,0 +1,18 @@
|
||||
#
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
#ADD_SUBDIRECTORY(Data)
|
||||
|
||||
#
|
||||
# Data Plugin Interface
|
||||
#
|
||||
NGL_ADD_LIBRARY(WS sklDataPluginInterface SHARED skl_data_plugin_interface.h)
|
||||
NGL_TARGET_LINK_LIBRARIES(sklDataPluginInterface
|
||||
Qt5::Core
|
||||
clientPluginInterface
|
||||
)
|
||||
|
||||
NGL_INSTALL_TARGET(sklDataPluginInterface)
|
||||
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <PluginInterfaces/data_plugin_interface.h>
|
||||
|
||||
#include <QObject>
|
||||
|
||||
namespace Skeleton
|
||||
{
|
||||
|
||||
/**
|
||||
* @brief The DataInterface class provides the Topics Clients only for the GUI Plugins
|
||||
*/
|
||||
class DataInterface : public DataPluginBase::Interface
|
||||
{
|
||||
public:
|
||||
DataInterface(LtsSession::LtsSession *session, NGL::INGLLogger &logger)
|
||||
: DataPluginBase::Interface(session, logger)
|
||||
{}
|
||||
virtual ~DataInterface() = default;
|
||||
};
|
||||
|
||||
} //namespace Skeleton
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
#
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
ADD_SUBDIRECTORY(Data)
|
||||
|
||||
#
|
||||
# Data Plugin Interface
|
||||
#
|
||||
NGL_ADD_LIBRARY(WS sklDataPluginInterface SHARED skl_data_plugin_interface.h)
|
||||
NGL_TARGET_LINK_LIBRARIES(sklDataPluginInterface
|
||||
Qt5::Core
|
||||
clientPluginInterface
|
||||
)
|
||||
|
||||
NGL_INSTALL_TARGET(sklDataPluginInterface)
|
||||
@@ -0,0 +1,19 @@
|
||||
#
|
||||
# $Id$
|
||||
# $HeadURL: svn://slssvn/TDS/branches/product/devel/trunk/Lts/Plugins/AdvancedSymbology/CMakeLists.txt
|
||||
# $Author$
|
||||
# Created by Mike Wille, SLSE, 2016-09-05
|
||||
#
|
||||
|
||||
#
|
||||
# Data Plugin
|
||||
#
|
||||
NGL_ADD_LIBRARY(WS sklDataPlugin MODULE skl_data_plugin.cpp skl_data_plugin.h)
|
||||
NGL_TARGET_LINK_LIBRARIES(sklDataPlugin
|
||||
Qt5::Core
|
||||
sklDataPluginInterface
|
||||
NGLLogger
|
||||
LtsSession
|
||||
)
|
||||
|
||||
NGL_INSTALL_TARGET(sklDataPlugin)
|
||||
@@ -0,0 +1,76 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Data Plugin for AdvancedSymbology
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Christian Ehrlicher, SLSE, 2016-02-29
|
||||
*/
|
||||
|
||||
#include "skl_data_plugin.h"
|
||||
|
||||
#include <NGLLogger/NGLLoggerBootstrap.h>
|
||||
#include <LtsSession/lts_session.h>
|
||||
|
||||
// IF PLUGIN HAS SERVICE:
|
||||
#include <DDS/DDSConnector/dds_connector.h>
|
||||
#include <Skeleton/logger.h>
|
||||
|
||||
|
||||
namespace Skeleton
|
||||
{
|
||||
|
||||
std::shared_ptr<DataPluginBase::Interface> DataPlugin::createDataInterface(LtsSession::LtsSession *session)
|
||||
{
|
||||
// IF DTC:
|
||||
std::shared_ptr<Interface::Dtc> dtc;
|
||||
if (!session->createTopicClient(dtc, pluginName()))
|
||||
return std::shared_ptr<DataPluginBase::Interface>();
|
||||
|
||||
// IF FTC:
|
||||
std::shared_ptr<Interface::Ftc> ftc;
|
||||
if (!session->createTopicClient(ftc, pluginName()))
|
||||
return std::shared_ptr<DataPluginBase::Interface>();
|
||||
ftc->enableAll();
|
||||
|
||||
return std::make_shared<DataInterfaceImpl>(session);
|
||||
}
|
||||
|
||||
|
||||
DataInterfaceImpl::DataInterfaceImpl(// IF DTC:
|
||||
const std::shared_ptr<Interface::Dtc> &dtc,
|
||||
// IF FTC:
|
||||
, const std::shared_ptr<Interface::Ftc> &ftc
|
||||
// IF FOREIGN:
|
||||
, LtsSession::LtsSession *session)
|
||||
: DataInterface(session,
|
||||
// IF PLUGIN HAS SERVICE:
|
||||
getLogger("Plugins.Data.Skl")
|
||||
// IF PLUGIN HAS !!NO!! SERVICE:
|
||||
NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("Plugins.Data.Skl")
|
||||
)
|
||||
// IF DTC:
|
||||
, m_dtc(dtc)
|
||||
// IF FTC:
|
||||
, m_ftc(ftc)
|
||||
// IF FOREIGN:
|
||||
, m_foreignInterface(std::make_shared<ForeignInterfaceImpl(dtc))
|
||||
{}
|
||||
|
||||
|
||||
// IF FOREIGN:
|
||||
ForeignInterfaceImpl::ForeignInterfaceImpl(// IF DTC:
|
||||
const std::shared_ptr<Interface::Dtc> &dtc
|
||||
// IF FTC:
|
||||
, const std::shared_ptr<Interface::Ftc> &ftc
|
||||
)
|
||||
// IF DTC:
|
||||
: m_dtc(dtc)
|
||||
// IF FTC:
|
||||
, m_ftc(ftc)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
} // namespace Skeleton
|
||||
@@ -0,0 +1,85 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Data Plugin for AdvancedSymbology
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Christian Ehrlicher, SLSE, 2016-02-29
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <PluginInterfaces/data_plugin_interface.h>
|
||||
#include <Plugins/Skeleton/skl_data_plugin_interface.h>
|
||||
|
||||
namespace Skeleton
|
||||
{
|
||||
|
||||
class DataPlugin final : public QObject, public DataPluginBase::Plugin
|
||||
{
|
||||
Q_PLUGIN_METADATA(IID "data:3:skl")
|
||||
Q_INTERFACES(DataPluginBase::Plugin)
|
||||
|
||||
Q_OBJECT
|
||||
public:
|
||||
DataPlugin() = default;
|
||||
~DataPlugin() = default;
|
||||
|
||||
QString pluginName() const override { return QStringLiteral("Skeleton"); }
|
||||
std::shared_ptr<DataPluginBase::Interface> createDataInterface(LtsSession::LtsSession *session) override;
|
||||
};
|
||||
|
||||
class DataInterfaceImpl final : public DataInterface
|
||||
{
|
||||
public:
|
||||
explicit DataInterfaceImpl(// IF DTC:
|
||||
const std::shared_ptr<ExerciseManagement::Interface::Dtc> &dtc,
|
||||
// IF FTC:
|
||||
const std::shared_ptr<ExerciseManagement::Interface::Ftc> &ftc,
|
||||
|
||||
LtsSession::LtsSession *session);
|
||||
|
||||
// IF DTC:
|
||||
std::shared_ptr<ExerciseManagement::Interface::Dtc> getDtc() override { return m_dtc; }
|
||||
// IF FTC:
|
||||
std::shared_ptr<ExerciseManagement::Interface::Ftc> getFtc() override { return m_ftc; }
|
||||
// IF FOREIGN:
|
||||
std::shared_ptr<ForeignInterface> getForeignInterface() override { return m_foreignInterface; }
|
||||
|
||||
private:
|
||||
// IF DTC:
|
||||
std::shared_ptr<ExerciseManagement::Interface::Dtc> m_dtc;
|
||||
// IF FTC:
|
||||
std::shared_ptr<ExerciseManagement::Interface::Ftc> m_ftc;
|
||||
// IF FOREIGN:
|
||||
std::shared_ptr<ForeignInterface> m_foreignInterface;
|
||||
|
||||
};
|
||||
|
||||
|
||||
// IF FOREIGN:
|
||||
class ForeignInterfaceImpl final : public ForeignInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ForeignInterfaceImpl(// IF DTC:
|
||||
const std::shared_ptr<Interface::Dtc> &dtc
|
||||
// IF FTC:
|
||||
const std::shared_ptr<Interface::Ftc> &ftc
|
||||
);
|
||||
|
||||
// Add your Data thingies here: (don't forget to final override)
|
||||
examples examples() override final { return m_dtc->examples(); }
|
||||
// End
|
||||
|
||||
// NO SINGALS HERE! (specify in interface)
|
||||
|
||||
private:
|
||||
// IF DTC:
|
||||
std::shared_ptr<Interface::Dtc> m_dtc;
|
||||
// IF FTC:
|
||||
std::shared_ptr<Interface::Ftc> m_ftc;
|
||||
};
|
||||
|
||||
|
||||
} // namespace Skeleton
|
||||
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <PluginInterfaces/data_plugin_interface.h>
|
||||
|
||||
#include <QObject>
|
||||
|
||||
namespace Skeleton
|
||||
{
|
||||
|
||||
/**
|
||||
* @brief The DataInterface class provides the Topics Clients only for the GUI Plugins
|
||||
*/
|
||||
class DataInterface : public DataPluginBase::Interface
|
||||
{
|
||||
public:
|
||||
DataInterface(LtsSession::LtsSession *session, NGL::INGLLogger &logger)
|
||||
: DataPluginBase::Interface(session, logger)
|
||||
{}
|
||||
virtual ~DataInterface() = default;
|
||||
};
|
||||
|
||||
} //namespace Skeleton
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
#
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
ADD_SUBDIRECTORY(Data)
|
||||
|
||||
#
|
||||
# Data Plugin Interface
|
||||
#
|
||||
NGL_ADD_LIBRARY(WS sklDataPluginInterface SHARED skl_data_plugin_interface.h)
|
||||
NGL_TARGET_LINK_LIBRARIES(sklDataPluginInterface
|
||||
Qt5::Core
|
||||
clientPluginInterface
|
||||
)
|
||||
|
||||
NGL_INSTALL_TARGET(sklDataPluginInterface)
|
||||
@@ -0,0 +1,19 @@
|
||||
#
|
||||
# $Id$
|
||||
# $HeadURL: svn://slssvn/TDS/branches/product/devel/trunk/Lts/Plugins/AdvancedSymbology/CMakeLists.txt
|
||||
# $Author$
|
||||
# Created by Mike Wille, SLSE, 2016-09-05
|
||||
#
|
||||
|
||||
#
|
||||
# Data Plugin
|
||||
#
|
||||
NGL_ADD_LIBRARY(WS sklDataPlugin MODULE skl_data_plugin.cpp skl_data_plugin.h)
|
||||
NGL_TARGET_LINK_LIBRARIES(sklDataPlugin
|
||||
Qt5::Core
|
||||
sklDataPluginInterface
|
||||
NGLLogger
|
||||
LtsSession
|
||||
)
|
||||
|
||||
NGL_INSTALL_TARGET(sklDataPlugin)
|
||||
@@ -0,0 +1,77 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Data Plugin for AdvancedSymbology
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Christian Ehrlicher, SLSE, 2016-02-29
|
||||
*/
|
||||
|
||||
#include "skl_data_plugin.h"
|
||||
|
||||
#include <NGLLogger/NGLLoggerBootstrap.h>
|
||||
#include <LtsSession/lts_session.h>
|
||||
|
||||
// IF PLUGIN HAS SERVICE:
|
||||
#include <DDS/DDSConnector/dds_connector.h>
|
||||
#include <Skeleton/logger.h>
|
||||
|
||||
|
||||
namespace Skeleton
|
||||
{
|
||||
|
||||
std::shared_ptr<DataPluginBase::Interface> DataPlugin::createDataInterface(LtsSession::LtsSession *session)
|
||||
{
|
||||
// IF DTC:
|
||||
std::shared_ptr<Interface::Dtc> dtc;
|
||||
if (!session->createTopicClient(dtc, pluginName()))
|
||||
return std::shared_ptr<DataPluginBase::Interface>();
|
||||
|
||||
// IF FTC:
|
||||
std::shared_ptr<Interface::Ftc> ftc;
|
||||
if (!session->createTopicClient(ftc, pluginName()))
|
||||
return std::shared_ptr<DataPluginBase::Interface>();
|
||||
|
||||
ftc->enableAll();
|
||||
|
||||
return std::make_shared<DataInterfaceImpl>(session);
|
||||
}
|
||||
|
||||
|
||||
DataInterfaceImpl::DataInterfaceImpl(// IF DTC:
|
||||
const std::shared_ptr<Interface::Dtc> &dtc,
|
||||
// IF FTC:
|
||||
, const std::shared_ptr<Interface::Ftc> &ftc
|
||||
// IF FOREIGN:
|
||||
, LtsSession::LtsSession *session)
|
||||
: DataInterface(session,
|
||||
// IF PLUGIN HAS SERVICE:
|
||||
getLogger("Plugins.Data.Skl")
|
||||
// IF PLUGIN HAS !!NO!! SERVICE:
|
||||
NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("Plugins.Data.Skl")
|
||||
)
|
||||
// IF DTC:
|
||||
, m_dtc(dtc)
|
||||
// IF FTC:
|
||||
, m_ftc(ftc)
|
||||
// IF FOREIGN:
|
||||
, m_foreignInterface(std::make_shared<ForeignInterfaceImpl(dtc))
|
||||
{}
|
||||
|
||||
|
||||
// IF FOREIGN:
|
||||
ForeignInterfaceImpl::ForeignInterfaceImpl(// IF DTC:
|
||||
const std::shared_ptr<Interface::Dtc> &dtc
|
||||
// IF FTC:
|
||||
, const std::shared_ptr<Interface::Ftc> &ftc
|
||||
)
|
||||
// IF DTC:
|
||||
: m_dtc(dtc)
|
||||
// IF FTC:
|
||||
, m_ftc(ftc)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
} // namespace Skeleton
|
||||
@@ -0,0 +1,85 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Data Plugin for AdvancedSymbology
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Christian Ehrlicher, SLSE, 2016-02-29
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <PluginInterfaces/data_plugin_interface.h>
|
||||
#include <Plugins/Skeleton/skl_data_plugin_interface.h>
|
||||
|
||||
namespace Skeleton
|
||||
{
|
||||
|
||||
class DataPlugin final : public QObject, public DataPluginBase::Plugin
|
||||
{
|
||||
Q_PLUGIN_METADATA(IID "data:3:skl")
|
||||
Q_INTERFACES(DataPluginBase::Plugin)
|
||||
|
||||
Q_OBJECT
|
||||
public:
|
||||
DataPlugin() = default;
|
||||
~DataPlugin() = default;
|
||||
|
||||
QString pluginName() const override { return QStringLiteral("Skeleton"); }
|
||||
std::shared_ptr<DataPluginBase::Interface> createDataInterface(LtsSession::LtsSession *session) override;
|
||||
};
|
||||
|
||||
class DataInterfaceImpl final : public DataInterface
|
||||
{
|
||||
public:
|
||||
explicit DataInterfaceImpl(// IF DTC:
|
||||
const std::shared_ptr<ExerciseManagement::Interface::Dtc> &dtc,
|
||||
// IF FTC:
|
||||
const std::shared_ptr<ExerciseManagement::Interface::Ftc> &ftc,
|
||||
|
||||
LtsSession::LtsSession *session);
|
||||
|
||||
// IF DTC:
|
||||
std::shared_ptr<ExerciseManagement::Interface::Dtc> getDtc() override { return m_dtc; }
|
||||
// IF FTC:
|
||||
std::shared_ptr<ExerciseManagement::Interface::Ftc> getFtc() override { return m_ftc; }
|
||||
// IF FOREIGN:
|
||||
std::shared_ptr<ForeignInterface> getForeignInterface() override { return m_foreignInterface; }
|
||||
|
||||
private:
|
||||
// IF DTC:
|
||||
std::shared_ptr<ExerciseManagement::Interface::Dtc> m_dtc;
|
||||
// IF FTC:
|
||||
std::shared_ptr<ExerciseManagement::Interface::Ftc> m_ftc;
|
||||
// IF FOREIGN:
|
||||
std::shared_ptr<ForeignInterface> m_foreignInterface;
|
||||
|
||||
};
|
||||
|
||||
|
||||
// IF FOREIGN:
|
||||
class ForeignInterfaceImpl final : public ForeignInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ForeignInterfaceImpl(// IF DTC:
|
||||
const std::shared_ptr<Interface::Dtc> &dtc
|
||||
// IF FTC:
|
||||
const std::shared_ptr<Interface::Ftc> &ftc
|
||||
);
|
||||
|
||||
// Add your Data thingies here: (don't forget to final override)
|
||||
examples examples() override final { return m_dtc->examples(); }
|
||||
// End
|
||||
|
||||
// NO SINGALS HERE! (specify in interface)
|
||||
|
||||
private:
|
||||
// IF DTC:
|
||||
std::shared_ptr<Interface::Dtc> m_dtc;
|
||||
// IF FTC:
|
||||
std::shared_ptr<Interface::Ftc> m_ftc;
|
||||
};
|
||||
|
||||
|
||||
} // namespace Skeleton
|
||||
@@ -0,0 +1,9 @@
|
||||
#
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
# Created by NAME, SLSE, YYYY-MM-DD
|
||||
#
|
||||
|
||||
#ADD_SUBDIRECTORY(YOUR_GUI_PLUGIN)
|
||||
@@ -0,0 +1,40 @@
|
||||
#
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
# Created by NAME, SLSE, YYYY-MM-DD
|
||||
#
|
||||
|
||||
SET(skl_YOUR_GUI_PLUGIN_gui_SRCS
|
||||
skl_YOUR_GUI_PLUGIN_gui_plugin.cpp
|
||||
skl_YOUR_GUI_PLUGIN_gui_plugin.h
|
||||
)
|
||||
|
||||
QT5_WRAP_UI(skl_YOUR_GUI_PLUGIN_gui_SRCS
|
||||
|
||||
)
|
||||
|
||||
NGL_ADD_LIBRARY(WS exmEditGuiPlugin MODULE ${exm_edit_gui_SRCS})
|
||||
NGL_TARGET_LINK_LIBRARIES(exmEditGuiPlugin
|
||||
NGLLogger
|
||||
svcAsmClient
|
||||
svcExmClient
|
||||
svcPdmClient
|
||||
LtsSession
|
||||
DataPluginInterface
|
||||
#pdmDataPluginInterface
|
||||
#asmDataPluginInterface
|
||||
#exmDataPluginInterface
|
||||
#exmGuiPluginInterface
|
||||
GuiPluginInterface
|
||||
Qt5::Widgets
|
||||
LtsWidgets
|
||||
LtsDataView
|
||||
zwmsuiel
|
||||
LtsUtilsGuiDds
|
||||
)
|
||||
|
||||
NGL_INSTALL_TARGET(exmEditGuiPlugin)
|
||||
|
||||
|
||||
Executable
+58
@@ -0,0 +1,58 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* GUI Plugin for Skeleton
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*
|
||||
* Created by NAME, SLSE, YYYY-MM-DD
|
||||
*/
|
||||
|
||||
#include "skl_YOUR_GUI_PLUGIN_gui_plugin.h"
|
||||
|
||||
#include <LtsSession/lts_session.h>
|
||||
|
||||
// IF DTC:
|
||||
#include <Services/Skeleton/skl_dtc.h>
|
||||
|
||||
// IF FTC:
|
||||
#include <Services/Skeleton/skl_ftc.h>
|
||||
|
||||
|
||||
namespace Skeleton
|
||||
{
|
||||
|
||||
std::shared_ptr<GuiPluginBase::Interface> GuiPlugin::createGuiInterface(LtsSession::LtsSession *session)
|
||||
{
|
||||
return std::make_shared<InterfaceImpl>(session);
|
||||
}
|
||||
|
||||
|
||||
InterfaceImpl::InterfaceImpl(LtsSession::LtsSession *session)
|
||||
: GuiPluginBase::Interface(session, getLogger("Plugins.Gui.Skl.YOUR_GUI_PLUGIN"))
|
||||
// IF DTC:
|
||||
, m_dtc(nullptr)
|
||||
|
||||
// IF FTC:
|
||||
, m_ftc(nullptr)
|
||||
|
||||
// Your Foreign Interface inits go here:
|
||||
{}
|
||||
|
||||
|
||||
bool InterfaceImpl::fetchInterfaces()
|
||||
{
|
||||
// IF DTC:
|
||||
if (!m_session->getDtc<ExerciseManagement::DataInterface>(m_dtc))
|
||||
return false;
|
||||
|
||||
// IF FTC:
|
||||
if (!m_session->getFtc<ExerciseManagement::DataInterface>(m_ftc))
|
||||
return false;
|
||||
|
||||
// Get your Foreign Interfaces here:
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace Skeleton
|
||||
Executable
+68
@@ -0,0 +1,68 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Gui Plugin for Skeleton
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*
|
||||
* Created by NAME, SLSE, YYYY-MM-DD
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
// IF SERVICE:
|
||||
#include <Services/Skeleton/logger.h>
|
||||
|
||||
#include <PluginInterfaces/gui_plugin_interface.h>
|
||||
#include <Common/ProjectConfig/project_defines.h>
|
||||
|
||||
// IF DTC/FTC:
|
||||
#include <Plugins/Skeleton/skl_data_plugin_interface.h>
|
||||
|
||||
#include <Plugins/Skeleton/skl_gui_plugin_interface.h>
|
||||
|
||||
// Add your Foreign Plugin Interfaces includes here: (e.g. '#include <Plugins/THAT_FOREIGN_PLUGIN/tfp_data_plugin_interface.h>')
|
||||
|
||||
|
||||
namespace Skeleton
|
||||
{
|
||||
|
||||
class GuiPlugin final : public QObject, public GuiPluginBase::Plugin
|
||||
{
|
||||
Q_PLUGIN_METADATA(IID "gui:3:skl")
|
||||
Q_INTERFACES(GuiPluginBase::Plugin)
|
||||
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit GuiPlugin() = default;
|
||||
~GuiPlugin() = default;
|
||||
|
||||
QString pluginName() override { return ForeignGuiInterface::pluginName(); }
|
||||
std::shared_ptr<GuiPluginBase::Interface> createGuiInterface(LtsSession::LtsSession *session) override;
|
||||
};
|
||||
|
||||
class InterfaceImpl final : public QObject, public GuiPluginBase::Interface
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit InterfaceImpl(LtsSession::LtsSession *session);
|
||||
|
||||
QString pluginName() override { return ForeignGuiInterface::pluginName(); }
|
||||
|
||||
// IF DTC/FTC:
|
||||
bool fetchInterfaces() override;
|
||||
|
||||
private:
|
||||
// Your methods that get called by actions (if you have some):
|
||||
|
||||
// IF DTC:
|
||||
std::shared_ptr<Skeleton::Interface::Dtc> m_dtc;
|
||||
|
||||
// IF FTC:
|
||||
std::shared_ptr<Skeleton::Interface::Ftc> m_ftc;
|
||||
|
||||
// Your needed Foreign Interfaces go here:
|
||||
|
||||
};
|
||||
|
||||
} // namespace ExerciseManagement
|
||||
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <PluginInterfaces/data_plugin_interface.h>
|
||||
|
||||
#include <QObject>
|
||||
|
||||
namespace Skeleton
|
||||
{
|
||||
|
||||
/**
|
||||
* @brief The DataInterface class provides the Topics Clients only for the GUI Plugins
|
||||
*/
|
||||
class DataInterface : public DataPluginBase::Interface
|
||||
{
|
||||
public:
|
||||
DataInterface(LtsSession::LtsSession *session, NGL::INGLLogger &logger)
|
||||
: DataPluginBase::Interface(session, logger)
|
||||
{}
|
||||
virtual ~DataInterface() = default;
|
||||
};
|
||||
|
||||
} //namespace Skeleton
|
||||
@@ -0,0 +1,44 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* HMI Plugin for Skeleton (Interface for access from other Plugins)
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*
|
||||
* Created by NAME, SLSE, DATUM YYYY-MM-DD
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
|
||||
#ifndef SKLGUIPLUGININTERFACE_EXPORT
|
||||
# ifdef BUILD_STATIC_LIBRARIES
|
||||
# define SKLGUIPLUGININTERFACE_EXPORT
|
||||
# else
|
||||
# if defined(MAKE_SKLGUIPLUGININTERFACE_LIB)
|
||||
# define SKLGUIPLUGININTERFACE_EXPORT Q_DECL_EXPORT
|
||||
# else
|
||||
# define SKLGUIPLUGININTERFACE_EXPORT Q_DECL_IMPORT
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
namespace Skeleton
|
||||
{
|
||||
|
||||
class SKLGUIPLUGININTERFACE_EXPORT ForeignGuiInterface : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ForeignGuiInterface() = default;
|
||||
virtual ~ForeignGuiInterface() = default;
|
||||
|
||||
static QString pluginName() { return QStringLiteral("SkeletonGui"); }
|
||||
|
||||
// Your custom, pure virtual methods go here ! Which interact with Gui elements / Gui Plugins
|
||||
};
|
||||
|
||||
} // namespace Skeleton
|
||||
Binary file not shown.
Executable
+18
@@ -0,0 +1,18 @@
|
||||
#
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
#ADD_SUBDIRECTORY(Data)
|
||||
|
||||
#
|
||||
# Data Plugin Interface
|
||||
#
|
||||
NGL_ADD_LIBRARY(WS sklDataPluginInterface SHARED skl_data_plugin_interface.h)
|
||||
NGL_TARGET_LINK_LIBRARIES(sklDataPluginInterface
|
||||
Qt5::Core
|
||||
clientPluginInterface
|
||||
)
|
||||
|
||||
NGL_INSTALL_TARGET(sklDataPluginInterface)
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <PluginInterfaces/data_plugin_interface.h>
|
||||
|
||||
#include <QObject>
|
||||
|
||||
namespace Skeleton
|
||||
{
|
||||
|
||||
/**
|
||||
* @brief The DataInterface class provides the Topics Clients only for the GUI Plugins
|
||||
*/
|
||||
class DataInterface : public DataPluginBase::Interface
|
||||
{
|
||||
public:
|
||||
DataInterface(LtsSession::LtsSession *session, NGL::INGLLogger &logger)
|
||||
: DataPluginBase::Interface(session, logger)
|
||||
{}
|
||||
virtual ~DataInterface() = default;
|
||||
};
|
||||
|
||||
} //namespace Skeleton
|
||||
Executable
+69
@@ -0,0 +1,69 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import os
|
||||
import sys
|
||||
import shutil
|
||||
import fileinput
|
||||
|
||||
#######################
|
||||
###### FUNCTIONS ######
|
||||
#######################
|
||||
|
||||
def copyAndReplaceInFile(sourceFile, destinationFile, replacements):
|
||||
with open(sourceFile) as inFile, open(destinationFile, "w") as outFile:
|
||||
for line in inFile:
|
||||
for before, after in replacements.iteritems():
|
||||
line = line.replace(before, after)
|
||||
outFile.write(line)
|
||||
|
||||
##########################
|
||||
###### SCRIPT START ######
|
||||
##########################
|
||||
|
||||
longName = raw_input("Enter Plugin name (in CamelCase): ")
|
||||
shortNameAllLow = raw_input("Enter Plugin abbreviation (3 lower case letters): ")
|
||||
shortNameCapital = shortNameAllLow.capitalize()
|
||||
shortNameAllUpper = shortNameAllLow.upper()
|
||||
|
||||
#create new directory
|
||||
dirName = "../" + longName
|
||||
print "Trying to create Plugin directory \"" + dirName + "\""
|
||||
if os.path.isdir(dirName):
|
||||
print "Directory \"" + dirName + "\" already exists. Exit"
|
||||
sys.exit(-1)
|
||||
else:
|
||||
os.mkdir(dirName)
|
||||
print ".. done"
|
||||
|
||||
#create new files to new dir
|
||||
print "Creating new files"
|
||||
replacements = { "skl":shortNameAllLow, "Skl":shortNameCapital, "SKL":shortNameAllUpper, "Skeleton":longName }
|
||||
copyAndReplaceInFile("base/CMakeLists.txt", "../" + longName + "/CMakeLists.txt", replacements)
|
||||
copyAndReplaceInFile("base/skl_data_plugin_interface.h", "../" + longName + "/" + shortNameAllLow + "_data_plugin_interface.h", replacements)
|
||||
print ".. done"
|
||||
|
||||
#adding in CMakeLists.txt
|
||||
cmakeFileName = "../CMakeLists.txt"
|
||||
print "Trying to add directory in", cmakeFileName
|
||||
cmakeFileObject = open(cmakeFileName)
|
||||
lines = cmakeFileObject.readlines()
|
||||
cmakeFileObject.close
|
||||
index = 0
|
||||
hasAddedSubDir = False
|
||||
beforeLine = "placeholder"
|
||||
for line in lines:
|
||||
if beforeLine.startswith("ADD_SUBDIRECTORY") and not line.startswith("ADD_SUBDIRECTORY"):
|
||||
hasAddedSubDir = True
|
||||
break
|
||||
beforeLine = line
|
||||
index += 1
|
||||
if hasAddedSubDir == True:
|
||||
lines.insert(index, "ADD_SUBDIRECTORY(" + longName + ")\n")
|
||||
cmakeFileObject = open(cmakeFileName, "w")
|
||||
for line in lines:
|
||||
cmakeFileObject.write(line)
|
||||
cmakeFileObject.close()
|
||||
print ".. done"
|
||||
else:
|
||||
print "Could not add sub directory, please add \"ADD_SUBDIRECTORY(" + longName + ")\""
|
||||
print "manually to", cmakeFileName
|
||||
Reference in new issue
Block a user