aqbanking  5.7.8
value.h
Go to the documentation of this file.
1 /***************************************************************************
2  $RCSfile$
3  -------------------
4  cvs : $Id$
5  begin : Mon Apr 05 2004
6  copyright : (C) 2004 by Martin Preuss
7  email : martin@libchipcard.de
8 
9  ***************************************************************************
10  * This file is part of the project "AqBanking". *
11  * Please see toplevel file COPYING of that project for license details. *
12  ***************************************************************************/
13 
14 
15 #ifndef AB_VALUE_H
16 #define AB_VALUE_H
17 
18 #include <gwenhywfar/buffer.h>
19 #include <gwenhywfar/db.h>
20 #include <gwenhywfar/list.h>
21 #include <gwenhywfar/types.h>
22 
23 #include <aqbanking/error.h>
24 
25 #include <stdio.h>
26 
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 typedef struct AB_VALUE AB_VALUE;
34 
35 
39 
40 
44 
51 
57 AQBANKING_API void AB_Value_toString(const AB_VALUE *v, GWEN_BUFFER *buf);
58 
60  GWEN_BUFFER *buf,
61  int prec);
62 
64  GWEN_BUFFER *buf,
65  int prec,
66  int withCurrency);
67 
69 
72 AQBANKING_API AB_VALUE *AB_Value_fromInt(long int num, long int denom);
73 
74 
76 AQBANKING_API AB_VALUE *AB_Value_fromDb(GWEN_DB_NODE *db);
77 
79 AQBANKING_API int AB_Value_toDb(const AB_VALUE *v, GWEN_DB_NODE *db);
80 
82 AQBANKING_API int AB_Value_toDbFloat(const AB_VALUE *v, GWEN_DB_NODE *db);
83 
90 
91 
99 
106  char *buffer,
107  uint32_t buflen);
108 
110 
114 AQBANKING_API int AB_Value_Compare(const AB_VALUE *v1, const AB_VALUE *v2);
115 
120 AQBANKING_API int AB_Value_Equal(const AB_VALUE *v1, const AB_VALUE *v2);
121 
126 
128 
129 
130 AQBANKING_API const char *AB_Value_GetCurrency(const AB_VALUE *v);
131 AQBANKING_API void AB_Value_SetCurrency(AB_VALUE *v, const char *s);
132 
133 
134 AQBANKING_API void AB_Value_Dump(const AB_VALUE *v, FILE *f, unsigned int indent);
135 
137 AQBANKING_API long int AB_Value_Num(const AB_VALUE *v);
139 AQBANKING_API long int AB_Value_Denom(const AB_VALUE *v);
140 
141 
143 AQBANKING_API void AB_Value_toHbciString(const AB_VALUE *v, GWEN_BUFFER *buf);
144 
145 
146 #ifdef __cplusplus
147 }
148 #endif
149 
150 
151 #endif /* AB_VALUE_H */
152 
153 
154 
155 
156 
157 
158 
159 
int AB_Value_MultValue(AB_VALUE *v1, const AB_VALUE *v2)
double AB_Value_GetValueAsDouble(const AB_VALUE *v)
AB_VALUE * AB_Value_fromDouble(double i)
int AB_Value_Negate(AB_VALUE *v)
void AB_Value_SetValueFromDouble(AB_VALUE *v, double i)
#define AQBANKING_API
Definition: error.h:55
struct AB_VALUE AB_VALUE
Definition: value.h:32
int AB_Value_Equal(const AB_VALUE *v1, const AB_VALUE *v2)
AB_VALUE * AB_Value_fromString(const char *s)
long int AB_Value_Denom(const AB_VALUE *v)
const char * AB_Value_GetCurrency(const AB_VALUE *v)
int AB_Value_IsPositive(const AB_VALUE *v)
void AB_Value_toHumanReadableString2(const AB_VALUE *v, GWEN_BUFFER *buf, int prec, int withCurrency)
void AB_Value_toString(const AB_VALUE *v, GWEN_BUFFER *buf)
AB_VALUE * AB_Value_fromInt(long int num, long int denom)
int AB_Value_IsNegative(const AB_VALUE *v)
int AB_Value_IsZero(const AB_VALUE *v)
AB_VALUE * AB_Value_new(void)
void AB_Value_free(AB_VALUE *v)
int AB_Value_SubValue(AB_VALUE *v1, const AB_VALUE *v2)
AB_VALUE * AB_Value_fromDb(GWEN_DB_NODE *db)
AB_VALUE_LIST * AB_Value_List_dup(const AB_VALUE_LIST *vl)
int AB_Value_toDb(const AB_VALUE *v, GWEN_DB_NODE *db)
void AB_Value_toHbciString(const AB_VALUE *v, GWEN_BUFFER *buf)
void AB_Value_toHumanReadableString(const AB_VALUE *v, GWEN_BUFFER *buf, int prec)
int AB_Value_AddValue(AB_VALUE *v1, const AB_VALUE *v2)
long int AB_Value_Num(const AB_VALUE *v)
int AB_Value_Compare(const AB_VALUE *v1, const AB_VALUE *v2)
AB_VALUE * AB_Value_dup(const AB_VALUE *ov)
void AB_Value_Dump(const AB_VALUE *v, FILE *f, unsigned int indent)
int AB_Value_toDbFloat(const AB_VALUE *v, GWEN_DB_NODE *db)
int AB_Value_DivValue(AB_VALUE *v1, const AB_VALUE *v2)
GWEN_LIST_FUNCTION_LIB_DEFS(AB_PROVIDER_DESCRIPTION, AB_ProviderDescription,) GWEN_LIST2_FUNCTION_LIB_DEFS(AB_PROVIDER_DESCRIPTION
void AB_Value_SetCurrency(AB_VALUE *v, const char *s)
void AB_Value_SetZero(AB_VALUE *v)
int AB_Value_GetNumDenomString(const AB_VALUE *v, char *buffer, uint32_t buflen)