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

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 Methods

 ACE_Name_Node (const char *name, char *name_ptr, char *pointer, ACE_Name_Node *head)
 Constructor. More...

 ACE_Name_Node (const ACE_Name_Node &)
 Copy constructor. More...

 ACE_Name_Node (void)
 Constructor. More...

 ~ACE_Name_Node (void)
 Constructor. More...

const char * name (void) const
 Return a pointer to the name of this node. More...

void name (const char *)
 Assign a name;. More...

void dump (void) const
 Dump the state of the object. More...


Static Public Methods

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


Public Attributes

char * name_
 Name of the Node. More...

char * pointer_
 Pointer to the contents. More...

ACE_Name_Node * next_
 Pointer to the next node in the doubly-linked list. More...

ACE_Name_Node * prev_
 Pointer to the previous node in the doubly-linked list. More...


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 310 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 101 of file Malloc.cpp.

References ACE_TRACE, name, name_, and ACE_OS_String::strcpy.

Referenced by dump.

00105   : name_ (name_ptr),
00106     pointer_ (pointer),
00107     next_ (next),
00108     prev_ (0)
00109 {
00110   ACE_TRACE ("ACE_Control_Block::ACE_Name_Node::ACE_Name_Node");
00111   char *n = this->name_;
00112   ACE_OS::strcpy (n, name);
00113   if (next != 0)
00114     next->prev_ = this;
00115 }

ACE_Control_Block::ACE_Name_Node::ACE_Name_Node const ACE_Name_Node &   
 

Copy constructor.

Definition at line 117 of file Malloc.cpp.

References ACE_ASSERT, and ACE_TRACE.

00118 {
00119   ACE_TRACE ("ACE_Control_Block::ACE_Name_Node::ACE_Name_Node");
00120 #if !defined (ACE_PSOS)
00121   ACE_ASSERT (!"not implemented!");
00122 #endif /* ! ACE_PSOS */
00123 }

ACE_Control_Block::ACE_Name_Node::ACE_Name_Node void   
 

Constructor.

Definition at line 96 of file Malloc.cpp.

References ACE_TRACE.

00097 {
00098   ACE_TRACE ("ACE_Control_Block::ACE_Name_Node::ACE_Name_Node");
00099 }

ACE_INLINE ACE_Control_Block::ACE_Name_Node::~ACE_Name_Node void   
 

Constructor.

Definition at line 5 of file Malloc.i.

00006 {
00007 }


Member Function Documentation

void ACE_Control_Block::ACE_Name_Node::dump void    const
 

Dump the state of the object.

Definition at line 147 of file Malloc.cpp.

References ACE_BEGIN_DUMP, ACE_DEBUG, ACE_END_DUMP, ACE_LIB_TEXT, ACE_Name_Node, ACE_TRACE, and LM_DEBUG.

00148 {
00149   ACE_TRACE ("ACE_Control_Block::ACE_Name_Node::dump");
00150 
00151   ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
00152   ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("pointer = %@"), (const char *) this->pointer_));
00153   ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("\nnext_ = %@"), (ACE_Name_Node *) this->next_));
00154   ACE_DEBUG ((LM_DEBUG,
00155               ACE_LIB_TEXT ("\nname_ = (%@, %s)"),
00156               (const char *) this->name_,
00157               (const char *) this->name_));
00158   ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("\n")));
00159   ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
00160 }

ACE_INLINE void ACE_Control_Block::ACE_Name_Node::init_ptr ACE_Name_Node **    ptr,
ACE_Name_Node *    init,
void *    base_addr
[static]
 

Initialize a name node pointer.

Definition at line 18 of file Malloc.i.

00019 {
00020   *ptr = init;
00021 }

void ACE_Control_Block::ACE_Name_Node::name const char *   
 

Assign a name;.

Definition at line 133 of file Malloc.cpp.

References ACE_ASSERT.

00134 {
00135 #if !defined (ACE_PSOS)
00136   ACE_ASSERT (0 == "not implemented!");
00137 #endif /* ! ACE_PSOS */
00138 }

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

Return a pointer to the name of this node.

Definition at line 126 of file Malloc.cpp.

References name_.

Referenced by ACE_Name_Node.

00127 {
00128   const char *c = this->name_;
00129   return c;
00130 }


Member Data Documentation

char* ACE_Control_Block::ACE_Name_Node::name_
 

Name of the Node.

Definition at line 341 of file Malloc.h.

Referenced by ACE_Name_Node, and name.

ACE_Name_Node* ACE_Control_Block::ACE_Name_Node::next_
 

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

Definition at line 347 of file Malloc.h.

Referenced by ACE_Control_Block::dump.

char* ACE_Control_Block::ACE_Name_Node::pointer_
 

Pointer to the contents.

Definition at line 344 of file Malloc.h.

ACE_Name_Node* ACE_Control_Block::ACE_Name_Node::prev_
 

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

Definition at line 350 of file Malloc.h.


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 12:46:57 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002