30 #include <boost/program_options.hpp>
33 namespace detail {
class application_impl; }
36 class abstract_plugin;
87 return default_options;
98 boost::program_options::options_description& configuration_file_options)
const;
100 std::shared_ptr<boost::program_options::variables_map> options)
const;
103 template<
typename PluginType>
105 auto plug = std::make_shared<PluginType>(*
this);
107 string cli_plugin_desc = plug->plugin_name() +
" plugin. " + plug->plugin_description() +
"\nOptions";
108 boost::program_options::options_description plugin_cli_options( cli_plugin_desc );
109 boost::program_options::options_description plugin_cfg_options;
110 plug->plugin_set_program_options(plugin_cli_options, plugin_cfg_options);
112 if( !plugin_cli_options.options().empty() )
113 _cli_options.add(plugin_cli_options);
115 if( !plugin_cfg_options.options().empty() )
117 std::string header_name =
"plugin-cfg-header-" + plug->plugin_name();
118 std::string header_desc = plug->plugin_name() +
" plugin options";
119 _cfg_options.add_options()(header_name.c_str(), header_desc.c_str());
120 _cfg_options.add(plugin_cfg_options);
123 add_available_plugin( plug );
130 std::shared_ptr<abstract_plugin>
get_plugin(
const string& name )
const;
132 template<
typename PluginType>
133 std::shared_ptr<PluginType>
get_plugin(
const string& name )
const
135 std::shared_ptr<abstract_plugin> abs_plugin =
get_plugin( name );
136 std::shared_ptr<PluginType> result = std::dynamic_pointer_cast<PluginType>( abs_plugin );
137 FC_ASSERT( result != std::shared_ptr<PluginType>(),
"Unable to load plugin '${p}'", (
"p",name) );
164 void add_available_plugin( std::shared_ptr<abstract_plugin> p )
const;
166 std::shared_ptr<detail::application_impl> my;
168 boost::program_options::options_description _cli_options;
169 boost::program_options::options_description _cfg_options;
175 ( enable_subscribe_to_all )
176 ( has_api_helper_indexes_plugin )
177 ( has_market_history_plugin )
178 ( api_limit_get_account_history )
179 ( api_limit_get_account_history_operations )
180 ( api_limit_get_account_history_by_operations )
181 ( api_limit_get_relative_account_history )
182 ( api_limit_get_market_history )
183 ( api_limit_get_trade_history )
184 ( api_limit_get_trade_history_by_sequence )
185 ( api_limit_get_liquidity_pool_history )
186 ( api_limit_get_top_markets )
187 ( api_limit_get_assets )
188 ( api_limit_get_asset_holders )
189 ( api_limit_get_key_references )
190 ( api_limit_get_full_accounts )
191 ( api_limit_get_full_accounts_lists )
192 ( api_limit_get_full_accounts_subscribe )
193 ( api_limit_get_top_voters )
194 ( api_limit_get_limit_orders )
195 ( api_limit_get_limit_orders_by_account )
196 ( api_limit_get_account_limit_orders )
197 ( api_limit_get_grouped_limit_orders )
198 ( api_limit_get_order_book )
199 ( api_limit_get_call_orders )
200 ( api_limit_get_settle_orders )
201 ( api_limit_get_collateral_bids )
202 ( api_limit_lookup_accounts )
203 ( api_limit_lookup_witness_accounts )
204 ( api_limit_lookup_committee_member_accounts )
205 ( api_limit_lookup_vote_ids )
206 ( api_limit_list_htlcs )
207 ( api_limit_get_htlc_by )
208 ( api_limit_get_withdraw_permissions_by_giver )
209 ( api_limit_get_withdraw_permissions_by_recipient )
210 ( api_limit_get_tickets )
211 ( api_limit_get_liquidity_pools )
212 ( api_limit_get_samet_funds )
213 ( api_limit_get_credit_offers )
214 ( api_limit_get_storage_info )