★ wanayoo — archive 1999 http://corelinux.sourceforge.net/classref/Decorator.htmlNouvelle recherche | Portail wanayoo

template<class Implementation> class corelinux::Decorator: public CoreLinuxObject

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

Inheritance:


Public Methods

[more] Decorator( const Decorator &aDecorator )
Copy Constructor copies theImplementation.
[more] Decorator( Implementation aImplementation )
Default Constructor requires a Implementation
[more]virtual Implementation getImplementation( void ) const
Gets current theImplementation
[more]Decorator& operator=( const Decorator & aDecorator ) throw(Exception)
Assignment operator overload.
[more]bool operator==( const Decorator & aDecorator ) const
Equality operator overload
[more]virtual void setImplementation( Implementation aImplementation ) throw(Exception)
Sets current theImplementation to aImplementation
[more]virtual ~Decorator( void )
Virtual Destructor

Protected Fields

[more]Implementation theImplementation
Storage for theImplementation object

Protected Methods

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


Inherited from CoreLinuxObject:

Public Methods

obool operator!=( CoreLinuxObjectCref ) const


Documentation

Decorators can attach additional responsibilities to an object dynamically which provide a more flexible alternative to subclassing for extending functionality
o Decorator( Implementation aImplementation )
Default Constructor requires a Implementation
Parameters:
Implementation - instance

o Decorator( const Decorator &aDecorator )
Copy Constructor copies theImplementation.
Parameters:
Decorator - const reference

ovirtual ~Decorator( void )
Virtual Destructor

oDecorator& operator=( const Decorator & aDecorator ) throw(Exception)
Assignment operator overload. This may throw Exception if there is a problem cloning theImplementation.
Throws:
Exception - implementation defined
Returns:
Decorator reference to self
Parameters:
Decorator - const reference

obool operator==( const Decorator & aDecorator ) const
Equality operator overload
Returns:
true if equal, false otherwise
Parameters:
Decorator - const reference

ovirtual Implementation getImplementation( void ) const
Gets current theImplementation
Returns:
Implementation instance

ovirtual void setImplementation( Implementation aImplementation ) throw(Exception)
Sets current theImplementation to aImplementation
Throws:
Exception - derivation defined
Parameters:
Implementation - - implementation instance

o Decorator( void ) throw(Assertion)
Default Constructor Because a Decorator requires a implementation to work, you can not construct one without it.
Throws:
NEVER_GET_HERE
Parameters:
void -

oImplementation theImplementation
Storage for theImplementation object


This class has no child classes.



This page was generated with the help of
DOC++.