hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
proto_block_query_response.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_SHARED_MODEL_PROTO_BLOCK_QUERY_RESPONSE_HPP
7 #define IROHA_SHARED_MODEL_PROTO_BLOCK_QUERY_RESPONSE_HPP
8 
14 #include "qry_responses.pb.h"
15 
16 namespace shared_model {
17  namespace proto {
18  class BlockQueryResponse final
19  : public CopyableProto<interface::BlockQueryResponse,
20  iroha::protocol::BlockQueryResponse,
21  BlockQueryResponse> {
22  private:
24  using ProtoQueryResponseVariantType =
25  boost::variant<BlockResponse, BlockErrorResponse>;
26 
27  public:
28  template <typename QueryResponseType>
29  explicit BlockQueryResponse(QueryResponseType &&queryResponse);
30 
32 
34 
35  const QueryResponseVariantType &get() const override;
36 
37  private:
38  const ProtoQueryResponseVariantType variant_;
39  const QueryResponseVariantType ivariant_;
40  };
41  } // namespace proto
42 } // namespace shared_model
43 
44 #endif // IROHA_SHARED_MODEL_PROTO_BLOCK_QUERY_RESPONSE_HPP
Definition: proto_block_query_response.hpp:18
BlockQueryResponse(QueryResponseType &&queryResponse)
Definition: proto_block_query_response.cpp:14
Definition: command_executor.hpp:12
w< BlockResponse, BlockErrorResponse > QueryResponseVariantType
Type of container with all concrete query response.
Definition: block_query_response.hpp:31
Definition: trivial_proto.hpp:45