library: libCore #include "TMap.h"

# TMapIter

class description - source file - inheritance tree (.ps)

## class TMapIter : public TIterator

| Inheritance Chart:

`TIterator`

<-

`TMapIter`

        private:

                   TMapIter()

        public:

                                     TMapIter(const TMap* map, Bool_t dir = kIterForward)
                                     TMapIter(const TMapIter& iter)
                                     ~TMapIter()
                      static TClass* Class()
          virtual const TCollection* GetCollection() const
                     virtual TClass* IsA() const
                    virtual TObject* Next()
                  virtual TIterator& operator=(const TIterator& rhs)
                           TMapIter& operator=(const TMapIter& rhs)
                        virtual void Reset()
                        virtual void ShowMembers(TMemberInspector& insp, char* parent)
                        virtual void Streamer(TBuffer& b)
                                void StreamerNVirtual(TBuffer& b)

### Data Members

        private:

              const TMap* fMap        map being iterated
          THashTableIter* fCursor     current position in map
                   Bool_t fDirection  iteration direction

## Class Description

     TMap

     TMap implements an associative array of (key,value) pairs using a
     THashTable for efficient retrieval (therefore TMap does not conserve
     the order of the entries). The hash value is calculated
     using the value returned by the keys Hash() function. Both key and
     value need to inherit from TObject.

/* */

TMapIter(const TMap *m, Bool_t dir)

     Create a map iterator. Use dir to specify the desired iteration direction.

TMapIter(const TMapIter &iter) : TIterator(iter)

     Copy ctor.

~TMapIter()

     Map iterator dtor.

TObject* Next()

     Returns the next key from a map. Use TMap::GetValue() to get the value
     associated with the key. Returns 0 when no more items in map.

void Reset()

     Reset the map iterator.

### Inline Functions

                      TMapIter TMapIter(const TMapIter& iter)
                    TIterator& operator=(const TIterator& rhs)
                     TMapIter& operator=(const TMapIter& rhs)
            const TCollection* GetCollection() const
                       TClass* Class()
                       TClass* IsA() const
                          void ShowMembers(TMemberInspector& insp, char* parent)
                          void Streamer(TBuffer& b)
                          void StreamerNVirtual(TBuffer& b)

Author: Fons Rademakers 12/11/95
Last update: root/cont:$Name: $:$Id: TMap.cxx,v 1.12 2003/09/23 22:03:34 rdm Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *