ACE_Dynamic Class Reference

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

#include <Dynamic.h>

List of all members.

Public Member Functions

 ACE_Dynamic (void)
 Constructor.

 ~ACE_Dynamic (void)
 Destructor.

void set (void)
bool is_dynamic (void)
 true if we were allocated dynamically, else false.

void reset (void)
 Resets state flag.


Static Public Member Functions

ACE_Dynamicinstance (void)

Private Attributes

bool 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 34 of file Dynamic.h.


Constructor & Destructor Documentation

ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_Dynamic::ACE_Dynamic void   ) 
 

Constructor.

Definition at line 17 of file Dynamic.cpp.

References ACE_TRACE.

00018   : is_dynamic_ (false)
00019 {
00020   ACE_TRACE ("ACE_Dynamic::ACE_Dynamic");
00021 }

ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE ACE_Dynamic::~ACE_Dynamic void   ) 
 

Destructor.

Definition at line 8 of file Dynamic.inl.

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


Member Function Documentation

ACE_Dynamic * ACE_Dynamic::instance void   )  [static]
 

Definition at line 24 of file Dynamic.cpp.

References ACE_TSS_Singleton< TYPE, ACE_LOCK >::instance().

Referenced by ACE_Svc_Handler<, >::ACE_Svc_Handler(), and ACE_Svc_Handler<, >::operator new().

ACE_INLINE bool ACE_Dynamic::is_dynamic void   ) 
 

true if we were allocated dynamically, else false.

Definition at line 21 of file Dynamic.inl.

References is_dynamic_.

Referenced by ACE_Svc_Handler<, >::ACE_Svc_Handler().

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

ACE_INLINE void ACE_Dynamic::reset void   ) 
 

Resets state flag.

Definition at line 28 of file Dynamic.inl.

References is_dynamic_.

Referenced by ACE_Svc_Handler<, >::ACE_Svc_Handler().

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

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 14 of file Dynamic.inl.

References is_dynamic_.

Referenced by ACE_Svc_Handler<, >::operator new().

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


Member Data Documentation

bool 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 65 of file Dynamic.h.

Referenced by is_dynamic(), reset(), and set().


The documentation for this class was generated from the following files:
Generated on Thu Nov 9 11:21:52 2006 for ACE by doxygen 1.3.6