rippled
|
A consumption charge. More...
Public Types | |
using | value_type = int |
The type used to hold a consumption charge. More... | |
Public Member Functions | |
Charge ()=delete | |
Charge (value_type cost, std::string const &label=std::string()) | |
Create a charge with the specified cost and name. More... | |
std::string const & | label () const |
Return the human readable label associated with the charge. More... | |
value_type | cost () const |
Return the cost of the charge in Resource::Manager units. More... | |
std::string | to_string () const |
Converts this charge into a human readable string. More... | |
bool | operator== (Charge const &) const |
bool | operator!= (Charge const &) const |
Private Attributes | |
value_type | m_cost |
std::string | m_label |
using ripple::Resource::Charge::value_type = int |
|
delete |
ripple::Resource::Charge::Charge | ( | value_type | cost, |
std::string const & | label = std::string() |
||
) |
Create a charge with the specified cost and name.
Definition at line 26 of file Charge.cpp.
std::string const & ripple::Resource::Charge::label | ( | ) | const |
Return the human readable label associated with the charge.
Definition at line 32 of file Charge.cpp.
Charge::value_type ripple::Resource::Charge::cost | ( | ) | const |
Return the cost of the charge in Resource::Manager units.
Definition at line 38 of file Charge.cpp.
std::string ripple::Resource::Charge::to_string | ( | ) | const |
Converts this charge into a human readable string.
Definition at line 44 of file Charge.cpp.
bool ripple::Resource::Charge::operator== | ( | Charge const & | c | ) | const |
Definition at line 59 of file Charge.cpp.
bool ripple::Resource::Charge::operator!= | ( | Charge const & | c | ) | const |
Definition at line 65 of file Charge.cpp.
|
private |
|
private |