hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
amount.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_SHARED_MODEL_AMOUNT_HPP
7 #define IROHA_SHARED_MODEL_AMOUNT_HPP
8 
10 
11 #include <boost/multiprecision/cpp_int.hpp>
13 
14 namespace shared_model {
15  namespace interface {
16 
20  class Amount final : public ModelPrimitive<Amount> {
21  public:
22  explicit Amount(const std::string &amount);
23 
28  const boost::multiprecision::uint256_t &intValue() const;
29 
35 
40  std::string toStringRepr() const;
41 
47  bool operator==(const ModelType &rhs) const override;
48 
53  std::string toString() const override;
54 
55  private:
56  struct Impl;
57 
58  const std::shared_ptr<const Impl> impl_;
59  };
60  } // namespace interface
61 } // namespace shared_model
62 #endif // IROHA_SHARED_MODEL_AMOUNT_HPP
Definition: amount.hpp:20
Definition: amount.cpp:17
const boost::multiprecision::uint256_t & intValue() const
Definition: amount.cpp:60
std::string toString() const override
Definition: amount.cpp:77
bool operator==(const ModelType &rhs) const override
Definition: amount.cpp:72
types::PrecisionType precision() const
Definition: amount.cpp:64
uint8_t PrecisionType
Type of precision.
Definition: types.hpp:41
Definition: model_primitive.hpp:22
std::string toStringRepr() const
Definition: amount.cpp:68
Amount(const std::string &amount)
Definition: amount.cpp:57
Definition: command_executor.hpp:12