00001 #if !defined(__ABSTRACTBANKACCOUNT_HPP)
00002 #define __ABSTRACTBANKACCOUNT_HPP
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 DECLARE_TYPE( CORELINUX(Real), Amount );
00026 DECLARE_TYPE( CORELINUX(Exception), InvalidAmountException );
00027 DECLARE_TYPE( CORELINUX(Exception), InsufficientFundsException );
00028
00029 DECLARE_CLASS( AbstractBankAccount );
00030
00037
00038 class AbstractBankAccount
00039 {
00040 public:
00041
00042
00043
00044
00045
00047
00048 AbstractBankAccount( void )
00049 {
00050 ;
00051 }
00052
00054
00055 AbstractBankAccount( AbstractBankAccountCref aRef )
00056 {
00057 ;
00058 }
00059
00061
00062 virtual ~AbstractBankAccount( void )
00063 {
00064 ;
00065 }
00066
00067
00068
00069
00070
00076
00077 AbstractBankAccountRef operator=( AbstractBankAccountCref aRef )
00078 {
00079 return ( *this );
00080 }
00081
00087
00088 bool operator==( AbstractBankAccountCref aRef ) const
00089 {
00090 return ( this == &aRef );
00091 }
00092
00093
00094
00095
00100
00101 virtual AmountCref getBalance( void ) const = 0;
00102
00103
00104
00105
00113
00114 virtual void withdrawFunds( Amount )
00115 throw(InsufficientFundsException) = 0;
00116
00117
00122
00123 virtual void depositFunds( Amount )
00124 throw(InsufficientFundsException) = 0;
00125
00126
00127
00128 };
00129
00130 #endif // if !defined(__ABSTRACTBANKACCOUNT_HPP)
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140