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 
9 #include <boost/variant/variant_fwd.hpp>
10 
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;
34  class QueryResponse : public ModelPrimitive<QueryResponse> {
35  private:
37  template <typename... Value>
38  using w = boost::variant<const Value &...>;
39 
40  public:
54 
58  virtual const QueryResponseVariantType &get() const = 0;
59 
63  virtual const interface::types::HashType &queryHash() const = 0;
64 
65  // ------------------------| Primitive override |-------------------------
66 
67  std::string toString() const override;
68 
69  bool operator==(const ModelType &rhs) const override;
70  };
71  } // namespace interface
72 } // namespace shared_model
73 #endif // IROHA_SHARED_MODEL_QUERY_RESPONSE_HPP
Definition: pending_transactions_page_response.hpp:21
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_query_executor.hpp:45
Definition: role_permissions.hpp:18
Definition: asset_response.hpp:17
w< AccountAssetResponse, AccountDetailResponse, AccountResponse, ErrorQueryResponse, SignatoriesResponse, TransactionsResponse, AssetResponse, RolesResponse, RolePermissionsResponse, TransactionsPageResponse, PendingTransactionsPageResponse, BlockResponse > QueryResponseVariantType
Type of container with all concrete query response.
Definition: query_response.hpp:53
Definition: query_response.hpp:34
Definition: transactions_response.hpp:18
std::string toString() const override
Definition: query_response.cpp:36
Definition: account_detail_response.hpp:17
Definition: block_response.hpp:20
Definition: account_response.hpp:18
Definition: account_asset_response.hpp:19
Definition: roles_response.hpp:17
Definition: model_primitive.hpp:23
Definition: signatories_response.hpp:17
Definition: command_executor.hpp:12
bool operator==(const ModelType &rhs) const override
Definition: query_response.cpp:40