Scorum
Classes | Namespaces | Macros
plugin.hpp File Reference
#include <scorum/app/application.hpp>
#include <scorum/chain/evaluators/evaluator.hpp>
#include <scorum/chain/database/database.hpp>
#include <boost/program_options.hpp>
#include <fc/io/json.hpp>
#include <fc/static_variant.hpp>
#include <fc/unique_ptr.hpp>
#include <fc/vector.hpp>
#include <memory>

Go to the source code of this file.

Classes

class  scorum::app::abstract_plugin
 
class  scorum::app::plugin
 

Namespaces

 scorum
 
 scorum::app
 

Macros

#define SCORUM_DEFINE_PLUGIN(plugin_name, plugin_class)
 
#define DEFINE_PLUGIN_EVALUATOR(PLUGIN, OPERATION, X)
 
#define DEFAULT_VALUE_VECTOR(value)   default_value({ fc::json::to_string(value) }, fc::json::to_string(value))
 
#define LOAD_VALUE_SET(options, name, container, type)
 
template<typename T >
scorum::app::dejsonify (const std::string &s)
 

Macro Definition Documentation

◆ DEFAULT_VALUE_VECTOR

#define DEFAULT_VALUE_VECTOR (   value)    default_value({ fc::json::to_string(value) }, fc::json::to_string(value))

Definition at line 144 of file plugin.hpp.

◆ DEFINE_PLUGIN_EVALUATOR

#define DEFINE_PLUGIN_EVALUATOR (   PLUGIN,
  OPERATION,
 
)
Value:
class X##_evaluator : public scorum::chain::evaluator_impl<scorum::chain::database, X##_evaluator, OPERATION> \
{ \
public: \
typedef X##_operation operation_type; \
\
X##_evaluator(database& db, PLUGIN* plugin) \
, _plugin(plugin) \
{ \
} \
\
void do_apply(const X##_operation& o); \
\
PLUGIN* _plugin; \
};

Definition at line 166 of file plugin.hpp.

◆ LOAD_VALUE_SET

#define LOAD_VALUE_SET (   options,
  name,
  container,
  type 
)
Value:
if (options.count(name)) \
{ \
const std::vector<std::string>& ops = options[name].as<std::vector<std::string>>(); \
std::transform(ops.begin(), ops.end(), std::inserter(container, container.end()), \
&scorum::app::dejsonify<type>); \
}

Definition at line 145 of file plugin.hpp.

◆ SCORUM_DEFINE_PLUGIN

#define SCORUM_DEFINE_PLUGIN (   plugin_name,
  plugin_class 
)
Value:
namespace scorum { \
namespace plugin { \
std::shared_ptr<scorum::app::abstract_plugin> create_##plugin_name##_plugin(app::application* app) \
{ \
return std::make_shared<plugin_class>(app); \
} \
} \
}
Definition: asset.cpp:15

Definition at line 156 of file plugin.hpp.