Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Examples  

AccountProxy Class Reference

AccountProxy is a read/write access proxy that enables all of the methods for the underlying subject. More...

#include <AccountProxy.hpp>

Inheritance diagram for AccountProxy

Inheritance graph
[legend]
Collaboration diagram for AccountProxy:

Collaboration graph
[legend]
List of all members.

Public Methods

 AccountProxy ( void )
 Default constructor.

 AccountProxy ( AbstractBankAccountPtr )
 Initializing constructor.

 AccountProxy ( AccountProxyCref )
 Copy constructor.

virtual ~AccountProxy ( void )
 Virtual Destructor.

AccountProxyRef operator= ( AccountProxyCref )
 Assignment operator. More...

bool operator== ( AccountProxyCref ) const
 Equality operator compares the subject pointers. More...

virtual AmountCref getBalance (void) const
 Retrieve the account balance. More...

virtual void withdrawFunds (Amount) throw (InsufficientFundsException)
 Withdraw an amount of funds from the account. More...

virtual void depositFunds (Amount) throw (InsufficientFundsException)
 Deposit funds into the account. More...


Detailed Description

AccountProxy is a read/write access proxy that enables all of the methods for the underlying subject.

It is derived from AbstractBankAccount as well so that the proxy can be used as a Account in the application.

Another option would have been to "realize" the interface only, somewhat like a bridge, but this would have meant the application is aware of the Proxy type.


Member Function Documentation

void AccountProxy::depositFunds ( Amount anAmount ) throw (InsufficientFundsException) [virtual]
 

Deposit funds into the account.

Parameters:
Amount   - to deposit

Reimplemented from AbstractBankAccount.

AmountCref AccountProxy::getBalance ( void ) const [virtual]
 

Retrieve the account balance.

Returns:
Amount const reference to balance

Reimplemented from AbstractBankAccount.

AccountProxyRef AccountProxy::operator= ( AccountProxyCref aProxy )
 

Assignment operator.

Parameters:
AccountProxy   const reference
Returns:
AccountProxy reference

bool AccountProxy::operator== ( AccountProxyCref aProxy ) const
 

Equality operator compares the subject pointers.

Parameters:
AccountProxy   const reference
Returns:
bool if subjects match

void AccountProxy::withdrawFunds ( Amount anAmount ) throw (InsufficientFundsException) [virtual]
 

Withdraw an amount of funds from the account.

Parameters:
Amount   - amount to withdraw
Exceptions:
InsufficientFundsException   if the amount requested to withdraw is not available in the account funds

Reimplemented from AbstractBankAccount.

Reimplemented in RestrictedAccountProxy.


The documentation for this class was generated from the following files:
This is the CoreLinux++ reference manual
Provided by The CoreLinux Consortium