Reference

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