ledger-core
FormatRules.hpp
1 // AUTOGENERATED FILE - DO NOT MODIFY!
2 // This file generated by Djinni from amount.djinni
3 
4 #ifndef DJINNI_GENERATED_FORMATRULES_HPP
5 #define DJINNI_GENERATED_FORMATRULES_HPP
6 
7 #include "RoundingMode.hpp"
8 #include <cstdint>
9 #include <iostream>
10 #include <utility>
11 
12 namespace ledger { namespace core { namespace api {
13 
15 struct FormatRules final {
20 
21  FormatRules(RoundingMode roundingMode_,
22  int32_t maxNumberOfDecimals_)
23  : roundingMode(std::move(roundingMode_))
24  , maxNumberOfDecimals(std::move(maxNumberOfDecimals_))
25  {}
26 
27  FormatRules(const FormatRules& cpy) {
28  this->roundingMode = cpy.roundingMode;
29  this->maxNumberOfDecimals = cpy.maxNumberOfDecimals;
30  }
31 
32  FormatRules() = default;
33 
34 
35  FormatRules& operator=(const FormatRules& cpy) {
36  this->roundingMode = cpy.roundingMode;
37  this->maxNumberOfDecimals = cpy.maxNumberOfDecimals;
38  return *this;
39  }
40 
41  template <class Archive>
42  void load(Archive& archive) {
43  archive(roundingMode, maxNumberOfDecimals);
44  }
45 
46  template <class Archive>
47  void save(Archive& archive) const {
48  archive(roundingMode, maxNumberOfDecimals);
49  }
50 };
51 
52 } } } // namespace ledger::core::api
53 #endif //DJINNI_GENERATED_FORMATRULES_HPP
Definition: BitcoinLikeFeePolicy.hpp:29
Definition: FormatRules.hpp:15
RoundingMode roundingMode
Definition: FormatRules.hpp:17
RoundingMode
Definition: RoundingMode.hpp:20
Definition: Account.cpp:8
int32_t maxNumberOfDecimals
Definition: FormatRules.hpp:19