hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
proposal.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_SHARED_MODEL_PROTO_PROPOSAL_HPP
7 #define IROHA_SHARED_MODEL_PROTO_PROPOSAL_HPP
8 
11 #include "proposal.pb.h"
12 
13 namespace shared_model {
14  namespace proto {
15  class Proposal final : public interface::Proposal {
16  public:
17  using TransportType = iroha::protocol::Proposal;
18 
19  Proposal(Proposal &&o) noexcept;
20  Proposal &operator=(Proposal &&o) noexcept = default;
21 
22  explicit Proposal(const TransportType &ref);
23  explicit Proposal(TransportType &&ref);
24 
26  const override;
27 
28  interface::types::TimestampType createdTime() const override;
29 
30  interface::types::HeightType height() const override;
31 
32  const interface::types::BlobType &blob() const override;
33 
34  const TransportType &getTransport() const;
35 
36  const interface::types::HashType &hash() const override;
37 
38  ~Proposal() override;
39 
40  protected:
41  Proposal::ModelType *clone() const override;
42 
43  private:
44  struct Impl;
45  std::unique_ptr<Impl> impl_;
46  };
47  } // namespace proto
48 } // namespace shared_model
49 
50 #endif // IROHA_PROPOSAL_HPP
uint64_t HeightType
Type of height (for Block, Proposal etc)
Definition: types.hpp:43
Definition: hash.hpp:18
Definition: blob.hpp:24
interface::types::HeightType height() const override
Definition: proposal.cpp:52
Definition: proposal.hpp:15
Definition: peer.hpp:48
const interface::types::BlobType & blob() const override
Definition: proposal.cpp:56
Definition: proposal.hpp:17
interface::types::TimestampType createdTime() const override
Definition: proposal.cpp:48
Definition: range_types.hpp:19
Proposal(Proposal &&o) noexcept
Proposal::ModelType * clone() const override
Definition: proposal.cpp:64
const TransportType & getTransport() const
Definition: proposal.cpp:60
interface::types::TransactionsCollectionType transactions() const override
Definition: proposal.cpp:44
iroha::protocol::Proposal TransportType
Definition: proposal.hpp:17
Definition: command_executor.hpp:12
Definition: proposal.cpp:15
const interface::types::HashType & hash() const override
Definition: proposal.cpp:68
uint64_t TimestampType
Type of timestamp.
Definition: types.hpp:64
boost::any_range< Transaction, boost::random_access_traversal_tag, const Transaction & > TransactionsCollectionType
Type of transactions&#39; collection.
Definition: range_types.hpp:29