2#include <boost/program_options.hpp>
3#include <boost/preprocessor/seq/for_each.hpp>
8#define APPBASE_PLUGIN_REQUIRES_VISIT( r, visitor, elem ) \
9 visitor( appbase::app().register_plugin<elem>() );
11#define APPBASE_PLUGIN_REQUIRES( PLUGINS ) \
12 template<typename Lambda> \
13 void plugin_requires( Lambda&& l ) { \
14 BOOST_PP_SEQ_FOR_EACH( APPBASE_PLUGIN_REQUIRES_VISIT, l, PLUGINS ) \
19 using boost::program_options::options_description;
20 using boost::program_options::variables_map;
39 virtual const std::string&
name()
const = 0;
41 virtual void initialize(
const variables_map& options) = 0;
47 template<
typename Impl>
virtual void set_program_options(options_description &cli, options_description &cfg)=0
virtual void handle_sighup()=0
virtual ~abstract_plugin()
@ stopped
the plugin is no longer running
@ started
the plugin is actively running
@ initialized
the plugin has initialized any state required but is idle
@ registered
the plugin is constructed but doesn't do anything
virtual const std::string & name() const =0
virtual void initialize(const variables_map &options)=0
virtual state get_state() const =0
virtual void shutdown()=0