Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

ACE_Dumpable_Adapter Class Template Reference

This class inherits the interface of the abstract ACE_Dumpable class and is instantiated with the implementation of the concrete component class <class Concrete>. More...

#include <Dump_T.h>

Inheritance diagram for ACE_Dumpable_Adapter:

Inheritance graph
[legend]
Collaboration diagram for ACE_Dumpable_Adapter:

Collaboration graph
[legend]
List of all members.

Public Methods

 ACE_Dumpable_Adapter (const Concrete *t)
 ~ACE_Dumpable_Adapter (void)
virtual void dump (void) const
 Concrete dump method (simply delegates to the <dump> method of <class Concrete>). More...

Concrete * operator-> () const
 Delegate to methods in the Concrete class. More...


Private Attributes

const Concrete * this_
 Pointer to <this> of <class Concrete>. More...


Detailed Description

template<class Concrete>
class ACE_Dumpable_Adapter< Concrete >

This class inherits the interface of the abstract ACE_Dumpable class and is instantiated with the implementation of the concrete component class <class Concrete>.

This design is similar to the Adapter and Decorator patterns from the ``Gang of Four'' book. Note that <class Concrete> need not inherit from a common class since ACE_Dumpable provides the uniform virtual interface!

Definition at line 37 of file Dump_T.h.


Constructor & Destructor Documentation

template<class Concrete>
ACE_Dumpable_Adapter< Concrete >::ACE_Dumpable_Adapter const Concrete *    t
 

Definition at line 22 of file Dump_T.cpp.

References ACE_TRACE.

00023   : ACE_Dumpable ((const void *) t), this_ (t)
00024 {
00025   ACE_TRACE ("ACE_Dumpable_Adapter<Concrete>::ACE_Dumpable_Adapter");
00026 }

template<class Concrete>
ACE_Dumpable_Adapter< Concrete >::~ACE_Dumpable_Adapter void   
 

Definition at line 16 of file Dump_T.cpp.

References ACE_TRACE.

00017 {
00018   ACE_TRACE ("ACE_Dumpable_Adapter<Concrete>::~ACE_Dumpable_Adapter");
00019 }


Member Function Documentation

template<class Concrete>
void ACE_Dumpable_Adapter< Concrete >::dump void    const [virtual]
 

Concrete dump method (simply delegates to the <dump> method of <class Concrete>).

Implements ACE_Dumpable.

Definition at line 35 of file Dump_T.cpp.

References ACE_TRACE, and this_.

00036 {
00037   ACE_TRACE ("ACE_Dumpable_Adapter<Concrete>::dump");
00038   this->this_->dump ();
00039 }

template<class Concrete>
Concrete * ACE_Dumpable_Adapter< Concrete >::operator->   const
 

Delegate to methods in the Concrete class.

Definition at line 29 of file Dump_T.cpp.

References this_.

00030 {
00031   return (Concrete *) this->this_;
00032 }


Member Data Documentation

template<class Concrete>
const Concrete* ACE_Dumpable_Adapter::this_ [private]
 

Pointer to <this> of <class Concrete>.

Reimplemented from ACE_Dumpable.

Definition at line 53 of file Dump_T.h.

Referenced by dump, and operator->.


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 12:47:31 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002