NAME
AccountProxy - AccountProxy is a read/write access proxy that enables all of the methods for the underlying subject.
SYNOPSIS
#include <AccountProxy.hpp>
Inherits AbstractBankAccount, and corelinux::Proxy< AbstractBankAccount >.
Inherited by RestrictedAccountProxy.
Public Member Functions
AccountProxy (void)
Default constructor. AccountProxy (AbstractBankAccountPtr)
Initializing constructor. AccountProxy (AccountProxyCref)
Copy constructor. virtual ~AccountProxy (void)
Virtual Destructor. AccountProxyRef operator= (AccountProxyCref)
Assignment operator. bool operator== (AccountProxyCref) const
Equality operator compares the subject pointers. virtual AmountCref getBalance (void) const
Retrieve the account balance. virtual void withdrawFunds (Amount) throw (InsufficientFundsException)
Withdraw an amount of funds from the account. virtual void depositFunds (Amount) throw (InsufficientFundsException)
Deposit funds into the account.
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) throw (InsufficientFundsException) [virtual]
Deposit funds into the account. Parameters:
Amount - to deposit
Implements AbstractBankAccount.
AmountCref AccountProxy::getBalance (void) const [virtual]
Retrieve the account balance. Returns:
Amount const reference to balance
Implements AbstractBankAccount.
AccountProxyRef AccountProxy::operator= (AccountProxyCref)
Assignment operator. Parameters:
AccountProxy const reference
Returns:
AccountProxy reference
bool AccountProxy::operator== (AccountProxyCref) const
Equality operator compares the subject pointers. Parameters:
AccountProxy const reference
Returns:
bool if subjects match
void AccountProxy::withdrawFunds (Amount) 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
Implements AbstractBankAccount.
Reimplemented in RestrictedAccountProxy.
Author
Generated automatically by Doxygen for CoreLinux++ from the source code.