Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions

ACE_Control_Block::ACE_Name_Node Class Reference

This class supports "named memory regions" within ACE_Malloc. More...

#include <Malloc.h>

Collaboration diagram for ACE_Control_Block::ACE_Name_Node:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ACE_Name_Node (const char *name, char *name_ptr, char *pointer, ACE_Name_Node *head)
 Constructor.
 ACE_Name_Node (void)
 Constructor.
 ~ACE_Name_Node (void)
 Constructor.
const char * name (void) const
 Return a pointer to the name of this node.
void dump (void) const
 Dump the state of the object.

Static Public Member Functions

static void init_ptr (ACE_Name_Node **ptr, ACE_Name_Node *init, void *base_addr)
 Initialize a name node pointer.

Public Attributes

char * name_
 Name of the Node.
char * pointer_
 Pointer to the contents.
ACE_Name_Nodenext_
 Pointer to the next node in the doubly-linked list.
ACE_Name_Nodeprev_
 Pointer to the previous node in the doubly-linked list.

Private Member Functions

 ACE_Name_Node (const ACE_Name_Node &)
 Copy constructor.

Detailed Description

This class supports "named memory regions" within ACE_Malloc.

Internally, the named memory regions are stored as a doubly-linked list within the Memory_Pool. This makes it easy to iterate over the items in the list in both FIFO and LIFO order.

Definition at line 302 of file Malloc.h.


Constructor & Destructor Documentation

ACE_Control_Block::ACE_Name_Node::ACE_Name_Node ( const char *  name,
char *  name_ptr,
char *  pointer,
ACE_Name_Node head 
)

Constructor.

Definition at line 110 of file Malloc.cpp.

  : name_ (name_ptr),
    pointer_ (pointer),
    next_ (next),
    prev_ (0)
{
  ACE_TRACE ("ACE_Control_Block::ACE_Name_Node::ACE_Name_Node");
  char *n = this->name_;
  ACE_OS::strcpy (n, name);
  if (next != 0)
    next->prev_ = this;
}

ACE_Control_Block::ACE_Name_Node::ACE_Name_Node ( void   ) 

Constructor.

Definition at line 105 of file Malloc.cpp.

{
  ACE_TRACE ("ACE_Control_Block::ACE_Name_Node::ACE_Name_Node");
}

ACE_Control_Block::ACE_Name_Node::~ACE_Name_Node ( void   )  [inline]

Constructor.

Definition at line 8 of file Malloc.inl.

{
}

ACE_Control_Block::ACE_Name_Node::ACE_Name_Node ( const ACE_Name_Node  )  [private]

Copy constructor.


Member Function Documentation

void ACE_Control_Block::ACE_Name_Node::dump ( void   )  const

Dump the state of the object.

Definition at line 139 of file Malloc.cpp.

{
#if defined (ACE_HAS_DUMP)
  ACE_TRACE ("ACE_Control_Block::ACE_Name_Node::dump");

  ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
  ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("pointer = %@"), (const char *) this->pointer_));
  ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nnext_ = %@"), (ACE_Name_Node *) this->next_));
  ACE_DEBUG ((LM_DEBUG,
              ACE_TEXT ("\nname_ = (%@, %C)\n"),
              (const char *) this->name_,
              (const char *) this->name_));
  ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
#endif /* ACE_HAS_DUMP */
}

void ACE_Control_Block::ACE_Name_Node::init_ptr ( ACE_Name_Node **  ptr,
ACE_Name_Node init,
void *  base_addr 
) [inline, static]

Initialize a name node pointer.

Definition at line 21 of file Malloc.inl.

{
  *ptr = init;
}

const char * ACE_Control_Block::ACE_Name_Node::name ( void   )  const

Return a pointer to the name of this node.

Definition at line 127 of file Malloc.cpp.

{
  return this->name_;
}


Member Data Documentation

Name of the Node.

Definition at line 327 of file Malloc.h.

Pointer to the next node in the doubly-linked list.

Definition at line 333 of file Malloc.h.

Pointer to the contents.

Definition at line 330 of file Malloc.h.

Pointer to the previous node in the doubly-linked list.

Definition at line 336 of file Malloc.h.


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