Public Member Functions | Static Public Member Functions | Private Attributes

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

static 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_Dynamic::ACE_Dynamic ( void   ) 

Constructor.

Definition at line 17 of file Dynamic.cpp.

  : is_dynamic_ (false)
{
  ACE_TRACE ("ACE_Dynamic::ACE_Dynamic");
}

ACE_Dynamic::~ACE_Dynamic ( void   )  [inline]

Destructor.

Definition at line 8 of file Dynamic.inl.

{
  // ACE_TRACE ("ACE_Dynamic::~ACE_Dynamic");
}


Member Function Documentation

ACE_Dynamic * ACE_Dynamic::instance ( void   )  [static]
bool ACE_Dynamic::is_dynamic ( void   )  [inline]

true if we were allocated dynamically, else false.

Definition at line 21 of file Dynamic.inl.

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

void ACE_Dynamic::reset ( void   )  [inline]

Resets state flag.

Definition at line 28 of file Dynamic.inl.

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

void ACE_Dynamic::set ( void   )  [inline]

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.

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


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.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines