ledger-core
BigInt.hpp
1 // AUTOGENERATED FILE - DO NOT MODIFY!
2 // This file generated by Djinni from big_int.djinni
3 
4 #ifndef DJINNI_GENERATED_BIGINT_HPP
5 #define DJINNI_GENERATED_BIGINT_HPP
6 
7 #include <cstdint>
8 #include <memory>
9 #include <string>
10 #include <vector>
11 #ifndef LIBCORE_EXPORT
12  #if defined(_MSC_VER)
13  #include <libcore_export.h>
14  #else
15  #define LIBCORE_EXPORT
16  #endif
17 #endif
18 
19 namespace ledger { namespace core { namespace api {
20 
22 class LIBCORE_EXPORT BigInt {
23 public:
24  virtual ~BigInt() {}
25 
31  virtual std::shared_ptr<BigInt> add(const std::shared_ptr<BigInt> & i) = 0;
32 
38  virtual std::shared_ptr<BigInt> subtract(const std::shared_ptr<BigInt> & i) = 0;
39 
45  virtual std::shared_ptr<BigInt> multiply(const std::shared_ptr<BigInt> & i) = 0;
46 
52  virtual std::shared_ptr<BigInt> divide(const std::shared_ptr<BigInt> & i) = 0;
53 
59  virtual std::vector<std::shared_ptr<BigInt>> divideAndRemainder(const std::shared_ptr<BigInt> & i) = 0;
60 
66  virtual std::shared_ptr<BigInt> pow(int32_t exponent) = 0;
67 
75  virtual std::string toDecimalString(int32_t precision, const std::string & decimalSeparator, const std::string & thousandSeparator) = 0;
76 
81  virtual std::string toString(int32_t radix) = 0;
82 
88  virtual int32_t intValue() = 0;
89 
95  virtual int32_t compare(const std::shared_ptr<BigInt> & i) = 0;
96 
105  static std::shared_ptr<BigInt> fromDecimalString(const std::string & s, int32_t precision, const std::string & decimalSeparator);
106 
113  static std::shared_ptr<BigInt> fromIntegerString(const std::string & s, int32_t radix);
114 
120  static std::shared_ptr<BigInt> fromLong(int64_t l);
121 };
122 
123 } } } // namespace ledger::core::api
124 #endif //DJINNI_GENERATED_BIGINT_HPP
Definition: BigInt.hpp:22
Definition: Account.cpp:8