#include <Bridge.hpp>
Inheritance diagram for corelinux::Bridge
Public Methods | |
Bridge ( Implementation aImplementation ) | |
Default Constructor requires a Implementation. More... | |
virtual | ~Bridge ( void ) |
Virtual Destructor. | |
Bridge& | operator= ( const Bridge & aRef ) throw (Exception) |
Assignment operator overload. More... | |
bool | operator== ( const Bridge & ) const |
Equality operator overload. More... | |
bool | operator!= ( const Bridge & ) const |
Non-equality operator overload. More... | |
Protected Methods | |
Bridge ( void ) throw (Assertion) | |
Default Constructor Because a Bridge requires a implementation to work, you can not construct one without it. More... | |
Bridge ( const Bridge & ) throw (Assertion) | |
Copy Constructor Because theImplementation is owned by the Bridge, only the assignment operator insures that the derivation is constructed and can be invoked for object management. More... | |
Implementation | getImplementation ( void ) const |
Gets current theImplementation. More... | |
void | setImplementation ( Implementation aImpl ) throw (Exception) |
Set theImplementation. More... | |
virtual Implementation | cloneImplementation ( Implementation ) = 0 throw (Exception) |
Pure virtual method to have the derivation contain theImplementation.by ownership. More... |
An abstract class defines the interface to the abstraction, and concrete subclasses implement it in different ways. But this approach isn't always flexible enough. Inheritance binds an implementation to the abstraction permanently, which makes it difficult to modify, extend, and reuse abstractions and implementations independently. A Bridge decouples an abstraction from its implementation so that the two can vary independently.
|
Default Constructor requires a Implementation.
|
|
Default Constructor Because a Bridge requires a implementation to work, you can not construct one without it.
|
|
Copy Constructor Because theImplementation is owned by the Bridge, only the assignment operator insures that the derivation is constructed and can be invoked for object management.
|
|
Pure virtual method to have the derivation contain theImplementation.by ownership.
|
|
Gets current theImplementation.
|
|
Non-equality operator overload.
|
|
Assignment operator overload. This may throw Exception if there is a problem cloning theImplementation.
|
|
Equality operator overload.
|
|
Set theImplementation. This in turn calls the pure-virtual method cloneImplementation so that a pointer unique to this object, or one which is referencable can be managed
|