28 #include <boost/program_options.hpp> 60 virtual void plugin_initialize(
const boost::program_options::variables_map& options ) = 0;
89 boost::program_options::options_description& command_line_options,
90 boost::program_options::options_description& config_file_options
107 void plugin_initialize(
const boost::program_options::variables_map& options )
override;
111 boost::program_options::options_description& command_line_options,
112 boost::program_options::options_description& config_file_options
136 #define DEFAULT_VALUE_VECTOR(value) default_value({fc::json::to_string(value)}, fc::json::to_string(value)) 137 #define LOAD_VALUE_SET(options, name, container, type) \ 139 if( options.count(name) > 0 ) { \ 140 const std::vector<std::string>& ops = options[name].as<std::vector<std::string>>(); \ 141 std::transform(ops.begin(), ops.end(), std::inserter(container, container.end()), \ 142 &graphene::app::impl::dejsonify<type>); \ virtual ~abstract_plugin()=default
T dejsonify(const string &s, uint32_t max_depth)
std::shared_ptr< chain::database > chain_database() const
#define GRAPHENE_MAX_NESTED_OBJECTS
tracks the blockchain state in an extensible manner
std::shared_ptr< node > node_ptr
virtual std::string plugin_name() const =0
Get the name of the plugin.
net::node_ptr p2p_node() const
chain::database & database()
T as(uint32_t max_depth) const
virtual void plugin_startup()=0
Begin normal runtime operations.
virtual void plugin_shutdown()=0
Cleanly shut down the plugin.
abstract_plugin(application &a)
static variant from_string(const string &utf8_str, parse_type ptype=legacy_parser, uint32_t max_depth=DEFAULT_MAX_RECURSION_DEPTH)
virtual void plugin_set_program_options(boost::program_options::options_description &command_line_options, boost::program_options::options_description &config_file_options)=0
Fill in command line parameters used by the plugin.
application & app() const
Get a reference of the application bound to the plugin.
virtual void plugin_initialize(const boost::program_options::variables_map &options)=0
Perform early startup routines and register plugin indexes, callbacks, etc.
virtual std::string plugin_description() const =0
Get the description of the plugin.