Adapter for ACE_Cleanup objects that allows them to be readily managed by the ACE_Object_Manager. More...
#include <Managed_Object.h>
Public Member Functions | |
ACE_Cleanup_Adapter (void) | |
Default constructor. | |
virtual | ~ACE_Cleanup_Adapter (void) |
Virtual destructor, needed by some compilers for vtable placement. | |
TYPE & | object (void) |
Accessor for contained object. | |
Private Member Functions | |
ACE_Cleanup_Adapter (const ACE_Cleanup_Adapter< TYPE > &) | |
void | operator= (const ACE_Cleanup_Adapter< TYPE > &) |
Private Attributes | |
TYPE | object_ |
Contained object. |
Adapter for ACE_Cleanup objects that allows them to be readily managed by the ACE_Object_Manager.
This template class adapts an object of any type to be an ACE_Cleanup object. The object can then be destroyed type-safely by the ACE_Object_Manager. This class is typically used to replace a cast; but, it's a bit cleaner and allows insertion of, say, run-time type identification internally if desired.
Definition at line 43 of file Managed_Object.h.
ACE_Cleanup_Adapter< TYPE >::ACE_Cleanup_Adapter | ( | void | ) | [inline] |
Default constructor.
Definition at line 9 of file Managed_Object.inl.
: don't explicitly initialize "object_", because TYPE may not // have a default constructor. Let the compiler figure it out . . . { }
ACE_Cleanup_Adapter< TYPE >::~ACE_Cleanup_Adapter | ( | void | ) | [virtual] |
Virtual destructor, needed by some compilers for vtable placement.
Definition at line 19 of file Managed_Object.cpp.
{ }
ACE_Cleanup_Adapter< TYPE >::ACE_Cleanup_Adapter | ( | const ACE_Cleanup_Adapter< TYPE > & | ) | [private] |
TYPE & ACE_Cleanup_Adapter< TYPE >::object | ( | void | ) | [inline] |
Accessor for contained object.
Definition at line 18 of file Managed_Object.inl.
{ return this->object_; }
void ACE_Cleanup_Adapter< TYPE >::operator= | ( | const ACE_Cleanup_Adapter< TYPE > & | ) | [private] |
TYPE ACE_Cleanup_Adapter< TYPE >::object_ [private] |
Contained object.
Definition at line 60 of file Managed_Object.h.