ACE
6.4.2
|
LIFO iterator for names stored in Malloc'd memory. More...
#include <Malloc_T.h>
Public Types | |
typedef ACE_CB::ACE_Name_Node | NAME_NODE |
typedef ACE_CB::ACE_Malloc_Header | MALLOC_HEADER |
Public Member Functions | |
ACE_Malloc_LIFO_Iterator_T (ACE_Malloc_T< ACE_MEM_POOL_2, ACE_LOCK, ACE_CB > &malloc, const char *name=0) | |
~ACE_Malloc_LIFO_Iterator_T (void) | |
Destructor. More... | |
int | done (void) const |
Returns 1 when all items have been seen, else 0. More... | |
int | next (void *&next_entry) |
int | next (void *&next_entry, const char *&name) |
int | advance (void) |
void | dump (void) const |
Dump the state of an object. More... | |
Public Attributes | |
ACE_ALLOC_HOOK_DECLARE | |
Declare the dynamic allocation hooks. More... | |
Private Attributes | |
ACE_Malloc_T< ACE_MEM_POOL_2, ACE_LOCK, ACE_CB > & | malloc_ |
Malloc we are iterating over. More... | |
NAME_NODE * | curr_ |
Keeps track of how far we've advanced... More... | |
ACE_Read_Guard< ACE_LOCK > | guard_ |
Lock Malloc for the lifetime of the iterator. More... | |
const char * | name_ |
Name that we are searching for. More... | |
LIFO iterator for names stored in Malloc'd memory.
This class can be configured flexibly with different types of ACE_LOCK strategies that support the ACE_Thread_Mutex and ACE_Process_Mutex constructor API.
Does not support deletions while iteration is occurring.
typedef ACE_CB::ACE_Malloc_Header ACE_Malloc_LIFO_Iterator_T< ACE_MEM_POOL_1, ACE_LOCK, ACE_CB >::MALLOC_HEADER |
typedef ACE_CB::ACE_Name_Node ACE_Malloc_LIFO_Iterator_T< ACE_MEM_POOL_1, ACE_LOCK, ACE_CB >::NAME_NODE |
ACE_Malloc_LIFO_Iterator_T< ACE_MEM_POOL_1, ACE_LOCK, ACE_CB >::ACE_Malloc_LIFO_Iterator_T | ( | ACE_Malloc_T< ACE_MEM_POOL_2, ACE_LOCK, ACE_CB > & | malloc, |
const char * | name = 0 |
||
) |
If name = 0 it will iterate through everything else only through those entries whose name match.
ACE_Malloc_LIFO_Iterator_T< ACE_MEM_POOL_1, ACE_LOCK, ACE_CB >::~ACE_Malloc_LIFO_Iterator_T | ( | void | ) |
Destructor.
int ACE_Malloc_LIFO_Iterator_T< ACE_MEM_POOL_1, ACE_LOCK, ACE_CB >::advance | ( | void | ) |
Move forward by one element in the set. Returns 0 when all the items in the set have been seen, else 1.
int ACE_Malloc_LIFO_Iterator_T< ACE_MEM_POOL_1, ACE_LOCK, ACE_CB >::done | ( | void | ) | const |
Returns 1 when all items have been seen, else 0.
void ACE_Malloc_LIFO_Iterator_T< ACE_MEM_POOL_1, ACE_LOCK, ACE_CB >::dump | ( | void | ) | const |
Dump the state of an object.
int ACE_Malloc_LIFO_Iterator_T< ACE_MEM_POOL_1, ACE_LOCK, ACE_CB >::next | ( | void *& | next_entry | ) |
Pass back the next entry in the set that hasn't yet been visited. Returns 0 when all items have been seen, else 1.
int ACE_Malloc_LIFO_Iterator_T< ACE_MEM_POOL_1, ACE_LOCK, ACE_CB >::next | ( | void *& | next_entry, |
const char *& | name | ||
) |
Pass back the next entry (and the name associated with it) in the set that hasn't yet been visited. Returns 0 when all items have been seen, else 1.
ACE_Malloc_LIFO_Iterator_T< ACE_MEM_POOL_1, ACE_LOCK, ACE_CB >::ACE_ALLOC_HOOK_DECLARE |
Declare the dynamic allocation hooks.
|
private |
Keeps track of how far we've advanced...
|
private |
Lock Malloc for the lifetime of the iterator.
|
private |
Malloc we are iterating over.
|
private |
Name that we are searching for.