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 
12 
13 namespace shared_model {
14  namespace interface {
15 
19  class Amount final : public ModelPrimitive<Amount> {
20  public:
21  explicit Amount(const std::string &amount);
22 
27  int sign() const;
28 
34 
39  std::string toStringRepr() const;
40 
46  bool operator==(const ModelType &rhs) const override;
47 
52  std::string toString() const override;
53 
54  private:
55  struct Impl;
56 
57  const std::shared_ptr<const Impl> impl_;
58  };
59  } // namespace interface
60 } // namespace shared_model
61 #endif // IROHA_SHARED_MODEL_AMOUNT_HPP
Definition: amount.hpp:19
int sign() const
Definition: amount.cpp:61
Definition: amount.cpp:18
std::string toString() const override
Definition: amount.cpp:78
bool operator==(const ModelType &rhs) const override
Definition: amount.cpp:73
types::PrecisionType precision() const
Definition: amount.cpp:65
uint8_t PrecisionType
Type of precision.
Definition: types.hpp:41
Definition: model_primitive.hpp:22
std::string toStringRepr() const
Definition: amount.cpp:69
Amount(const std::string &amount)
Definition: amount.cpp:58
Definition: command_executor.hpp:12