hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
json_block_factory.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_JSON_BLOCK_FACTORY_HPP
7 #define IROHA_JSON_BLOCK_FACTORY_HPP
8 
9 #include "logger/logger_fwd.hpp"
10 #include "model/block.hpp"
12 
13 namespace iroha {
14  namespace model {
15  namespace converters {
16 
18  public:
19  explicit JsonBlockFactory(logger::LoggerPtr log);
20  rapidjson::Document serialize(const Block &block);
21 
22  boost::optional<Block> deserialize(const rapidjson::Document &document);
23 
24  private:
25  JsonTransactionFactory factory_;
26  logger::LoggerPtr log_;
27  };
28 
29  } // namespace converters
30  } // namespace model
31 } // namespace iroha
32 
33 #endif // IROHA_JSON_BLOCK_FACTORY_HPP
rapidjson::Document serialize(const Block &block)
Definition: json_block_factory.cpp:17
std::shared_ptr< Logger > LoggerPtr
Definition: logger_fwd.hpp:22
Definition: block_query.hpp:14
Definition: json_transaction_factory.hpp:16
JsonBlockFactory(logger::LoggerPtr log)
Definition: json_block_factory.cpp:14
Definition: json_block_factory.hpp:17
boost::optional< Block > deserialize(const rapidjson::Document &document)
Definition: json_block_factory.cpp:60
Definition: block.hpp:24