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.hpp"
10 #include "model/block.hpp"
12 
13 namespace iroha {
14  namespace model {
15  namespace converters {
16 
18  public:
19  explicit JsonBlockFactory(
20  logger::Logger log = logger::log("JsonBlockFactory"));
21  rapidjson::Document serialize(const Block &block);
22 
23  boost::optional<Block> deserialize(const rapidjson::Document &document);
24 
25  private:
26  JsonTransactionFactory factory_;
27  logger::Logger log_;
28  };
29 
30  } // namespace converters
31  } // namespace model
32 } // namespace iroha
33 
34 #endif // IROHA_JSON_BLOCK_FACTORY_HPP
JsonBlockFactory(logger::Logger log=logger::log("JsonBlockFactory"))
Definition: json_block_factory.cpp:14
rapidjson::Document serialize(const Block &block)
Definition: json_block_factory.cpp:17
std::shared_ptr< spdlog::logger > Logger
Definition: logger.hpp:26
Definition: block_query.hpp:16
Definition: json_transaction_factory.hpp:16
Logger log(const std::string &tag)
Definition: logger.cpp:48
Definition: json_block_factory.hpp:17
boost::optional< Block > deserialize(const rapidjson::Document &document)
Definition: json_block_factory.cpp:60
Definition: block.hpp:24