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

# ACE_Malloc_FIFO_Iterator_T Class Template Reference

FIFO iterator for names stored in Malloc'd memory. More...

`#include <Malloc_T.h>`

Inheritance diagram for ACE_Malloc_FIFO_Iterator_T:

[legend]
Collaboration diagram for ACE_Malloc_FIFO_Iterator_T:

[legend]
List of all members.

## Public Types
typedef ACE_TYPENAME ACE_CB::ACE_Name_Node | NAME_NODE
typedef ACE_TYPENAME ACE_CB::ACE_Malloc_Header | MALLOC_HEADER
## Public Methods
| ACE_Malloc_FIFO_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. More...
| ~ACE_Malloc_FIFO_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)
| Pass back the next entry in the set that hasn't yet been visited. Returns 0 when all items have been seen, else 1. More...
int | next (void *&next_entry, const char *&name)
int | advance (void)
| Move forward by one element in the set. Returns 0 when all the items in the set have been seen, else 1. More...
int | start (void)
| Go to the starting element that was inserted first. Returns 0 when there is no item in the set, else 1. More...
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...

## Detailed Description

### template<ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB>
class ACE_Malloc_FIFO_Iterator_T<, ACE_LOCK, ACE_CB >

FIFO iterator for names stored in Malloc'd memory.

Does not support deletions while iteration is occurring.

## Member Typedef Documentation

template<ACE_MEM_POOL_1 , class ACE_LOCK, class ACE_CB>
typedef ACE_TYPENAME ACE_CB::ACE_Malloc_Header ACE_Malloc_FIFO_Iterator_T::MALLOC_HEADER

template<ACE_MEM_POOL_1 , class ACE_LOCK, class ACE_CB>
typedef ACE_TYPENAME ACE_CB::ACE_Name_Node ACE_Malloc_FIFO_Iterator_T::NAME_NODE

## Constructor & Destructor Documentation

template<ACE_MEM_POOL_1 , class ACE_LOCK, class ACE_CB>
ACE_Malloc_FIFO_Iterator_T<, ACE_LOCK, ACE_CB >::ACE_Malloc_FIFO_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.

template<ACE_MEM_POOL_1 , class ACE_LOCK, class ACE_CB>
ACE_Malloc_FIFO_Iterator_T<, ACE_LOCK, ACE_CB >::~ACE_Malloc_FIFO_Iterator_T | ( | void |  | ) |

| Destructor.

## Member Function Documentation

template<ACE_MEM_POOL_1 , class ACE_LOCK, class ACE_CB>
int ACE_Malloc_FIFO_Iterator_T<, 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.

template<ACE_MEM_POOL_1 , class ACE_LOCK, class ACE_CB>
int ACE_Malloc_FIFO_Iterator_T<, ACE_LOCK, ACE_CB >::done | ( | void |  | ) | const

| Returns 1 when all items have been seen, else 0.

template<ACE_MEM_POOL_1 , class ACE_LOCK, class ACE_CB>
void ACE_Malloc_FIFO_Iterator_T<, ACE_LOCK, ACE_CB >::dump | ( | void |  | ) | const

| Dump the state of an object.

template<ACE_MEM_POOL_1 , class ACE_LOCK, class ACE_CB>
int ACE_Malloc_FIFO_Iterator_T<, 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.

template<ACE_MEM_POOL_1 , class ACE_LOCK, class ACE_CB>
int ACE_Malloc_FIFO_Iterator_T<, 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.

template<ACE_MEM_POOL_1 , class ACE_LOCK, class ACE_CB>
int ACE_Malloc_FIFO_Iterator_T<, ACE_LOCK, ACE_CB >::start | ( | void |  | ) |

| Go to the starting element that was inserted first. Returns 0 when there is no item in the set, else 1.

## Member Data Documentation

template<ACE_MEM_POOL_1 , class ACE_LOCK, class ACE_CB>
ACE_Malloc_FIFO_Iterator_T::ACE_ALLOC_HOOK_DECLARE

| Declare the dynamic allocation hooks.

template<ACE_MEM_POOL_1 , class ACE_LOCK, class ACE_CB>
NAME_NODE* ACE_Malloc_FIFO_Iterator_T::curr_`[private]`

| Keeps track of how far we've advanced...

template<ACE_MEM_POOL_1 , class ACE_LOCK, class ACE_CB>
ACE_Read_Guard<ACE_LOCK> ACE_Malloc_FIFO_Iterator_T::guard_`[private]`

| Lock Malloc for the lifetime of the iterator.

template<ACE_MEM_POOL_1 , class ACE_LOCK, class ACE_CB>
ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>& ACE_Malloc_FIFO_Iterator_T::malloc_`[private]`

| Malloc we are iterating over.

template<ACE_MEM_POOL_1 , class ACE_LOCK, class ACE_CB>
const char* ACE_Malloc_FIFO_Iterator_T::name_`[private]`

| Name that we are searching for.

The documentation for this class was generated from the following files:

- Malloc_T.h
- Malloc_T.cpp