NAME

ACE_Malloc_Iterator - Iterator for names stored in Malloc'd memory.

SYNOPSIS


#include <ace/Malloc_T.h>


template<class MEM_POOL, class LOCK>
class ACE_Malloc_Iterator
{
  public:
    ACE_Malloc_Iterator (
        ACE_Malloc<MEM_POOL, LOCK> &malloc,
        const char *name = 0
        );
    ~ACE_Malloc_Iterator (void);
    int next (void *&next_entry);
    int next (void *&next_entry, char *&name);
    int advance (void);
    void dump (void) const;
    ACE_ALLOC_HOOK_DECLARE;
  private:
    ACE_Malloc<MEM_POOL, LOCK> &malloc_;
    ACE_Name_Node *curr_;
    ACE_Read_Guard<LOCK> guard_;
    const char *name_;
};

DESCRIPTION

Does not allows deletions while iteration is occurring.

Initialization method.

ACE_Malloc_Iterator (
    ACE_Malloc<MEM_POOL, LOCK> &malloc,
    const char *name = 0
    );
~ACE_Malloc_Iterator (void);

Iteration methods.

int next (void *&next_entry);
int next (void *&next_entry, char *&name);
int advance (void);
void dump (void) const;
ACE_ALLOC_HOOK_DECLARE;

AUTHOR

Doug Schmidt and Irfan Pyarali

LIBRARY

ace