#include <gwenhywfar/db.h>
#include <aqbanking/error.h>
Go to the source code of this file.
Constructor/Destructor | |
AB_VALUE * | AB_Value_new (double value, const char *currency) |
AB_VALUE * | AB_Value_dup (const AB_VALUE *v) |
AB_VALUE * | AB_Value_fromString (const char *s) |
AB_VALUE * | AB_Value_fromDb (GWEN_DB_NODE *db) |
int | AB_Value_toDb (const AB_VALUE *v, GWEN_DB_NODE *db) |
void | AB_Value_free (AB_VALUE *v) |
Getters/Setters | |
double | AB_Value_GetValue (const AB_VALUE *v) |
void | AB_Value_SetValue (AB_VALUE *v, double d) |
const char * | AB_Value_GetCurrency (const AB_VALUE *v) |
void | AB_Value_SetCurrency (AB_VALUE *v, const char *s) |
Predicates/Comparisons | |
int | AB_Value_IsValid (const AB_VALUE *v) |
int | AB_Value_IsNegative (const AB_VALUE *v) |
int | AB_Value_IsPositive (const AB_VALUE *v) |
int | AB_Value_IsZero (const AB_VALUE *v) |
int | AB_Value_IsEqual (const AB_VALUE *v1, const AB_VALUE *v2) |
int | AB_Value_Compare (const AB_VALUE *v1, const AB_VALUE *v2) |
Arithmetic operations | |
int | AB_Value_AddValue (AB_VALUE *v, const AB_VALUE *vToAdd) |
int | AB_Value_SubValue (AB_VALUE *v, const AB_VALUE *vToSub) |
int | AB_Value_Negate (AB_VALUE *v) |
Typedefs | |
typedef AB_VALUE | AB_VALUE |
|
An abstract monetary value in HBCI. It has an amount and a currency string. Right now the amount is stored as a "double" floating-point value, but in the future this might be changed to a fixed-point representation to avoid rounding errors in financial calculations. Therefore some basic arithmetic operations are already supported, and more are likely to come. |
|
Add the value |
|
Compare function: Returns +1 if v1>v2, zero if v1 == v2, and -1 if v1<v2. (Note: Right now this function ignores the currency field.) |
|
Create a duplicate of the given value (Copy constructor). |
|
Free the given value (Destructor). |
|
Create a value from the given GWEN_DB. |
|
Create a value from the given string. FIXME: describe string format here. |
|
Returns the ISO-4217 currency string of the given value, e.g. "EUR" for Euro. WATCH OUT: The currency string may be NULL! |
|
Returns the value part as a double. |
|
Equality predicate: Returns nonzero (TRUE) if v1 is equal to v2, or zero (FALSE) otherwise. (Note: Right now this function ignores the currency field.) |
|
Predicate: Returns nonzero (TRUE) if the value is negative (lesser than zero), or zero (FALSE) otherwise. |
|
Predicate: Returns nonzero (TRUE) if the value is positive (greater or equal to zero), or zero (FALSE) otherwise. |
|
Predicate: Returns nonzero (TRUE) if the given value is valid. FIXME: Describe what "valid" means. |
|
Predicate: Returns nonzero (TRUE) if the value is equal to zero, or zero (FALSE) otherwise. |
|
Negate the sign of the given value, i.e. assign v=-v. Returns zero on succes, or -1 if any input argument is invalid. |
|
Create a new value with the given amount and the given ISO-4217 currency. (Constructor)
|
|
Set the ISO-4217 currency string of this value, e.g. "EUR" for Euro. The currency string may be NULL. |
|
Set the value of this AB_VALUE from a double. |
|
Subtract the value |
|
Write the given value into the given GWEN_DB. |