ledger-core
Block.hpp
1 // AUTOGENERATED FILE - DO NOT MODIFY!
2 // This file generated by Djinni from wallet.djinni
3 
4 #ifndef DJINNI_GENERATED_BLOCK_HPP
5 #define DJINNI_GENERATED_BLOCK_HPP
6 
7 #include <chrono>
8 #include <cstdint>
9 #include <iostream>
10 #include <string>
11 #include <utility>
12 
13 namespace ledger { namespace core { namespace api {
14 
16 struct Block final {
18  std::string blockHash;
20  std::string uid;
22  std::chrono::system_clock::time_point time;
24  std::string currencyName;
26  int64_t height;
27 
28  Block(std::string blockHash_,
29  std::string uid_,
30  std::chrono::system_clock::time_point time_,
31  std::string currencyName_,
32  int64_t height_)
33  : blockHash(std::move(blockHash_))
34  , uid(std::move(uid_))
35  , time(std::move(time_))
36  , currencyName(std::move(currencyName_))
37  , height(std::move(height_))
38  {}
39 
40  Block(const Block& cpy) {
41  this->blockHash = cpy.blockHash;
42  this->uid = cpy.uid;
43  this->time = cpy.time;
44  this->currencyName = cpy.currencyName;
45  this->height = cpy.height;
46  }
47 
48  Block() = default;
49 
50 
51  Block& operator=(const Block& cpy) {
52  this->blockHash = cpy.blockHash;
53  this->uid = cpy.uid;
54  this->time = cpy.time;
55  this->currencyName = cpy.currencyName;
56  this->height = cpy.height;
57  return *this;
58  }
59 
60  template <class Archive>
61  void load(Archive& archive) {
62  archive(blockHash, uid, time, currencyName, height);
63  }
64 
65  template <class Archive>
66  void save(Archive& archive) const {
67  archive(blockHash, uid, time, currencyName, height);
68  }
69 };
70 
71 } } } // namespace ledger::core::api
72 #endif //DJINNI_GENERATED_BLOCK_HPP
std::string uid
Definition: Block.hpp:20
Definition: BitcoinLikeFeePolicy.hpp:29
Definition: Block.hpp:16
int64_t height
Definition: Block.hpp:26
Definition: Account.cpp:8
std::string blockHash
Definition: Block.hpp:18
std::string currencyName
Definition: Block.hpp:24
std::chrono::system_clock::time_point time
Definition: Block.hpp:22