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

ACE_PI_Control_Block::ACE_Name_Node Class Reference

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

#include <PI_Malloc.h>

Collaboration diagram for ACE_PI_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 (NAME_NODE_PTR *ptr, ACE_Name_Node *init, void *base_addr)
 Initialize a name node pointer. More...


Public Attributes

CHAR_PTR name_
 Name of the Node. More...

CHAR_PTR pointer_
 Pointer to the contents. More...

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

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


Private Methods

void operator= (const ACE_Name_Node &)

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 103 of file PI_Malloc.h.


Constructor & Destructor Documentation

ACE_PI_Control_Block::ACE_Name_Node::ACE_Name_Node const char *    name,
char *    name_ptr,
char *    pointer,
ACE_Name_Node *    head
 

Constructor.

Definition at line 97 of file PI_Malloc.cpp.

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

Referenced by dump.

00101   : name_ (name_ptr),
00102     pointer_ (pointer),
00103     next_ (next),
00104     prev_ (0)
00105 {
00106   ACE_TRACE ("ACE_PI_Control_Block::ACE_Name_Node::ACE_Name_Node");
00107   char *n = this->name_;
00108   ACE_OS::strcpy (n, name);
00109   if (next != 0)
00110     next->prev_ = this;
00111 }

ACE_PI_Control_Block::ACE_Name_Node::ACE_Name_Node const ACE_Name_Node &   
 

Copy constructor.

Definition at line 113 of file PI_Malloc.cpp.

References ACE_ASSERT, and ACE_TRACE.

00114 {
00115   ACE_TRACE ("ACE_PI_Control_Block::ACE_Name_Node::ACE_Name_Node");
00116   ACE_ASSERT (0); // not implemented!
00117 }

ACE_PI_Control_Block::ACE_Name_Node::ACE_Name_Node void   
 

Constructor.

Definition at line 92 of file PI_Malloc.cpp.

References ACE_TRACE.

00093 {
00094   ACE_TRACE ("ACE_PI_Control_Block::ACE_Name_Node::ACE_Name_Node");
00095 }

ACE_PI_Control_Block::ACE_Name_Node::~ACE_Name_Node void   
 

Constructor.


Member Function Documentation

void ACE_PI_Control_Block::ACE_Name_Node::dump void    const
 

Dump the state of the object.

Definition at line 139 of file PI_Malloc.cpp.

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

00140 {
00141   ACE_TRACE ("ACE_PI_Control_Block::ACE_Name_Node::dump");
00142 
00143   ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
00144   ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT("pointer = %x"), (const char *) this->pointer_));
00145   ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT("\nnext_ = %x"), (ACE_Name_Node *) this->next_));
00146   ACE_DEBUG ((LM_DEBUG,
00147               ACE_LIB_TEXT("\nname_ = (%x, %s)"),
00148               (const char *) this->name_,
00149               (const char *) this->name_));
00150   ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT("\n")));
00151   ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
00152 }

void ACE_PI_Control_Block::ACE_Name_Node::init_ptr NAME_NODE_PTR   ptr,
ACE_Name_Node *    init,
void *    base_addr
[static]
 

Initialize a name node pointer.

void ACE_PI_Control_Block::ACE_Name_Node::name const char *   
 

Assign a name;.

Definition at line 127 of file PI_Malloc.cpp.

References ACE_ASSERT.

00128 {
00129   ACE_ASSERT (0); // not implemented yet.
00130 }

const char * ACE_PI_Control_Block::ACE_Name_Node::name void    const
 

Return a pointer to the name of this node.

Definition at line 120 of file PI_Malloc.cpp.

References name_.

Referenced by ACE_Name_Node.

00121 {
00122   const char *c = this->name_;
00123   return c;
00124 }

void ACE_PI_Control_Block::ACE_Name_Node::operator= const ACE_Name_Node &    [private]
 


Member Data Documentation

CHAR_PTR ACE_PI_Control_Block::ACE_Name_Node::name_
 

Name of the Node.

Definition at line 134 of file PI_Malloc.h.

Referenced by ACE_Name_Node, and name.

NAME_NODE_PTR ACE_PI_Control_Block::ACE_Name_Node::next_
 

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

Definition at line 140 of file PI_Malloc.h.

CHAR_PTR ACE_PI_Control_Block::ACE_Name_Node::pointer_
 

Pointer to the contents.

Definition at line 137 of file PI_Malloc.h.

NAME_NODE_PTR ACE_PI_Control_Block::ACE_Name_Node::prev_
 

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

Definition at line 143 of file PI_Malloc.h.


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