---
name: "ACE_Hash_Map_Iterator_Base_Ex"
section: "3"
platform: "linux"
package: "libace-doc"
version: "5.0.7-4"
release: "Debian 2.2 (Potato)"
platforms: ["linux"]
url: "https://new.carta.tech/ACE_Hash_Map_Iterator_Base_Ex"
---

# ACE\_Hash\_Map\_Iterator\_Base\_Ex(3)

Base iterator for the ACE\_Hash\_Map\_Manager\_Ex

## NAME

ACE\_Hash\_Map\_Iterator\_Base\_Ex -  Base iterator for the ACE\_Hash\_Map\_Manager\_Ex

## SYNOPSIS

```
#include <ace/Hash_Map_Manager_T.h>
template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
class ACE_Hash_Map_Iterator_Base_Ex
{
  public:
    ACE_Hash_Map_Iterator_Base_Ex (
        ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &mm,
        int head
        );
    int next (ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&next_entry) const;
    int done (void) const;
    ACE_Hash_Map_Entry<EXT_ID, INT_ID>& operator* (void) const;
    ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>& map (
        void
        );
    int operator== (
        const ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &
        ) const;
    int operator!= (
        const ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &
        ) const;
    ACE_ALLOC_HOOK_DECLARE;
  protected:
    int forward_i (void);
    int reverse_i (void);
    void dump_i (void) const;
        ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> *map_man_;

    ssize_t index_;
    ACE_Hash_Map_Entry<EXT_ID, INT_ID> *next_;
};
```

## DESCRIPTION

This class factors out common code from its templatized subclasses.

## Initialization method.

```
ACE_Hash_Map_Iterator_Base_Ex (
    ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &mm,
    int head
    );
```

Contructor.  If head != 0, the iterator constructed is positioned at the head of the map, it is positioned at the end otherwise.

## ITERATION methods.

```
int next (ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&next_entry) const;
```

Pass back the next entry that hasn't been seen in the Set. Returns 0 when all items have been seen, else 1.

```
int done (void) const;
```

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

```
ACE_Hash_Map_Entry<EXT_ID, INT_ID>& operator* (void) const;
```

Returns a reference to the interal element this is pointing to.

```
ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>& map (
    void
    );
```

Returns reference the Hash\_Map\_Manager\_Ex that is being iterated over.

```
int operator== (
    const ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &
    ) const;
```

```
int operator!= (
    const ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &
    ) const;
```

Check if two iterators point to the same position

```
ACE_ALLOC_HOOK_DECLARE;
```

Declare the dynamic allocation hooks.

## AUTHOR

Doug Schmidt

## LIBRARY

ace
