ledger-core
Currency.hpp
1 // AUTOGENERATED FILE - DO NOT MODIFY!
2 // This file generated by Djinni from currency.djinni
3 
4 #ifndef DJINNI_GENERATED_CURRENCY_HPP
5 #define DJINNI_GENERATED_CURRENCY_HPP
6 
7 #include "../utils/optional.hpp"
8 #include "BitcoinLikeNetworkParameters.hpp"
9 #include "CurrencyUnit.hpp"
10 #include "EthereumLikeNetworkParameters.hpp"
11 #include "RippleLikeNetworkParameters.hpp"
12 #include "TezosLikeNetworkParameters.hpp"
13 #include "WalletType.hpp"
14 #include <cstdint>
15 #include <iostream>
16 #include <string>
17 #include <utility>
18 #include <vector>
19 
20 namespace ledger { namespace core { namespace api {
21 
23 struct Currency final {
27  std::string name;
32  int32_t bip44CoinType;
34  std::string paymentUriScheme;
36  std::vector<CurrencyUnit> units;
48 
49  Currency(WalletType walletType_,
50  std::string name_,
51  int32_t bip44CoinType_,
52  std::string paymentUriScheme_,
53  std::vector<CurrencyUnit> units_,
58  : walletType(std::move(walletType_))
59  , name(std::move(name_))
60  , bip44CoinType(std::move(bip44CoinType_))
61  , paymentUriScheme(std::move(paymentUriScheme_))
62  , units(std::move(units_))
63  , bitcoinLikeNetworkParameters(std::move(bitcoinLikeNetworkParameters_))
64  , ethereumLikeNetworkParameters(std::move(ethereumLikeNetworkParameters_))
65  , rippleLikeNetworkParameters(std::move(rippleLikeNetworkParameters_))
66  , tezosLikeNetworkParameters(std::move(tezosLikeNetworkParameters_))
67  {}
68 
69  Currency(const Currency& cpy) {
70  this->walletType = cpy.walletType;
71  this->name = cpy.name;
72  this->bip44CoinType = cpy.bip44CoinType;
73  this->paymentUriScheme = cpy.paymentUriScheme;
74  this->units = cpy.units;
75  this->bitcoinLikeNetworkParameters = cpy.bitcoinLikeNetworkParameters;
76  this->ethereumLikeNetworkParameters = cpy.ethereumLikeNetworkParameters;
77  this->rippleLikeNetworkParameters = cpy.rippleLikeNetworkParameters;
78  this->tezosLikeNetworkParameters = cpy.tezosLikeNetworkParameters;
79  }
80 
81  Currency() = default;
82 
83 
84  Currency& operator=(const Currency& cpy) {
85  this->walletType = cpy.walletType;
86  this->name = cpy.name;
87  this->bip44CoinType = cpy.bip44CoinType;
88  this->paymentUriScheme = cpy.paymentUriScheme;
89  this->units = cpy.units;
90  this->bitcoinLikeNetworkParameters = cpy.bitcoinLikeNetworkParameters;
91  this->ethereumLikeNetworkParameters = cpy.ethereumLikeNetworkParameters;
92  this->rippleLikeNetworkParameters = cpy.rippleLikeNetworkParameters;
93  this->tezosLikeNetworkParameters = cpy.tezosLikeNetworkParameters;
94  return *this;
95  }
96 
97  template <class Archive>
98  void load(Archive& archive) {
99  archive(walletType, name, bip44CoinType, paymentUriScheme, units, bitcoinLikeNetworkParameters, ethereumLikeNetworkParameters, rippleLikeNetworkParameters, tezosLikeNetworkParameters);
100  }
101 
102  template <class Archive>
103  void save(Archive& archive) const {
104  archive(walletType, name, bip44CoinType, paymentUriScheme, units, bitcoinLikeNetworkParameters, ethereumLikeNetworkParameters, rippleLikeNetworkParameters, tezosLikeNetworkParameters);
105  }
106 };
107 
108 } } } // namespace ledger::core::api
109 #endif //DJINNI_GENERATED_CURRENCY_HPP
Definition: BitcoinLikeFeePolicy.hpp:29
int32_t bip44CoinType
Definition: Currency.hpp:32
std::string name
Definition: Currency.hpp:27
Definition: Currency.hpp:23
WalletType walletType
Definition: Currency.hpp:25
Definition: Account.cpp:8
WalletType
Definition: WalletType.hpp:20
std::experimental::optional< TezosLikeNetworkParameters > tezosLikeNetworkParameters
Definition: Currency.hpp:47
std::experimental::optional< BitcoinLikeNetworkParameters > bitcoinLikeNetworkParameters
Definition: Currency.hpp:41
std::string paymentUriScheme
Definition: Currency.hpp:34
std::vector< CurrencyUnit > units
Definition: Currency.hpp:36
Definition: optional.hpp:177
std::experimental::optional< EthereumLikeNetworkParameters > ethereumLikeNetworkParameters
Definition: Currency.hpp:43
std::experimental::optional< RippleLikeNetworkParameters > rippleLikeNetworkParameters
Definition: Currency.hpp:45