hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
proto_command.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_SHARED_MODEL_PROTO_COMMAND_HPP
7 #define IROHA_SHARED_MODEL_PROTO_COMMAND_HPP
8 
9 #include "commands.pb.h"
11 
12 namespace shared_model {
13  namespace proto {
14 
15  class Command final : public interface::Command {
16  public:
17  using TransportType = iroha::protocol::Command;
18 
19  Command(Command &&o) noexcept;
20 
21  explicit Command(TransportType &ref);
22 
23  ~Command() override;
24 
25  const CommandVariantType &get() const override;
26 
27  protected:
28  // TODO [IR-126] Akvinikym 13.12.18: Rework inheritance hierarchy so that
29  // this clone will disappear
30  Command *clone() const override;
31 
32  private:
33  struct Impl;
34  std::unique_ptr<Impl> impl_;
35 
36  void logError(const std::string &message) const;
37  };
38  } // namespace proto
39 } // namespace shared_model
40 
41 #endif // IROHA_SHARED_MODEL_PROTO_COMMAND_HPP
Definition: proto_command.hpp:15
const CommandVariantType & get() const override
Definition: proto_command.cpp:78
Definition: peer.hpp:48
Command * clone() const override
Definition: proto_command.cpp:82
iroha::protocol::Command TransportType
Definition: proto_command.hpp:17
Definition: proto_command.cpp:54
Definition: command.hpp:36
Command(Command &&o) noexcept
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