Golos
Разработчикам Статистика Баунти Документация Партнеры Github
Public Member Functions | Friends | List of all members
golos::plugin::snapshot::snapshot_plugin Class Reference

#include <snapshot_plugin.hpp>

Inheritance diagram for golos::plugin::snapshot::snapshot_plugin:
golos::application::plugin golos::application::abstract_plugin

Public Member Functions

 snapshot_plugin (golos::application::application *app)
 
virtual ~snapshot_plugin ()
 
virtual std::string plugin_name () const override
 
virtual void plugin_initialize (const boost::program_options::variables_map &options) override
 
virtual void plugin_set_program_options (boost::program_options::options_description &command_line_options, boost::program_options::options_description &config_file_options) override
 Fill in command line parameters used by the plugin. More...
 
virtual void plugin_startup () override
 
const boost::bimap< std::string, std::string > & get_loaded_snapshots () const
 
- Public Member Functions inherited from golos::application::plugin
 plugin (application *app)
 
virtual ~plugin () override
 
virtual void plugin_shutdown () override
 Cleanly shut down the plugin. More...
 
chain::databasedatabase ()
 
applicationapp () const
 
- Public Member Functions inherited from golos::application::abstract_plugin
virtual ~abstract_plugin ()
 

Friends

class detail::snapshot_plugin_impl
 

Additional Inherited Members

- Protected Member Functions inherited from golos::application::plugin
network::node & p2p_node ()
 

Detailed Description

Definition at line 21 of file snapshot_plugin.hpp.

Constructor & Destructor Documentation

◆ snapshot_plugin()

golos::plugin::snapshot::snapshot_plugin::snapshot_plugin ( golos::application::application app)

The plugin requires a constructor which takes app. This is called regardless of whether the plugin is loaded. The app parameter should be passed up to the superclass constructor.

Definition at line 105 of file snapshot_plugin.cpp.

◆ ~snapshot_plugin()

golos::plugin::snapshot::snapshot_plugin::~snapshot_plugin ( )
virtual

Plugin is destroyed via base class pointer, so a virtual destructor must be provided.

Definition at line 111 of file snapshot_plugin.cpp.

Member Function Documentation

◆ get_loaded_snapshots()

const boost::bimap< string, string > & golos::plugin::snapshot::snapshot_plugin::get_loaded_snapshots ( ) const

Definition at line 141 of file snapshot_plugin.cpp.

◆ plugin_initialize()

void golos::plugin::snapshot::snapshot_plugin::plugin_initialize ( const boost::program_options::variables_map &  options)
overridevirtual

Called when the plugin is enabled, but before the database has been created.

Reimplemented from golos::application::plugin.

Definition at line 118 of file snapshot_plugin.cpp.

◆ plugin_name()

std::string golos::plugin::snapshot::snapshot_plugin::plugin_name ( ) const
overridevirtual

Every plugin needs a name.

Reimplemented from golos::application::plugin.

Definition at line 114 of file snapshot_plugin.cpp.

◆ plugin_set_program_options()

void golos::plugin::snapshot::snapshot_plugin::plugin_set_program_options ( boost::program_options::options_description &  command_line_options,
boost::program_options::options_description &  config_file_options 
)
overridevirtual

Fill in command line parameters used by the plugin.

Parameters
command_line_optionsAll options this plugin supports taking on the command-line
config_file_optionsAll options this plugin supports storing in a configuration file

This method populates its arguments with any command-line and configuration file options the plugin supports. If a plugin does not need these options, it may simply provide an empty implementation of this method.

Reimplemented from golos::application::plugin.

Definition at line 124 of file snapshot_plugin.cpp.

◆ plugin_startup()

void golos::plugin::snapshot::snapshot_plugin::plugin_startup ( )
overridevirtual

Called when the plugin is enabled.

Reimplemented from golos::application::plugin.

Definition at line 131 of file snapshot_plugin.cpp.

Friends And Related Function Documentation

◆ detail::snapshot_plugin_impl

friend class detail::snapshot_plugin_impl
friend

Definition at line 62 of file snapshot_plugin.hpp.


The documentation for this class was generated from the following files: