## NAME

ACE_Map_Iterator_Base - Iterator for the `ACE_Map_Manager`.

## SYNOPSIS

    #include <ace/Map_Manager.h>

    template<class EXT_ID, class INT_ID, class ACE_LOCK>
    class ACE_Map_Iterator_Base
    {
      public:
        ACE_Map_Iterator_Base (
            ACE_Map_Manager <EXT_ID, INT_ID, ACE_LOCK> &mm
            );
        int next (ACE_Map_Entry<EXT_ID, INT_ID> *&next_entry) const;
        int done (void) const;
        ACE_Map_Entry<EXT_ID, INT_ID>& operator* (void) const;
        ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>& map (void);
        int operator== (
            const ACE_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK> &
            ) const;
        int operator!= (
            const ACE_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK> &
            ) const;
        ACE_ALLOC_HOOK_DECLARE;
      protected:
        int forward_i (void);
        int reverse_i (void);
        void dump_i (void) const;
        ACE_Map_Manager <EXT_ID, INT_ID, ACE_LOCK> *map_man_;
        size_t next_;
    };

## DESCRIPTION

This class factors out common code from its templatized subclasses.

## Initialization method.

    ACE_Map_Iterator_Base (
        ACE_Map_Manager <EXT_ID, INT_ID, ACE_LOCK> &mm
        );

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_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_Map_Entry<EXT_ID, INT_ID>& operator* (void) const;

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

    ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>& map (void);

Returns reference the Map_Manager that is being iterated over.

    int operator== (
        const ACE_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK> &
        ) const;

    int operator!= (
        const ACE_Map_Iterator_Base<EXT_ID, INT_ID, 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