-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtemplate_plugin.cpp
More file actions
37 lines (29 loc) · 903 Bytes
/
template_plugin.cpp
File metadata and controls
37 lines (29 loc) · 903 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include <eosio/template_plugin/template_plugin.hpp>
namespace eosio {
static appbase::abstract_plugin& _template_plugin = app().register_plugin<template_plugin>();
class template_plugin_impl {
public:
};
template_plugin::template_plugin():my(new template_plugin_impl()){}
template_plugin::~template_plugin(){}
void template_plugin::set_program_options(options_description&, options_description& cfg) {
cfg.add_options()
("option-name", bpo::value<string>()->default_value("default value"),
"Option Description")
;
}
void template_plugin::plugin_initialize(const variables_map& options) {
try {
if( options.count( "option-name" )) {
// Handle the option
}
}
FC_LOG_AND_RETHROW()
}
void template_plugin::plugin_startup() {
// Make the magic happen
}
void template_plugin::plugin_shutdown() {
// OK, that's enough magic
}
}