4 #ifndef DJINNI_GENERATED_AMOUNT_HPP 5 #define DJINNI_GENERATED_AMOUNT_HPP 7 #include "../utils/optional.hpp" 11 #ifndef LIBCORE_EXPORT 13 #include <libcore_export.h> 15 #define LIBCORE_EXPORT 19 namespace ledger {
namespace core {
namespace api {
36 virtual std::shared_ptr<BigInt> toBigInt() = 0;
55 virtual std::shared_ptr<Amount> toUnit(
const CurrencyUnit & unit) = 0;
58 virtual std::shared_ptr<Amount> toMagnitude(int32_t magnitude) = 0;
64 virtual std::string toString() = 0;
70 virtual int64_t toLong() = 0;
76 virtual double toDouble() = 0;
82 static std::shared_ptr<Amount> fromHex(
const Currency & currency,
const std::string & hex);
85 static std::shared_ptr<Amount> fromLong(
const Currency & currency, int64_t value);
89 #endif //DJINNI_GENERATED_AMOUNT_HPP Definition: Locale.hpp:13
Definition: Amount.hpp:28
Definition: Currency.hpp:23
Definition: CurrencyUnit.hpp:15
Definition: Account.cpp:8
Definition: optional.hpp:177