testplugin.hh
Go to the documentation of this file.
/* -*- mia-c++ -*-
*
* This file is part of MIA - a toolbox for medical image analysis
* Copyright (c) Leipzig, Madrid 1999-2017 Gert Wollny
*
* MIA is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with MIA; if not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef ph_testplugin_hh
#define ph_testplugin_hh
#include <mia/core/plugin_base.hh>
#include <mia/core/handler.hh>
NS_MIA_BEGIN
struct test_plugin_type;
struct test_plugin_data;
EXPORT_CORE extern const char *const test_property;
extern template class EXPORT_CORE TPlugin<test_plugin_data, test_plugin_type>;
class EXPORT_CORE CTestPlugin: public TPlugin<test_plugin_data, test_plugin_type>
{
public:
CTestPlugin(const char *name);
static ::boost::filesystem::path search_path();
};
template <> const char *const TPluginHandler<CTestPlugin>::m_help;
extern template class TPluginHandler<CTestPlugin>;
class EXPORT_CORE CTestPluginHandlerImpl : public TPluginHandler<CTestPlugin>
{
protected:
CTestPluginHandlerImpl();
public:
CTestPlugin *get_plugin(const char *name) const;
};
extern template class EXPORT_CORE THandlerSingleton<CTestPluginHandlerImpl>;
typedef THandlerSingleton<CTestPluginHandlerImpl> CTestPluginHandler;
NS_MIA_END
#endif
CTestPluginHandlerImpl::get_plugin
CTestPlugin * get_plugin(const char *name) const
CTestPluginHandlerImpl::CTestPluginHandlerImpl
CTestPluginHandlerImpl()
CTestPlugin
Class to test plugin handling.
Definition testplugin.hh:44
CTestPlugin::search_path
::boost::filesystem::path search_path()
CTestPlugin::CTestPlugin
CTestPlugin(const char *name)
Construct the test plugin with the given name.
THandlerSingleton
the singleton that a plug-in handler really is
Definition handler.hh:159
TPluginHandler
The basic template of all plugin handlers.
Definition handler.hh:57
TPluginHandler< CTestPlugin >::TPluginHandler
TPluginHandler()
TPlugin
The generic base for all plug-ins.
Definition plugin_base.hh:172
TPlugin< test_plugin_data, test_plugin_type >::TPlugin
TPlugin(const char *name)
NS_MIA_BEGIN
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
Definition defines.hh:33
EXPORT_CORE
#define EXPORT_CORE
Macro to manage Visual C++ style dllimport/dllexport.
Definition defines.hh:101
NS_MIA_END
#define NS_MIA_END
conveniance define to end the mia namespace
Definition defines.hh:36
handler.hh
plugin_base.hh
CTestPluginHandler
THandlerSingleton< CTestPluginHandlerImpl > CTestPluginHandler
Definition testplugin.hh:89
test_property
EXPORT_CORE const char *const test_property
constant defining a test property