Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

balance.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  $RCSfile: balance.h,v $
00003  -------------------
00004  cvs         : $Id: balance.h,v 1.6 2003/01/29 14:44:31 cstim Exp $
00005  begin       : Tue Jun 12 2002
00006  copyright   : (C) 2002 by Martin Preuss
00007  email       : openhbci@aquamaniac.de
00008 
00009 
00010  ***************************************************************************
00011  *                                                                         *
00012  *   This library is free software; you can redistribute it and/or         *
00013  *   modify it under the terms of the GNU Lesser General Public            *
00014  *   License as published by the Free Software Foundation; either          *
00015  *   version 2.1 of the License, or (at your option) any later version.    *
00016  *                                                                         *
00017  *   This library is distributed in the hope that it will be useful,       *
00018  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00019  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
00020  *   Lesser General Public License for more details.                       *
00021  *                                                                         *
00022  *   You should have received a copy of the GNU Lesser General Public      *
00023  *   License along with this library; if not, write to the Free Software   *
00024  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston,                 *
00025  *   MA  02111-1307  USA                                                   *
00026  *                                                                         *
00027  ***************************************************************************/
00028 
00029 
00030 #ifndef HBCIBALANCE
00031 #define HBCIBALANCE
00032 
00038 #include <openhbci/date.h>
00039 #include <openhbci/value.h>
00040 
00041 #ifdef __cplusplus
00042 #include <string>
00043 
00044 namespace HBCI {
00051 class DLLIMPORT Balance {
00052 private:
00053     bool _debit;
00054     Value _value;
00055     Date _date;
00056     Time _time;
00057 
00058 public:
00060     Balance();
00062     ~Balance();
00063 
00067     void dump();
00068 
00087     bool isDebit() const { return _debit;};
00091     void setDebit(bool c) { _debit=c;};
00092 
00094     const Value &value() const { return _value;};
00098     void setValue(const Value &v) { _value=v;};
00108     const Date &date() const { return _date;};
00112     void setDate(const Date &d) { _date=d;};
00113 
00115     const Time &time() const { return _time;};
00119     void setTime(const Time &t) { _time=t;};
00121 };
00122 
00123 } /* namespace HBCI */
00124 typedef struct HBCI::Balance HBCI_Balance;
00125 extern "C" {
00126 #else /* __cplusplus */
00127     typedef struct HBCI_Balance HBCI_Balance;
00128 #endif /* __cplusplus */
00129 
00146     extern int HBCI_Balance_isDebit(const HBCI_Balance *b);
00148     extern const HBCI_Value *HBCI_Balance_value(const HBCI_Balance *b);
00152     extern const HBCI_Date *HBCI_Balance_date(const HBCI_Balance *b);
00154     extern const HBCI_Time *HBCI_Balance_time(const HBCI_Balance *b);
00156 #ifdef __cplusplus
00157 }
00158 #endif /* __cplusplus */
00159 
00160 
00161 
00162 
00163 #ifdef __cplusplus
00164 namespace HBCI {
00173 class DLLIMPORT AccountBalance {
00174     friend class SEGBalance;
00175 private:
00176     string _currency;
00177     Balance _bookedBalance;
00178     Balance _notedBalance;
00179     Value _bankLine;
00180     Value _disposable;
00181     Value _disposed;
00182     Date _date;
00183     Time _time;
00184 public:
00186     AccountBalance();
00188     ~AccountBalance();
00192     void dump();
00193 
00201     void setBookedBalance(const Balance &b) { _bookedBalance=b;};
00206     const Balance &bookedBalance() const { return _bookedBalance;};
00207 
00211     void setNotedBalance(const Balance &b) { _notedBalance=b;};
00218     const Balance &notedBalance() const { return _notedBalance;};
00219 
00224     void setCurrency(const string &s) { _currency=s;};
00227     const string &currency() const { return _currency;};
00237     void setBankLine(const Value &v) { _bankLine=v;};
00241     const Value &bankLine() const { return _bankLine;};
00242 
00247     void setDisposable(const Value &v) { _disposable=v;};
00256     const Value &disposable() const { return _disposable;};
00257 
00261     void setDisposed(const Value &v) { _disposed=v;};
00266     const Value &disposed() const { return _disposed;};
00274     const Date &date() const { return _date;};
00278     void setDate(const Date &d) { _date=d;};
00279 
00281     const Time &time() const { return _time;};
00285     void setTime(const Time &t) { _time=t;};
00287 };
00288 } /* namespace */
00289 typedef struct HBCI::AccountBalance HBCI_AccountBalance;
00290 extern "C" {
00291 #else /* __cplusplus */
00292   typedef struct HBCI_AccountBalance HBCI_AccountBalance;
00293 #endif /* __cplusplus */
00294 
00299     extern const char* 
00300     HBCI_AccountBalance_currency(const HBCI_AccountBalance *b);
00305     extern const HBCI_Balance*
00306     HBCI_AccountBalance_bookedBalance(const HBCI_AccountBalance *b);
00313     extern const HBCI_Balance*
00314     HBCI_AccountBalance_notedBalance(const HBCI_AccountBalance *b);
00318     extern const HBCI_Value*
00319     HBCI_AccountBalance_bankLine(const HBCI_AccountBalance *b);
00328     extern const HBCI_Value*
00329     HBCI_AccountBalance_disposable(const HBCI_AccountBalance *b);
00334     extern const HBCI_Value*
00335     HBCI_AccountBalance_disposed(const HBCI_AccountBalance *b);
00337     extern const HBCI_Date *
00338     HBCI_AccountBalance_date(const HBCI_AccountBalance *b);
00340     extern const HBCI_Time *
00341     HBCI_AccountBalance_time(const HBCI_AccountBalance *b);
00343 #ifdef __cplusplus
00344 }
00345 #endif /* __cplusplus */
00346 
00347 
00348 
00349 #endif
00350 

Generated on Mon Jun 23 13:41:07 2003 for openhbci by doxygen1.2.17