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

ACE_Dynamic Class Reference

Checks to see if an object was dynamically allocated. More...

#include <Dynamic.h>

List of all members.

Public Methods

 ACE_Dynamic (void)
 Constructor. More...

 ~ACE_Dynamic (void)
 Destructor. More...

void set (void)
int is_dynamic (void)
 1 if we were allocated dynamically, else 0. More...

void reset (void)
 Resets state flag. More...


Static Public Methods

ACE_Dynamic * instance (void)

Private Attributes

int is_dynamic_


Detailed Description

Checks to see if an object was dynamically allocated.

This class holds the pointer in a thread-safe manner between the call to operator new and the call to the constructor.

Definition at line 32 of file Dynamic.h.


Constructor & Destructor Documentation

ACE_Dynamic::ACE_Dynamic void   
 

Constructor.

Definition at line 15 of file Dynamic.cpp.

References ACE_TRACE.

00016   : is_dynamic_ (0)
00017 {
00018   ACE_TRACE ("ACE_Dynamic::ACE_Dynamic");
00019 }

ACE_INLINE ACE_Dynamic::~ACE_Dynamic void   
 

Destructor.

Definition at line 7 of file Dynamic.i.

00008 {
00009   // ACE_TRACE ("ACE_Dynamic::~ACE_Dynamic");
00010 }


Member Function Documentation

ACE_Dynamic * ACE_Dynamic::instance void    [static]
 

Definition at line 22 of file Dynamic.cpp.

References ACE_TSS_Singleton::instance.

Referenced by ACE_Svc_Handler::ACE_Svc_Handler, and ACE_Svc_Handler::operator new.

ACE_INLINE int ACE_Dynamic::is_dynamic void   
 

1 if we were allocated dynamically, else 0.

Definition at line 20 of file Dynamic.i.

References is_dynamic_.

Referenced by ACE_Svc_Handler::ACE_Svc_Handler.

00021 {
00022   // ACE_TRACE ("ACE_Dynamic::is_dynamic");
00023   return this->is_dynamic_;
00024 }

ACE_INLINE void ACE_Dynamic::reset void   
 

Resets state flag.

Definition at line 27 of file Dynamic.i.

References is_dynamic_.

Referenced by ACE_Svc_Handler::ACE_Svc_Handler.

00028 {
00029   // ACE_TRACE ("ACE_Dynamic::reset");
00030   this->is_dynamic_ = 0;
00031 }

ACE_INLINE void ACE_Dynamic::set void   
 

Sets a flag that indicates that the object was dynamically created. This method is usually called in operator new and then checked and reset in the constructor.

Definition at line 13 of file Dynamic.i.

References is_dynamic_.

Referenced by ACE_Svc_Handler::operator new.

00014 {
00015   // ACE_TRACE ("ACE_Dynamic::set");
00016   this->is_dynamic_ = 1;
00017 }


Member Data Documentation

int ACE_Dynamic::is_dynamic_ [private]
 

Flag that indicates that the object was dynamically created. This method is usually called in operator new and then checked and reset in the constructor.

Definition at line 63 of file Dynamic.h.

Referenced by is_dynamic, reset, and set.


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