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

corelinux::Decorator Template Class Reference

Decorators can attach additional responsibilities to an object dynamically which provide a more flexible alternative to subclassing for extending functionality. More...

#include <Decorator.hpp>

Inheritance diagram for corelinux::Decorator

Inheritance graph
[legend]
Collaboration diagram for corelinux::Decorator:

Collaboration graph
[legend]
List of all members.

Public Methods

 Decorator ( Implementation aImplementation )
 Default Constructor requires a Implementation. More...

 Decorator ( const Decorator &aDecorator )
 Copy Constructor copies theImplementation. More...

virtual ~Decorator ( void )
 Virtual Destructor.

Decorator& operator= ( const Decorator & aDecorator ) throw (Exception)
 Assignment operator overload. More...

bool operator== ( const Decorator & aDecorator ) const
 Equality operator overload. More...

virtual Implementation getImplementation ( void ) const
 Gets current theImplementation. More...

virtual void setImplementation ( Implementation aImplementation ) throw (Exception)
 Sets current theImplementation to aImplementation. More...


Protected Methods

 Decorator ( void ) throw (Assertion)
 Default Constructor Because a Decorator requires a implementation to work, you can not construct one without it. More...


Protected Attributes

Implementation theImplementation
 Storage for theImplementation object.


Detailed Description

template<class Implementation> template class corelinux::Decorator

Decorators can attach additional responsibilities to an object dynamically which provide a more flexible alternative to subclassing for extending functionality.


Constructor & Destructor Documentation

template<classImplementation>
corelinux::Decorator<Implementation>::Decorator<Implementation> ( Implementation aImplementation )
 

Default Constructor requires a Implementation.

Parameters:
Implementation   instance

template<classImplementation>
corelinux::Decorator<Implementation>::Decorator<Implementation> ( const Decorator<Implementation> & aDecorator )
 

Copy Constructor copies theImplementation.

Parameters:
Decorator   const reference

template<classImplementation>
corelinux::Decorator<Implementation>::Decorator<Implementation> ( void ) throw (Assertion) [protected]
 

Default Constructor Because a Decorator requires a implementation to work, you can not construct one without it.

Parameters:
void  
Exceptions:
NEVER_GET_HERE  


Member Function Documentation

template<classImplementation>
Implementation corelinux::Decorator<Implementation>::getImplementation ( void ) const [inline, virtual]
 

Gets current theImplementation.

Returns:
Implementation instance

template<classImplementation>
Decorator<Implementation> & corelinux::Decorator<Implementation>::operator= ( const Decorator<Implementation> & aDecorator ) throw (Exception) [inline]
 

Assignment operator overload.

This may throw Exception if there is a problem cloning theImplementation.

Parameters:
Decorator   const reference
Returns:
Decorator reference to self
Exceptions:
Exception   - implementation defined

template<classImplementation>
bool corelinux::Decorator<Implementation>::operator== ( const Decorator<Implementation> & aDecorator ) const [inline]
 

Equality operator overload.

Parameters:
Decorator   const reference
Returns:
true if equal, false otherwise

template<classImplementation>
void corelinux::Decorator<Implementation>::setImplementation ( Implementation aImplementation ) throw (Exception) [inline, virtual]
 

Sets current theImplementation to aImplementation.

Parameters:
Implementation   - implementation instance
Exceptions:
Exception   - derivation defined


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