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 AssetResponse;
25  class RolesResponse;
26  class RolePermissionsResponse;
27  class TransactionsPageResponse;
33  class QueryResponse : public ModelPrimitive<QueryResponse> {
34  private:
36  template <typename... Value>
37  using w = boost::variant<const Value &...>;
38 
39  public:
52 
56  virtual const QueryResponseVariantType &get() const = 0;
57 
61  virtual const interface::types::HashType &queryHash() const = 0;
62 
63  // ------------------------| Primitive override |-------------------------
64 
65  std::string toString() const override;
66 
67  bool operator==(const ModelType &rhs) const override;
68  };
69  } // namespace interface
70 } // namespace shared_model
71 #endif // IROHA_SHARED_MODEL_QUERY_RESPONSE_HPP
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
Definition: query_response.hpp:33
Definition: transactions_response.hpp:18
std::string toString() const override
Definition: query_response.cpp:35
Definition: account_detail_response.hpp:17
Definition: block_response.hpp:20
Definition: account_response.hpp:18
Definition: account_asset_response.hpp:18
Definition: roles_response.hpp:17
w< AccountAssetResponse, AccountDetailResponse, AccountResponse, ErrorQueryResponse, SignatoriesResponse, TransactionsResponse, AssetResponse, RolesResponse, RolePermissionsResponse, TransactionsPageResponse, BlockResponse > QueryResponseVariantType
Type of container with all concrete query response.
Definition: query_response.hpp:51
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:39