#include <Dynamic.h>
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 | |
static ACE_Dynamic * | instance (void) |
Private Attributes | |
bool | is_dynamic_ |
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.
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 | ) |
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().
00025 { 00026 return ACE_TSS_Singleton<ACE_Dynamic, ACE_SYNCH_NULL_MUTEX>::instance (); 00027 }
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 }
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().