hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
proto_query.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_SHARED_MODEL_PROTO_QUERY_HPP
7 #define IROHA_SHARED_MODEL_PROTO_QUERY_HPP
8 
10 
11 #include "queries.pb.h"
12 
13 namespace shared_model {
14  namespace proto {
15 
16  class Query FINAL : public interface::Query {
17  public:
19 
20  Query(const Query &o);
21  Query(Query &&o) noexcept;
22 
23  explicit Query(const TransportType &ref);
24  explicit Query(TransportType &&ref);
25 
26  ~Query() override;
27 
28  const Query::QueryVariantType &get() const override;
29 
30  const interface::types::AccountIdType &creatorAccountId() const override;
31 
32  interface::types::CounterType queryCounter() const override;
33 
34  const interface::types::BlobType &blob() const override;
35 
36  const interface::types::BlobType &payload() const override;
37 
38  // ------------------------| Signable override |-------------------------
39  interface::types::SignatureRangeType signatures() const override;
40 
41  bool addSignature(const crypto::Signed &signed_blob,
42  const crypto::PublicKey &public_key) override;
43 
44  interface::types::TimestampType createdTime() const override;
45 
46  const TransportType &getTransport() const;
47 
48  protected:
49  Query *clone() const override;
50 
51  private:
52  struct Impl;
53  std::unique_ptr<Impl> impl_;
54  };
55 
56  } // namespace proto
57 } // namespace shared_model
58 
59 #endif // IROHA_SHARED_MODEL_PROTO_QUERY_HPP
Definition: blob.hpp:24
boost::optional< Proto > get(const std::string &blob)
Definition: client_api.cpp:24
std::unique_ptr< T > clone(const T &object)
Definition: cloneable.hpp:39
Definition: peer.hpp:48
boost::any_range< interface::Signature, boost::forward_traversal_tag, const Signature & > SignatureRangeType
Type of signature range, which returns when signatures are invoked.
Definition: range_types.hpp:24
#define FINAL
Definition: swig_keyword_hider.hpp:17
std::string AccountIdType
Type of account id.
Definition: types.hpp:37
Definition: range_types.hpp:19
uint64_t CounterType
Type of counter.
Definition: types.hpp:65
wrap< GetAccount, GetSignatories, GetAccountTransactions, GetAccountAssetTransactions, GetTransactions, GetAccountAssets, GetAccountDetail, GetRoles, GetRolePermissions, GetAssetInfo, GetPendingTransactions, GetBlock > QueryVariantType
Type of variant, that handle concrete query.
Definition: query.hpp:53
Definition: command_executor.hpp:12
iroha::protocol::Query TransportType
Definition: proto_query.hpp:18
uint64_t TimestampType
Type of timestamp.
Definition: types.hpp:61