hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
command.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_SHARED_MODEL_COMMAND_HPP
7 #define IROHA_SHARED_MODEL_COMMAND_HPP
8 
9 #include <boost/variant/variant_fwd.hpp>
11 
12 namespace shared_model {
13  namespace interface {
14 
15  class AddAssetQuantity;
16  class AddPeer;
17  class AddSignatory;
18  class AppendRole;
19  class CreateAccount;
20  class CreateAsset;
21  class CreateDomain;
22  class CreateRole;
23  class DetachRole;
24  class GrantPermission;
25  class RemoveSignatory;
26  class RevokePermission;
27  class SetAccountDetail;
28  class SetQuorum;
29  class SubtractAssetQuantity;
30  class TransferAsset;
31 
36  class Command : public ModelPrimitive<Command> {
37  private:
39  template <typename... Value>
40  using wrap = boost::variant<const Value &...>;
41 
42  public:
45  AddPeer,
47  AppendRole,
51  CreateRole,
52  DetachRole,
57  SetQuorum,
60 
64  virtual const CommandVariantType &get() const = 0;
65 
66  // ------------------------| Primitive override |-------------------------
67 
68  std::string toString() const override;
69 
70  bool operator==(const ModelType &rhs) const override;
71  };
72 
73  } // namespace interface
74 } // namespace shared_model
75 
76 #endif // IROHA_SHARED_MODEL_COMMAND_HPP
Definition: add_signatory.hpp:18
Definition: set_quorum.hpp:17
Definition: subtract_asset_quantity.hpp:19
string(REPLACE".""/"CMAKE_SWIG_OUTDIR ${SWIG_JAVA_PKG}) else() set(CMAKE_SWIG_FLAGS"") endif() myswig_add_library(irohajava LANGUAGE java SOURCES bindings.i) unset(CMAKE_SWIG_FLAGS) swig_link_libraries(irohajava $
Definition: CMakeLists.txt:54
Definition: detach_role.hpp:18
Definition: remove_signatory.hpp:17
Definition: create_asset.hpp:17
bool operator==(const ModelType &rhs) const override
Definition: command.cpp:43
Definition: append_role.hpp:18
Definition: transfer_asset.hpp:18
Definition: create_domain.hpp:17
Definition: create_account.hpp:18
std::string toString() const override
Definition: command.cpp:39
Definition: grant_permission.hpp:18
Definition: set_account_detail.hpp:18
Definition: revoke_permission.hpp:18
Definition: model_primitive.hpp:23
Definition: command.hpp:36
Definition: add_asset_quantity.hpp:19
Definition: create_role.hpp:21
Definition: command_executor.hpp:12
wrap< AddAssetQuantity, AddPeer, AddSignatory, AppendRole, CreateAccount, CreateAsset, CreateDomain, CreateRole, DetachRole, GrantPermission, RemoveSignatory, RevokePermission, SetAccountDetail, SetQuorum, SubtractAssetQuantity, TransferAsset > CommandVariantType
Type of variant, that handle concrete command.
Definition: command.hpp:59
Definition: add_peer.hpp:19