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;
35  class QueryResponse : public ModelPrimitive<QueryResponse> {
36  private:
38  template <typename... Value>
39  using w = boost::variant<const Value &...>;
40 
41  public:
56 
60  virtual const QueryResponseVariantType &get() const = 0;
61 
65  virtual const interface::types::HashType &queryHash() const = 0;
66 
67  // ------------------------| Primitive override |-------------------------
68 
69  std::string toString() const override;
70 
71  bool operator==(const ModelType &rhs) const override;
72  };
73  } // namespace interface
74 } // namespace shared_model
75 #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:45
Definition: role_permissions.hpp:19
Definition: asset_response.hpp:18
Definition: query_response.hpp:35
Definition: peers_response.hpp:23
Definition: transactions_response.hpp:19
std::string toString() const override
Definition: query_response.cpp:37
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:12
w< AccountAssetResponse, AccountDetailResponse, AccountResponse, ErrorQueryResponse, SignatoriesResponse, TransactionsResponse, AssetResponse, RolesResponse, RolePermissionsResponse, TransactionsPageResponse, PendingTransactionsPageResponse, BlockResponse, PeersResponse > QueryResponseVariantType
Type of container with all concrete query response.
Definition: query_response.hpp:55
bool operator==(const ModelType &rhs) const override
Definition: query_response.cpp:41