hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
proposal_factory.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_PROPOSAL_FACTORY_HPP
7 #define IROHA_PROPOSAL_FACTORY_HPP
8 
9 #include <memory>
10 
11 #include <boost/range/any_range.hpp>
12 #include "common/result.hpp"
14 
15 namespace shared_model {
16  namespace interface {
17  class Proposal;
18 
23  public:
24  template <typename T>
25  using FactoryResult = iroha::expected::Result<T, std::string>;
26 
28  boost::any_range<Transaction,
29  boost::forward_traversal_tag,
30  const Transaction &>;
31 
33  types::HeightType height,
34  types::TimestampType created_time,
35  TransactionsCollectionType transactions) = 0;
36 
37  virtual ~ProposalFactory() = default;
38  };
39  } // namespace interface
40 } // namespace shared_model
41 
42 #endif // IROHA_PROPOSAL_FACTORY_HPP
uint64_t HeightType
Type of height (for Block, Proposal etc)
Definition: types.hpp:39
virtual FactoryResult< std::unique_ptr< Proposal > > createProposal(types::HeightType height, types::TimestampType created_time, TransactionsCollectionType transactions)=0
boost::any_range< Transaction, boost::forward_traversal_tag, const Transaction & > TransactionsCollectionType
Definition: proposal_factory.hpp:30
Definition: proposal_factory.hpp:22
Definition: command_executor.hpp:12
Definition: transaction.hpp:22
iroha::expected::Result< T, std::string > FactoryResult
Definition: proposal_factory.hpp:25
uint64_t TimestampType
Type of timestamp.
Definition: types.hpp:59