ledger-core
CurrencyUnit.hpp
1 // AUTOGENERATED FILE - DO NOT MODIFY!
2 // This file generated by Djinni from currency.djinni
3 
4 #ifndef DJINNI_GENERATED_CURRENCYUNIT_HPP
5 #define DJINNI_GENERATED_CURRENCYUNIT_HPP
6 
7 #include <cstdint>
8 #include <iostream>
9 #include <string>
10 #include <utility>
11 
12 namespace ledger { namespace core { namespace api {
13 
15 struct CurrencyUnit final {
17  std::string name;
19  std::string symbol;
21  std::string code;
23  int32_t numberOfDecimal;
24 
25  CurrencyUnit(std::string name_,
26  std::string symbol_,
27  std::string code_,
28  int32_t numberOfDecimal_)
29  : name(std::move(name_))
30  , symbol(std::move(symbol_))
31  , code(std::move(code_))
32  , numberOfDecimal(std::move(numberOfDecimal_))
33  {}
34 
35  CurrencyUnit(const CurrencyUnit& cpy) {
36  this->name = cpy.name;
37  this->symbol = cpy.symbol;
38  this->code = cpy.code;
39  this->numberOfDecimal = cpy.numberOfDecimal;
40  }
41 
42  CurrencyUnit() = default;
43 
44 
45  CurrencyUnit& operator=(const CurrencyUnit& cpy) {
46  this->name = cpy.name;
47  this->symbol = cpy.symbol;
48  this->code = cpy.code;
49  this->numberOfDecimal = cpy.numberOfDecimal;
50  return *this;
51  }
52 
53  template <class Archive>
54  void load(Archive& archive) {
55  archive(name, symbol, code, numberOfDecimal);
56  }
57 
58  template <class Archive>
59  void save(Archive& archive) const {
60  archive(name, symbol, code, numberOfDecimal);
61  }
62 };
63 
64 } } } // namespace ledger::core::api
65 #endif //DJINNI_GENERATED_CURRENCYUNIT_HPP
Definition: BitcoinLikeFeePolicy.hpp:29
std::string symbol
Definition: CurrencyUnit.hpp:19
std::string code
Definition: CurrencyUnit.hpp:21
Definition: CurrencyUnit.hpp:15
Definition: Account.cpp:8
std::string name
Definition: CurrencyUnit.hpp:17
int32_t numberOfDecimal
Definition: CurrencyUnit.hpp:23