hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
query_response.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_SHARED_MODEL_QUERY_RESPONSE_HPP
7 #define IROHA_SHARED_MODEL_QUERY_RESPONSE_HPP
8 
10 
11 #include <boost/variant/variant_fwd.hpp>
13 
14 namespace shared_model {
15  namespace interface {
16 
17  class AccountAssetResponse;
18  class AccountDetailResponse;
19  class AccountResponse;
20  class BlockResponse;
21  class ErrorQueryResponse;
22  class SignatoriesResponse;
23  class TransactionsResponse;
24  class PendingTransactionsPageResponse;
25  class AssetResponse;
26  class RolesResponse;
27  class RolePermissionsResponse;
28  class TransactionsPageResponse;
29  class PeersResponse;
30  class EngineReceiptsResponse;
36  class QueryResponse : public ModelPrimitive<QueryResponse> {
37  private:
39  template <typename... Value>
40  using w = boost::variant<const Value &...>;
41 
42  public:
58 
62  virtual const QueryResponseVariantType &get() const = 0;
63 
67  virtual const interface::types::HashType &queryHash() const = 0;
68 
69  // ------------------------| Primitive override |-------------------------
70 
71  std::string toString() const override;
72 
73  bool operator==(const ModelType &rhs) const override;
74  };
75  } // namespace interface
76 } // namespace shared_model
77 #endif // IROHA_SHARED_MODEL_QUERY_RESPONSE_HPP
Definition: pending_transactions_page_response.hpp:22
virtual const interface::types::HashType & queryHash() const =0
Definition: hash.hpp:18
Definition: transactions_page_response.hpp:20
shared_model::interface::ErrorQueryResponse ErrorQueryResponse
Definition: postgres_specific_query_executor.hpp:47
QueryResponse ModelType
Definition: model_primitive.hpp:27
Definition: role_permissions.hpp:19
Definition: asset_response.hpp:18
Definition: query_response.hpp:36
w< AccountAssetResponse, AccountDetailResponse, AccountResponse, ErrorQueryResponse, SignatoriesResponse, TransactionsResponse, AssetResponse, RolesResponse, RolePermissionsResponse, TransactionsPageResponse, PendingTransactionsPageResponse, BlockResponse, PeersResponse, EngineReceiptsResponse > QueryResponseVariantType
Type of container with all concrete query response.
Definition: query_response.hpp:57
Definition: peers_response.hpp:23
Definition: engine_receipts_response.hpp:21
Definition: transactions_response.hpp:19
std::string toString() const override
Definition: query_response.cpp:38
Definition: account_detail_response.hpp:20
Definition: block_response.hpp:21
Definition: account_response.hpp:19
Definition: account_asset_response.hpp:20
Definition: roles_response.hpp:18
Definition: model_primitive.hpp:22
Definition: signatories_response.hpp:18
Definition: command_executor.hpp:13
bool operator==(const ModelType &rhs) const override
Definition: query_response.cpp:42