|
xrpld
|
A consumption charge. More...
#include <Charge.h>

Public Types | |
| using | value_type = int |
| The type used to hold a consumption charge. | |
Public Member Functions | |
| Charge ()=delete | |
| Charge (value_type cost, std::string label=std::string()) | |
| Create a charge with the specified cost and name. | |
| std::string const & | label () const |
| Return the human readable label associated with the charge. | |
| value_type | cost () const |
| Return the cost of the charge in Resource::Manager units. | |
| std::string | toString () const |
| Converts this charge into a human readable string. | |
| bool | operator== (Charge const &) const |
| std::strong_ordering | operator<=> (Charge const &) const |
| Charge | operator* (value_type m) const |
Private Attributes | |
| value_type | cost_ |
| std::string | label_ |
| using xrpl::Resource::Charge::value_type = int |
|
delete |
| xrpl::Resource::Charge::Charge | ( | value_type | cost, |
| std::string | label = std::string() ) |
Create a charge with the specified cost and name.
Definition at line 11 of file Charge.cpp.
|
nodiscard |
Return the human readable label associated with the charge.
Definition at line 16 of file Charge.cpp.
|
nodiscard |
Return the cost of the charge in Resource::Manager units.
Definition at line 22 of file Charge.cpp.
|
nodiscard |
Converts this charge into a human readable string.
Definition at line 28 of file Charge.cpp.
| bool xrpl::Resource::Charge::operator== | ( | Charge const & | c | ) | const |
Definition at line 43 of file Charge.cpp.
| std::strong_ordering xrpl::Resource::Charge::operator<=> | ( | Charge const & | c | ) | const |
Definition at line 48 of file Charge.cpp.
| Charge xrpl::Resource::Charge::operator* | ( | value_type | m | ) | const |
Definition at line 55 of file Charge.cpp.
|
private |
|
private |