#include <value.hpp>
Public Types | |
typedef AB_VALUE | wrapped_type |
Public Member Functions | |
Value () | |
~Value () | |
Value (const wrapped_type *other) | |
Value (const Value &other) | |
Value & | operator= (const Value &other) |
operator const wrapped_type * () const | |
operator wrapped_type * () | |
const wrapped_type * | ptr () const |
wrapped_type * | ptr () |
Value (double d) | |
Value (long int num, long int denom) | |
void | toString (GWEN_BUFFER *buf) const |
std::string | toString () const |
long int | getNum () const |
long int | getDenom () const |
double | getValueAsDouble () const |
void | setValueFromDouble (double arg1) |
void | setZero () |
bool | isZero () const |
bool | isNegative () const |
bool | isPositive () const |
int | compare (const Value &arg1) const |
bool | equal (const Value &arg1) const |
int | addValue (const Value &arg1) |
int | subValue (const Value &arg1) |
int | multValue (const Value &arg1) |
int | divValue (const Value &arg1) |
int | negate () |
std::string | getCurrency () const |
void | setCurrency (const std::string &s) |
Static Public Member Functions | |
static Value | fromString (const std::string &s) |
A wrapper class around the AB_VALUE rational number type
Definition at line 25 of file value.hpp.
typedef AB_VALUE AB::Value::wrapped_type |
AB::Value::Value | ( | ) | [inline] |
Definition at line 35 of file value.hpp.
Referenced by fromString().
AB::Value::Value | ( | const wrapped_type * | other | ) | [inline] |
AB::Value::Value | ( | double | d | ) | [inline] |
Extra constructor: Create this value from a double.
AB::Value::Value | ( | long int | num, | |
long int | denom | |||
) | [inline] |
Extra constructor: Create this value from two integer values for numerator and denominator.
int AB::Value::compare | ( | const Value & | arg1 | ) | const [inline] |
Definition at line 78 of file value.hpp.
Referenced by AB::operator<(), and AB::operator>().
bool AB::Value::equal | ( | const Value & | arg1 | ) | const [inline] |
Definition at line 79 of file value.hpp.
Referenced by AB::operator==().
static Value AB::Value::fromString | ( | const std::string & | s | ) | [inline, static] |
Conversion from string.
Definition at line 95 of file value.hpp.
References AB_Value_fromString(), and Value().
AB::Value::operator const wrapped_type * | ( | ) | const [inline] |
AB::Value::operator wrapped_type * | ( | ) | [inline] |
wrapped_type* AB::Value::ptr | ( | ) | [inline] |
const wrapped_type* AB::Value::ptr | ( | ) | const [inline] |
void AB::Value::setCurrency | ( | const std::string & | s | ) | [inline] |
Definition at line 89 of file value.hpp.
References AB_Value_SetCurrency().
void AB::Value::setValueFromDouble | ( | double | arg1 | ) | [inline] |
void AB::Value::toString | ( | GWEN_BUFFER * | buf | ) | const [inline] |
Conversion to string.
Definition at line 51 of file value.hpp.
References AB_Value_toString().
std::string AB::Value::toString | ( | ) | const [inline] |