Public Types | Public Member Functions | Static Public Member Functions

AB::Value Class Reference

#include <value.hpp>

Public Types

typedef AB_VALUE wrapped_type

Public Member Functions

 Value ()
 ~Value ()
 Value (const wrapped_type *other)
 Value (const Value &other)
Valueoperator= (const Value &other)
 operator const wrapped_type * () const
 operator wrapped_type * ()
const wrapped_typeptr () const
wrapped_typeptr ()
 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)

Detailed Description

A wrapper class around the AB_VALUE rational number type

Definition at line 25 of file value.hpp.


Member Typedef Documentation

Definition at line 30 of file value.hpp.


Constructor & Destructor Documentation

AB::Value::Value (  )  [inline]

Definition at line 35 of file value.hpp.

Referenced by fromString().

AB::Value::~Value (  )  [inline]

Definition at line 36 of file value.hpp.

AB::Value::Value ( const wrapped_type other  )  [inline]

Definition at line 36 of file value.hpp.

AB::Value::Value ( const Value other  )  [inline]

Definition at line 36 of file value.hpp.

AB::Value::Value ( double  d  )  [inline]

Extra constructor: Create this value from a double.

See also:
AB_Value_fromDouble()

Definition at line 40 of file value.hpp.

AB::Value::Value ( long int  num,
long int  denom 
) [inline]

Extra constructor: Create this value from two integer values for numerator and denominator.

See also:
AB_Value_fromInt()

Definition at line 46 of file value.hpp.


Member Function Documentation

int AB::Value::addValue ( const Value arg1  )  [inline]

Definition at line 81 of file value.hpp.

int AB::Value::compare ( const Value arg1  )  const [inline]

Definition at line 78 of file value.hpp.

Referenced by AB::operator<(), and AB::operator>().

int AB::Value::divValue ( const Value arg1  )  [inline]

Definition at line 84 of file value.hpp.

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.

See also:
AB_Value_fromString()

Definition at line 95 of file value.hpp.

References AB_Value_fromString(), and Value().

std::string AB::Value::getCurrency (  )  const [inline]

Definition at line 88 of file value.hpp.

long int AB::Value::getDenom (  )  const [inline]

Definition at line 68 of file value.hpp.

long int AB::Value::getNum (  )  const [inline]

Definition at line 67 of file value.hpp.

double AB::Value::getValueAsDouble (  )  const [inline]

Definition at line 69 of file value.hpp.

bool AB::Value::isNegative (  )  const [inline]

Definition at line 75 of file value.hpp.

bool AB::Value::isPositive (  )  const [inline]

Definition at line 76 of file value.hpp.

bool AB::Value::isZero (  )  const [inline]

Definition at line 74 of file value.hpp.

int AB::Value::multValue ( const Value arg1  )  [inline]

Definition at line 83 of file value.hpp.

int AB::Value::negate (  )  [inline]

Definition at line 86 of file value.hpp.

AB::Value::operator const wrapped_type * (  )  const [inline]

Definition at line 36 of file value.hpp.

AB::Value::operator wrapped_type * (  )  [inline]

Definition at line 36 of file value.hpp.

Value& AB::Value::operator= ( const Value other  )  [inline]

Definition at line 36 of file value.hpp.

wrapped_type* AB::Value::ptr (  )  [inline]

Definition at line 36 of file value.hpp.

const wrapped_type* AB::Value::ptr (  )  const [inline]

Definition at line 36 of file value.hpp.

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]

Definition at line 71 of file value.hpp.

void AB::Value::setZero (  )  [inline]

Definition at line 72 of file value.hpp.

int AB::Value::subValue ( const Value arg1  )  [inline]

Definition at line 82 of file value.hpp.

void AB::Value::toString ( GWEN_BUFFER *  buf  )  const [inline]

Conversion to string.

See also:
AB_Value_toString()

Definition at line 51 of file value.hpp.

References AB_Value_toString().

std::string AB::Value::toString (  )  const [inline]

Conversion to string.

See also:
AB_Value_toString()

Definition at line 57 of file value.hpp.


The documentation for this class was generated from the following file: