aqbanking  5.7.8
Typedefs | Functions
value.h File Reference
#include <gwenhywfar/buffer.h>
#include <gwenhywfar/db.h>
#include <gwenhywfar/list.h>
#include <gwenhywfar/types.h>
#include <aqbanking/error.h>
#include <stdio.h>

Go to the source code of this file.

Typedefs

typedef struct AB_VALUE AB_VALUE
 

Functions

AB_VALUE_LISTAB_Value_List_dup (const AB_VALUE_LIST *vl)
 
AB_VALUEAB_Value_new (void)
 
AB_VALUEAB_Value_dup (const AB_VALUE *ov)
 
void AB_Value_free (AB_VALUE *v)
 
AB_VALUEAB_Value_fromString (const char *s)
 
void AB_Value_toString (const AB_VALUE *v, GWEN_BUFFER *buf)
 
void AB_Value_toHumanReadableString (const AB_VALUE *v, GWEN_BUFFER *buf, int prec)
 
void AB_Value_toHumanReadableString2 (const AB_VALUE *v, GWEN_BUFFER *buf, int prec, int withCurrency)
 
AB_VALUEAB_Value_fromDouble (double i)
 
AB_VALUEAB_Value_fromInt (long int num, long int denom)
 
AB_VALUEAB_Value_fromDb (GWEN_DB_NODE *db)
 
int AB_Value_toDb (const AB_VALUE *v, GWEN_DB_NODE *db)
 
int AB_Value_toDbFloat (const AB_VALUE *v, GWEN_DB_NODE *db)
 
double AB_Value_GetValueAsDouble (const AB_VALUE *v)
 
void AB_Value_SetValueFromDouble (AB_VALUE *v, double i)
 
int AB_Value_GetNumDenomString (const AB_VALUE *v, char *buffer, uint32_t buflen)
 
void AB_Value_SetZero (AB_VALUE *v)
 
int AB_Value_IsZero (const AB_VALUE *v)
 
int AB_Value_IsNegative (const AB_VALUE *v)
 
int AB_Value_IsPositive (const AB_VALUE *v)
 
int AB_Value_Compare (const AB_VALUE *v1, const AB_VALUE *v2)
 
int AB_Value_Equal (const AB_VALUE *v1, const AB_VALUE *v2)
 
int AB_Value_AddValue (AB_VALUE *v1, const AB_VALUE *v2)
 
int AB_Value_SubValue (AB_VALUE *v1, const AB_VALUE *v2)
 
int AB_Value_MultValue (AB_VALUE *v1, const AB_VALUE *v2)
 
int AB_Value_DivValue (AB_VALUE *v1, const AB_VALUE *v2)
 
int AB_Value_Negate (AB_VALUE *v)
 
const char * AB_Value_GetCurrency (const AB_VALUE *v)
 
void AB_Value_SetCurrency (AB_VALUE *v, const char *s)
 
void AB_Value_Dump (const AB_VALUE *v, FILE *f, unsigned int indent)
 
long int AB_Value_Num (const AB_VALUE *v)
 
long int AB_Value_Denom (const AB_VALUE *v)
 
void AB_Value_toHbciString (const AB_VALUE *v, GWEN_BUFFER *buf)
 

Typedef Documentation

◆ AB_VALUE

typedef struct AB_VALUE AB_VALUE

Definition at line 32 of file value.h.

Function Documentation

◆ AB_Value_AddValue()

int AB_Value_AddValue ( AB_VALUE v1,
const AB_VALUE v2 
)

Referenced by AB::Value::toString().

◆ AB_Value_Compare()

int AB_Value_Compare ( const AB_VALUE v1,
const AB_VALUE v2 
)

Referenced by AB::Value::toString().

◆ AB_Value_Denom()

long int AB_Value_Denom ( const AB_VALUE v)

Returns the denominator of the given rational number.

Referenced by AB::Value::toString().

◆ AB_Value_DivValue()

int AB_Value_DivValue ( AB_VALUE v1,
const AB_VALUE v2 
)

Referenced by AB::Value::toString().

◆ AB_Value_Dump()

void AB_Value_Dump ( const AB_VALUE v,
FILE *  f,
unsigned int  indent 
)

◆ AB_Value_dup()

AB_VALUE* AB_Value_dup ( const AB_VALUE ov)

◆ AB_Value_Equal()

int AB_Value_Equal ( const AB_VALUE v1,
const AB_VALUE v2 
)

Returns non-zero if v1 and v2 are equal, zero if they are non-equal. Although AB_Value_Compare() can be used for the same purpose, this function is much faster.

Referenced by AB::Value::toString().

◆ AB_Value_free()

void AB_Value_free ( AB_VALUE v)

◆ AB_Value_fromDb()

AB_VALUE* AB_Value_fromDb ( GWEN_DB_NODE *  db)

Create a value from the given GWEN_DB.

◆ AB_Value_fromDouble()

AB_VALUE* AB_Value_fromDouble ( double  i)

◆ AB_Value_fromInt()

AB_VALUE* AB_Value_fromInt ( long int  num,
long int  denom 
)

Returns a newly allocated rational number, initialized to num/denom.

◆ AB_Value_fromString()

AB_VALUE* AB_Value_fromString ( const char *  s)

This function reads a AB_VALUE from a string. Strings suitable as arguments are those created by AB_Value_toString or simple floating point string (as in "123.45" or "-123.45").

Referenced by AB::Value::fromString().

◆ AB_Value_GetCurrency()

const char* AB_Value_GetCurrency ( const AB_VALUE v)

Referenced by AB::Value::toString().

◆ AB_Value_GetNumDenomString()

int AB_Value_GetNumDenomString ( const AB_VALUE v,
char *  buffer,
uint32_t  buflen 
)

Write the value (without the currency) in nominator/denominator form into the given buffer if possibly. This form looks like "12345/6789" (nominator/denominator).

◆ AB_Value_GetValueAsDouble()

double AB_Value_GetValueAsDouble ( const AB_VALUE v)

This function returns the value as a double. You should not feed another AB_VALUE from this double, because the conversion from an AB_VALUE to a double might be lossy!

Referenced by AB::Value::toString().

◆ AB_Value_IsNegative()

int AB_Value_IsNegative ( const AB_VALUE v)

Referenced by AB::Value::toString().

◆ AB_Value_IsPositive()

int AB_Value_IsPositive ( const AB_VALUE v)

Referenced by AB::Value::toString().

◆ AB_Value_IsZero()

int AB_Value_IsZero ( const AB_VALUE v)

Referenced by AB::Value::toString().

◆ AB_Value_List_dup()

AB_VALUE_LIST* AB_Value_List_dup ( const AB_VALUE_LIST vl)

Creates a deep copy of an AB_VALUE_LIST object

◆ AB_Value_MultValue()

int AB_Value_MultValue ( AB_VALUE v1,
const AB_VALUE v2 
)

Referenced by AB::Value::toString().

◆ AB_Value_Negate()

int AB_Value_Negate ( AB_VALUE v)

Referenced by AB::Value::toString().

◆ AB_Value_new()

AB_VALUE* AB_Value_new ( void  )

◆ AB_Value_Num()

long int AB_Value_Num ( const AB_VALUE v)

Returns the numerator of the given rational number.

Referenced by AB::Value::toString().

◆ AB_Value_SetCurrency()

void AB_Value_SetCurrency ( AB_VALUE v,
const char *  s 
)

Referenced by AB::Value::setCurrency().

◆ AB_Value_SetValueFromDouble()

void AB_Value_SetValueFromDouble ( AB_VALUE v,
double  i 
)

You should not use a double retrieved via AB_Value_GetValueAsDouble as an argument to this function, because the conversion from AB_VALUE to double to AB_VALUE might change the real value.

Referenced by AB::Value::toString().

◆ AB_Value_SetZero()

void AB_Value_SetZero ( AB_VALUE v)

Referenced by AB::Value::toString().

◆ AB_Value_SubValue()

int AB_Value_SubValue ( AB_VALUE v1,
const AB_VALUE v2 
)

Referenced by AB::Value::toString().

◆ AB_Value_toDb()

int AB_Value_toDb ( const AB_VALUE v,
GWEN_DB_NODE *  db 
)

Write the given value into the given GWEN_DB.

◆ AB_Value_toDbFloat()

int AB_Value_toDbFloat ( const AB_VALUE v,
GWEN_DB_NODE *  db 
)

Write the given value into the given GWEN_DB (uses float instead of rational).

◆ AB_Value_toHbciString()

void AB_Value_toHbciString ( const AB_VALUE v,
GWEN_BUFFER *  buf 
)

Write value to HBCI string (e.g. "11,90" is written as "11,9")

◆ AB_Value_toHumanReadableString()

void AB_Value_toHumanReadableString ( const AB_VALUE v,
GWEN_BUFFER *  buf,
int  prec 
)

◆ AB_Value_toHumanReadableString2()

void AB_Value_toHumanReadableString2 ( const AB_VALUE v,
GWEN_BUFFER *  buf,
int  prec,
int  withCurrency 
)

◆ AB_Value_toString()

void AB_Value_toString ( const AB_VALUE v,
GWEN_BUFFER *  buf 
)

This function exports the value in a format which can be recognized by the function AB_Value_fromString. You should not make any assumption about the format of the string created here.

Referenced by AB::Value::toString().