![]() |
RTBKit
0.9
Open-source framework to create real-time ad bidding systems.
|
Public Member Functions | |
Amount (CurrencyCode currencyCode=CurrencyCode::CC_NONE, int64_t value=0) | |
Amount (const std::string ¤cyStr, int64_t value=0) | |
bool | isZero () const |
bool | isNonNegative () const |
bool | isNegative () const |
Amount | limit (const Amount &other) const |
JML_IMPLEMENT_OPERATOR_BOOL (!isZero()) | |
Amount & | operator+= (const Amount &other) |
Amount | operator+ (const Amount &other) const |
Amount & | operator-= (const Amount &other) |
Amount | operator- (const Amount &other) const |
bool | currencyIsCompatible (const Amount &other) const |
void | assertCurrencyIsCompatible (const Amount &other) const |
bool | operator== (const Amount &other) const |
bool | operator!= (const Amount &other) const |
bool | operator< (const Amount &other) const |
bool | operator<= (const Amount &other) const |
bool | operator> (const Amount &other) const |
bool | operator>= (const Amount &other) const |
Amount | operator- () const |
std::string | getCurrencyStr () const |
std::string | toString () const |
Json::Value | toJson () const |
void | serialize (ML::DB::Store_Writer &store) const |
void | reconstitute (ML::DB::Store_Reader &store) |
Static Public Member Functions | |
static std::string | getCurrencyStr (CurrencyCode currencyCode) |
static CurrencyCode | parseCurrency (const std::string ¤cy) |
static Amount | fromJson (const Json::Value &json) |
static Amount | parse (const std::string &value) |
Public Attributes | |
int64_t | value |
CurrencyCode | currencyCode |
Definition at line 37 of file currency.h.
Amount RTBKIT::Amount::limit | ( | const Amount & | other | ) | const [inline] |
Returns the minimum of the two amounts.
Definition at line 57 of file currency.h.
bool RTBKIT::Amount::operator== | ( | const Amount & | other | ) | const [inline] |
They compare equal if:
Definition at line 124 of file currency.h.