Hash iterators are used to step through a hash, one or more elements at a time. Iterators that are newly constructed or reset are positioned before the first element in the hash. The hash may be traversed one element at a time using the pre-increment or call operator. An increment operation causing the iterator to be positioned after the end of the hash returns zero. Further increments will cause the undef_iter exception to be thrown, if it is enabled. The WCIterExcept class provides the common exception handling control interface for all of the iterators.
Since the iterator classes are all template classes, most of the functionality is derived from common base classes. In the listing of class member functions, those public member functions that appear to be in the iterator class but are actually defined in the common base class are identified as if they were explicitly specified in the iterator class.
This chapter describes the following classes:
wchiter.h
The WCPtrHashDictIter<Key,Value> class is the templated class used to create iterator objects for WCPtrHashDict<Key,Value> hash objects. In the description of each member function,
The WCIterExcept class is a base class of the WCPtrHashDictIter<Key,Value> class, and provides the exceptions() member function. This member function controls the exceptions that can be thrown by the WCPtrHashDictIter<Key,Value> object. No exceptions are enabled unless they're set by the exceptions() member function.
The following member functions are declared in the public interface:
WCPtrHashDictIter(); WCPtrHashDictIter( const WCPtrHashDict<Key,Value> & ); ~WCPtrHashDictIter(); const WCPtrHashDict<Key,Value> * container() const; Key * key(); void reset(); void reset( WCPtrHashDict<Key,Value> & ); Value * value();
The following member operators are declared in the public interface:
int operator ()(); int operator ++();
create a WCPtrHashDictIter<Key,Value> object
#include <wchiter.h> public: WCPtrHashDictIter(); WCPtrHashDictIter( WCPtrHashDict<Key,Value> & );
There are two forms of the public WCPtrHashDictIter<Key,Value> constructor:
The public WCPtrHashDictIter<Key,Value> constructor creates a WCPtrHashDictIter hash iterator object.
WCPtrHashDictIter<Key,Value>::~WCPtrHashDictIter(), WCPtrHashDictIter<Key,Value>::operator ()(), WCPtrHashDictIter<Key,Value>::operator ++(), WCPtrHashDictIter<Key,Value>::reset()
destroy a WCPtrHashDictIter<Key,Value> object
#include <wchiter.h> public: ~WCPtrHashDictIter();
The public WCPtrHashDictIter<Key,Value> destructor is the destructor for the class. The call to it is inserted implicitly by the compiler at the point where the WCPtrHashDictIter hash iterator object goes out of scope.
The WCPtrHashDictIter hash iterator object is destroyed.
WCPtrHashDictIter<Key,Value>::WCPtrHashDictIter()
return a pointer to the hash container object
#include <wchiter.h> public: WCPtrHashDict<Key,Value> * container() const;
The container() public member function returns a pointer to the hash container object. If the iterator hasn't been initialized with a hash object, and the undef_iter exception is enabled, the exception is thrown.
A pointer to the hash object associated with the iterator is returned, or NULL(0) if the iterator hasn't been initialized with a hash.
WCIterExcept::undef_iter, WCPtrHashDictIter<Key,Value>::WCPtrHashDictIter(), WCPtrHashDictIter<Key,Value>::reset()
return a pointer to the Key at the current iterator position
#include <wchiter.h> public: Key * key();
The key() public member function returns a pointer to the Key value of the hash item at the current iterator position.
If the iterator isn't associated with a hash, or the iterator position is either before the first element or past the last element in the hash, the current iterator position is undefined. In this case the undef_item exception is thrown, if enabled.
A pointer to Key at the current iterator element is returned. If the current element is undefined, an undefined pointer is returned.
WCIterExcept::undef_item, WCPtrHashDictIter<Key,Value>::operator ()(), WCPtrHashDictIter<Key,Value>::operator ++(), WCPtrHashDictIter<Key,Value>::reset()
the call operator for the class
#include <wchiter.h> public: int operator ()();
The operator ()() public member function is the call operator for the class. The hash element that follows the current item is set to be the new current item. If the previous current item is the last element in the hash, the iterator is positioned after the end of the hash.
The operator ()() public member function has the same semantics as the pre-increment operator, operator ++().
If the iterator is positioned before the first hash element, the current item is set to the first element. If the hash is empty, the iterator is positioned after the end of the hash.
If the iterator isn't associated with a hash, or the iterator position before the increment is past the last element in the hash, the undef_iter exception is thrown, if enabled.
The operator ()() public member function returns a non-zero value if the iterator is positioned on a hash item. It returns 0 when the iterator is incremented past the end of the hash.
WCIterExcept::undef_iter, WCPtrHashDictIter<Key,Value>::operator ++(), WCPtrHashDictIter<Key,Value>::reset()
the pre-increment operator for the class
#include <wchiter.h> public: int operator ++();
The operator ++() public member function is the pre-increment operator for the class. The hash element that follows the current item is set to be the new current item. If the previous current item is the last element in the hash, the iterator is positioned after the end of the hash.
The operator ++() public member function has the same semantics as the call operator, operator ()().
The current item is set to the first hash element if the iterator is positioned before the first element in the hash. If the hash is empty, the iterator is positioned after the end of the hash.
If the iterator isn't associated with a hash, or the iterator position before the increment is past the last element in the hash, the undef_iter exception is thrown, if enabled.
The operator ++() public member function returns a non-zero value if the iterator is positioned on a hash item. It returns 0 when the iterator is incremented past the end of the hash.
WCIterExcept::undef_iter, WCPtrHashDictIter<Key,Value>::operator ()(), WCPtrHashDictIter<Key,Value>::reset()
reset the iterator to the initial state
#include <wchiter.h> public: void reset(); void reset( WCPtrHashDict<Key,Value> & );
The first form of the reset() public member function resets the iterator to the initial state, positioning the iterator before the first element in the associated hash.
The second form of this function resets the iterator to operate on the specified hash. The iterator is positioned before the first element in the hash.
The iterator is positioned before the first hash element.
WCPtrHashDictIter<Key,Value>::WCPtrHashDictIter(), WCPtrHashDictIter<Key,Value>::container()
return a pointer to the Value at the current iterator position
#include <wchiter.h> public: Value * value();
The value() public member function returns a pointer to the Value at the current iterator position.
If the iterator isn't associated with a hash, or the iterator position is either before the first element or past the last element in the hash, the current iterator position is undefined. In this case the undef_item is thrown, if enabled.
A pointer to the Value at the current iterator element is returned. If the current element is undefined, an undefined pointer is returned.
WCIterExcept::undef_item, WCPtrHashDictIter<Key,Value>::operator ()(), WCPtrHashDictIter<Key,Value>::operator ++(), WCPtrHashDictIter<Key,Value>::reset()
wchiter.h
The WCValHashDictIter<Key,Value> class is the templated class used to create iterator objects for WCValHashDict<Key,Value> hash objects. In the description of each member function,
The WCIterExcept class is a base class of the WCValHashDictIter<Key,Value> class, and provides the exceptions() member function. This member function controls the exceptions that can be thrown by the WCValHashDictIter object. No exceptions are enabled unless they're set by the exceptions() member function.
The following member functions are declared in the public interface:
WCValHashDictIter(); WCValHashDictIter( const WCValHashDict<Key,Value> & ); ~WCValHashDictIter(); const WCValHashDict<Key,Value> *container() const; Key key(); void reset(); void reset( WCValHashDict<Key,Value> & ); Value value();
The following member operators are declared in the public interface:
int operator ()(); int operator ++();
create a WCValHashDictIter<Key,Value> object
#include <wchiter.h> public: WCValHashDictIter(); WCValHashDictIter( WCValHashDict<Key,Value> & );
The public WCValHashDictIter<Key,Value> constructor is available in two forms:
The public WCValHashDictIter<Key,Value> constructor creates a WCValHashDictIter hash iterator object.
WCValHashDictIter<Key,Value>::~WCValHashDictIter(), WCValHashDictIter<Key,Value>::operator ()(), WCValHashDictIter<Key,Value>::operator ++(), WCValHashDictIter<Key,Value>::reset()
destroy a WCValHashDictIter<Key,Value> object
#include <wchiter.h> public: ~WCValHashDictIter();
The public WCValHashDictIter<Key,Value> destructor is the destructor for the class. The call to this destructor is inserted implicitly by the compiler at the point where the WCValHashDictIter hash iterator object goes out of scope.
The WCValHashDictIter hash iterator object is destroyed.
WCValHashDictIter<Key,Value>::WCValHashDictIter()
return a pointer to the hash container object
#include <wchiter.h> public: WCValHashDict<Key,Value> * container() const;
The container() public member function returns a pointer to the hash container object. If the iterator hasn't been initialized with a hash object, and the undef_iter exception is enabled, the exception is thrown.
A pointer to the hash object associated with the iterator is returned, or NULL(0) if the iterator hasn't been initialized with a hash.
WCIterExcept::undef_iter, WCValHashDictIter<Key,Value>::WCValHashDictIter(), WCValHashDictIter<Key,Value>::reset()
return the value of the Key value of the current hash item
#include <wchiter.h> public: Key key();
The key() public member function returns the value of Key at the current iterator position.
If the iterator isn't associated with a hash, or the iterator position is either before the first element or past the last element in the hash, the current iterator position is undefined. In this case the undef_item exception is thrown, if enabled.
The value of Key at the current iterator element is returned. If the current element is undefined, a default initialized object is returned.
WCIterExcept::undef_item, WCValHashDictIter<Key,Value>::operator ()(), WCValHashDictIter<Key,Value>::operator ++(), WCValHashDictIter<Key,Value>::reset()
the call operator for the class
#include <wchiter.h> public: int operator ()();
The operator ()() public member function is the call operator for the class. The hash element that follows the current item is set to be the new current item. If the previous current item is the last element in the hash, the iterator is positioned after the end of the hash.
The operator ()() public member function has the same semantics as the pre-increment operator, operator ++().
If the iterator is positioned before the first hash element, the current item is set to the first element. If the hash is empty, the iterator is positioned after the end of the hash.
If the iterator isn't associated with a hash, or the iterator position before the increment is past the last element in the hash, the undef_iter exception is thrown, if enabled.
The operator ()() public member function returns a non-zero value if the iterator is positioned on a hash item. It returns 0 when the iterator is incremented past the end of the hash.
WCIterExcept::undef_iter, WCValHashDictIter<Key,Value>::operator ++(), WCValHashDictIter<Key,Value>::reset()
the pre-increment operator for the class
#include <wchiter.h> public: int operator ++();
The operator ++() public member function is the pre-increment operator for the class. The hash element that follows the current item is set to be the new current item. If the previous current item is the last element in the hash, the iterator is positioned after the end of the hash.
The operator ++() public member function has the same semantics as the call operator, operator ()().
The current item is set to the first hash element if the iterator is positioned before the first element in the hash. If the hash is empty, the iterator is positioned after the end of the hash.
If the iterator isn't associated with a hash, or the iterator position before the increment is past the last element in the hash, the undef_iter exception is thrown, if enabled.
The operator ++() public member function returns a non-zero value if the iterator is positioned on a hash item. It returns 0 when the iterator is incremented past the end of the hash.
WCIterExcept::undef_iter, WCValHashDictIter<Key,Value>::operator ()(), WCValHashDictIter<Key,Value>::reset()
position the iterator before the first hash element
#include <wchiter.h> public: void reset(); void reset( WCValHashDict<Key,Value> & );
The first form of the reset() public member function resets the iterator to the initial state, positioning the iterator before the first element in the associated hash.
The second form of this function resets the iterator to operate on the specified hash. The iterator is positioned before the first element in the hash.
The iterator is positioned before the first hash element.
WCValHashDictIter<Key,Value>::WCValHashDictIter(), WCValHashDictIter<Key,Value>::container()
return the value of the Value at the current iterator position
#include <wchiter.h> public: Value value();
The value() public member function returns the value of Value at the current iterator position.
If the iterator isn't associated with a hash, or the iterator position is either before the first element or past the last element in the hash, the current iterator position is undefined. In this case the undef_item exception is thrown, if enabled.
The value of the Value at the current iterator element is returned. If the current element is undefined, a default initialized object is returned.
WCIterExcept::undef_item, WCValHashDictIter<Key,Value>::operator ()(), WCValHashDictIter<Key,Value>::operator ++(), WCValHashDictIter<Key,Value>::reset()
wchiter.h
The WCPtrHashTableIter<Type> and WCPtrHashSetIter classes are the templated classes used to create iterator objects for WCPtrHashTable<Type> and WCPtrHashSet<Type> hash objects. In the description of each member function, the text Type is used to indicate the hash element type specified as the template parameter.
The WCIterExcept class is a base class of the WCPtrHashTableIter<Type> and WCPtrHashSetIter classes, and provides the exceptions() member function. This member function controls the exceptions that can be thrown by the WCPtrHashTableIter and WCPtrHashSetIter objects. No exceptions are enabled unless they're set by the exceptions() member function.
The following member functions are declared in the public interface:
WCPtrHashSetIter(); WCPtrHashSetIter( const WCPtrHashSet<Type> & ); ~WCPtrHashSetIter(); WCPtrHashTableIter(); WCPtrHashTableIter( const WCPtrHashTable<Type> & ); ~WCPtrHashTableIter(); const WCPtrHashSet<Type> * container() const; const WCPtrHashTable<Type> * container() const; Type * current() const; void reset(); void WCPtrHashSetIter<Type>::reset( WCPtrHashSet<Type> & ); void WCPtrHashTableIter<Type>::reset( WCPtrHashTable<Type> & );
The following member operators are declared in the public interface:
int operator ()(); int operator ++();
create a WCPtrHashSetIter<Type> object
#include <wchiter.h> public: WCPtrHashSetIter(); WCPtrHashSetIter( WCPtrHashSet<Type> & );
The public WCPtrHashSetIter<Type> constructor is available in two forms:
The public WCPtrHashSetIter<Type> constructor creates an initialized WCPtrHashSetIter hash iterator object.
WCPtrHashSetIter<Type>::~WCPtrHashSetIter(), WCPtrHashSetIter<Type>::operator ()(), WCPtrHashSetIter<Type>::operator ++(), WCPtrHashSetIter<Type>::reset(), WCPtrHashTableIter<Type>::WCPtrHashTableIter()
destroy a WCPtrHashSetIter<Type> object
#include <wchiter.h> public: ~WCPtrHashSetIter();
This function is the public WCPtrHashSetIter<Type> destructor for the class. The call to this destructor is inserted implicitly by the compiler at the point where the WCPtrHashSetIter hash iterator object goes out of scope.
The WCPtrHashSetIter hash iterator object is destroyed.
WCPtrHashSetIter<Type>::WCPtrHashSetIter(), WCPtrHashTableIter<Type>::WCPtrHashTableIter()
create a WCPtrHashTableIter<Type> object
#include <wchiter.h> public: WCPtrHashTableIter(); WCPtrHashTableIter( WCPtrHashTable<Type> & );
The WCPtrHashTableIter<Type> constructor is available in two forms:
The public WCPtrHashTableIter<Type> constructor creates an initialized WCPtrHashTableIter hash iterator object.
WCPtrHashSetIter<Type>::WCPtrHashSetIter(), WCPtrHashTableIter<Type>::~WCPtrHashTableIter(), WCPtrHashTableIter<Type>::operator ()(), WCPtrHashTableIter<Type>::operator ++(), WCPtrHashTableIter<Type>::reset()
destroy a WCPtrHashTableIter object
#include <wchiter.h> public: ~WCPtrHashTableIter();
This function is the public WCPtrHashTableIter<Type> destructor for the class. The call to this destructor is inserted implicitly by the compiler at the point where the WCPtrHashSetIter hash iterator object goes out of scope.
The WCPtrHashTableIter hash iterator object is destroyed.
WCPtrHashSetIter<Type>::WCPtrHashSetIter(), WCPtrHashTableIter<Type>::WCPtrHashTableIter()
return a pointer to the hash container object
#include <wchiter.h> public: WCPtrHashTable<Type> * WCPtrHashTableIter<Type>::container() const; WCPtrHashSet<Type> * WCPtrHashSetIter<Type>::container() const;
The container() public member function returns a pointer to the hash container object. If the iterator hasn't been initialized with a hash object, and the undef_iter exception is enabled, the exception is thrown.
A pointer to the hash object associated with the iterator is returned, or NULL(0) if the iterator hasn't been initialized with a hash.
WCIterExcept::undef_iter, WCPtrHashSetIter<Type>::WCPtrHashSetIter(), WCPtrHashSetIter<Type>::reset(), WCPtrHashTableIter<Type>::WCPtrHashTableIter(), WCPtrHashTableIter<Type>::reset()
return a pointer to the current hash element
#include <wchiter.h> public: Type * current();
The current() public member function returns a pointer to the hash item at the current iterator position.
If the iterator isn't associated with a hash, or the iterator position is either before the first element or past the last element in the hash, the current iterator position is undefined. In this case the undef_item exception is thrown, if enabled.
A pointer to the current iterator element is returned. If the current element is undefined, NULL(0) is returned.
WCIterExcept::undef_item, WCPtrHashSetIter<Type>::operator ()(), WCPtrHashSetIter<Type>::operator ++(), WCPtrHashSetIter<Type>::reset(), WCPtrHashTableIter<Type>::operator ()(), WCPtrHashTableIter<Type>::operator ++(), WCPtrHashTableIter<Type>::reset()
the call operator for the class
#include <wchiter.h> public: int operator ()();
The operator ()() public member function is the call operator for the class. The hash element that follows the current item is set to be the new current item. If the previous current item is the last element in the hash, the iterator is positioned after the end of the hash.
The operator ()() public member function has the same semantics as the pre-increment operator, operator ++().
If the iterator is positioned before the first hash element, the current item is set to the first element. If the hash is empty, the iterator is positioned after the end of the hash.
If the iterator isn't associated with a hash, or the iterator position before the increment was past the last element in the hash, the undef_iter exception is thrown, if enabled.
The operator ()() public member function returns a non-zero value if the iterator is positioned on a hash item. It returns 0 when the iterator is incremented past the end of the hash.
WCIterExcept::undef_iter, WCPtrHashSetIter<Type>::operator ++(), WCPtrHashSetIter<Type>::reset(), WCPtrHashTableIter<Type>::operator ++(), WCPtrHashTableIter<Type>::reset()
the pre-increment operator for the class
#include <wchiter.h> public: int operator ++();
The operator ++() public member function is the pre-increment operator for the class. The hash element that follows the current item is set to be the new current item. If the previous current item is the last element in the hash, the iterator is positioned after the end of the hash.
The operator ++() public member function has the same semantics as the call operator, operator ()().
The current item is set to the first hash element if the iterator was positioned before the first element in the hash. If the hash is empty, the iterator is positioned after the end of the hash.
If the iterator isn't associated with a hash or the iterator position before the increment is past the last element in the hash, the undef_iter exception is thrown, if enabled.
The operator ++() public member function returns a non-zero value if the iterator is positioned on a hash item. It returns 0 when the iterator is incremented past the end of the hash.
WCIterExcept::undef_iter, WCPtrHashSetIter<Type>::current(), WCPtrHashSetIter<Type>::operator ()(), WCPtrHashSetIter<Type>::reset(), WCPtrHashTableIter<Type>::current(), WCPtrHashTableIter<Type>::operator ()(), WCPtrHashTableIter<Type>::reset()
position the iterator before the first hash
#include <wchiter.h> public: void reset(); void WCPtrHashTableIter<Type>::reset( WCPtrHashTable<Type> & ); void WCPtrHashSetIter<Type>::reset( WCPtrHashSet<Type> & );
The first form of the reset() public member function resets the iterator to the initial state, positioning the iterator before the first element in the associated hash.
The second and third forms reset the iterator to operate on the specified hash. The iterator is positioned before the first element in the hash.
The iterator is positioned before the first hash element.
WCPtrHashSetIter<Type>::WCPtrHashSetIter(), WCPtrHashSetIter<Type>::container() WCPtrHashTableIter<Type>::WCPtrHashTableIter(), WCPtrHashTableIter<Type>::container()
wchiter.h
The WCValHashTableIter<Type> and WCValHashSetIter<Type> classes are the templated classes used to create iterator objects for WCValHashTable and WCValHashSet hash objects. In the description of each member function, the text Type is used to indicate the hash element type specified as the template parameter.
The WCIterExcept class is a base class of the WCValHashTableIter<Type> and WCValHashSetIter<Type> classes, and provides the exceptions() member function. This member function controls the exceptions that can be thrown by the WCValHashTableIter and WCValHashSetIter objects. No exceptions are enabled unless they are set by the exceptions() member function.
The following member functions are declared in the public interface:
WCValHashSetIter(); WCValHashSetIter( const WCValHashSet<Type> & ); ~WCValHashSetIter(); WCValHashTableIter(); WCValHashTableIter( const WCValHashTable<Type> & ); ~WCValHashTableIter(); const WCValHashSet<Type> * container() const; const WCValHashTable<Type> * container() const; Type current() const; void reset(); void WCValHashSetIter<Type>::reset( WCValHashSet<Type> & ); void WCValHashTableIter<Type>::reset( WCValHashTable<Type> & );
The following member operators are declared in the public interface:
int operator ()(); int operator ++();
create a WCValHashSetIter<Type> object
#include <wchiter.h> public: WCValHashSetIter(); WCValHashSetIter( WCValHashSet<Type> & );
The public WCValHashSetIter<Type> constructor available in two forms:
The public WCValHashSetIter<Type> constructor creates an initialized WCValHashSetIter hash iterator object.
WCValHashSetIter<Type>::~WCValHashSetIter(), WCValHashSetIter<Type>::operator ()(), WCValHashSetIter<Type>::operator ++(), WCValHashSetIter<Type>::reset(), WCValHashTableIter<Type>::WCValHashTableIter()
destroy a WCValHashSetIter<Type> object
#include <wchiter.h> public: ~WCValHashSetIter();
This function is the public WCValHashSetIter<Type> destructor for the class. The call to it is inserted implicitly by the compiler at the point where the WCValHashSetIter hash iterator object goes out of scope.
The WCValHashSetIter hash iterator object is destroyed.
WCValHashSetIter<Type>::WCValHashSetIter(), WCValHashTableIter<Type>::WCValHashTableIter()
create a WCValHashTableIter<Type> object
#include <wchiter.h> public: WCValHashTableIter(); WCValHashTableIter( WCValHashTable<Type> & );
The WCValHashTableIter<Type> constructor is available in two forms:
The public WCValHashTableIter constructor creates an initialized WCValHashTableIter object.
WCValHashSetIter<Type>::WCValHashSetIter(), WCValHashTableIter<Type>::~WCValHashTableIter(), WCValHashTableIter<Type>::operator ()(), WCValHashTableIter<Type>::operator ++(), WCValHashTableIter<Type>::reset()
destroy a WCValHashTableIter object
#include <wchiter.h> public: ~WCValHashTableIter();
This function is the public WCValHashTableIter <Type> destructor for the class. The call to it is inserted implicitly by the compiler at the point where the WCValHashTableIter hash iterator object goes out of scope.
The WCValHashTableIter hash iterator object is destroyed.
WCValHashSetIter<Type>::WCValHashSetIter(), WCValHashTableIter<Type>::WCValHashTableIter()
return a pointer to the hash container object
#include <wchiter.h> public: WCValHashTable<Type> * container() const; WCValHashSet<Type> * container() const;
The container() public member function returns a pointer to the hash container object. If the iterator hasn't been initialized with a hash object, and the undef_iter exception is enabled, the exception is thrown.
A pointer to the hash object associated with the iterator is returned, or NULL(0) if the iterator hasn't been initialized with a hash.
WCIterExcept::undef_iter, WCValHashSetIter<Type>::WCValHashSetIter(), WCValHashSetIter<Type>::reset() WCValHashTableIter<Type>::WCValHashTableIter(), WCValHashTableIter<Type>::reset()
return a pointer to the hash item at the current iterator position
#include <wchiter.h> public: Type current();
The current() public member function returns the value of the hash element at the current iterator position.
If the iterator isn't associated with a hash, or the iterator position is either before the first element or past the last element in the hash, the current iterator position is undefined. In this case the undef_item exception is thrown, if enabled.
The value at the current iterator element is returned. If the current element is undefined, a default initialized object is returned.
WCIterExcept::undef_item, WCValHashSetIter<Type>::operator ()(), WCValHashSetIter<Type>::operator ++(), WCValHashSetIter<Type>::reset() WCValHashTableIter<Type>::operator ()(), WCValHashTableIter<Type>::operator ++(), WCValHashTableIter<Type>::reset()
the call operator for the class
#include <wchiter.h> public: int operator ()();
The operator ()() public member function is the call operator for the class. The hash element that follows the current item is set to be the new current item. If the previous current item was the last element in the hash, the iterator is positioned after the end of the hash.
The operator ()() public member function has the same semantics as the pre-increment operator, operator ++().
If the iterator was positioned before the first hash element, the current item is set to the first element. If the hash is empty, the iterator is positioned after the end of the hash.
If the iterator isn't associated with a hash, or the iterator position before the increment was past the last element in the hash, the undef_iter exception is thrown, if enabled.
The operator ()() public member function returns a non-zero value if the iterator is positioned on a hash item. It returns 0 when the iterator is incremented past the end of the hash.
WCIterExcept::undef_iter, WCValHashSetIter<Type>::operator ++(), WCValHashSetIter<Type>::reset() WCValHashTableIter<Type>::operator ++(), WCValHashTableIter<Type>::reset()
the pre-increment operator for the class
#include <wchiter.h> public: int operator ++();
The operator ++() public member function is the pre-increment operator for the class. The hash element that follows the current item is set to be the new current item. If the previous current item was the last element in the hash, the iterator is positioned after the end of the hash.
The operator ++() public member function has the same semantics as the call operator, operator ()().
The current item is set to the first hash element if the iterator was positioned before the first element in the hash. If the hash is empty, the iterator is positioned after the end of the hash.
If the iterator isn't associated with a hash, or the iterator position before the increment is past the last element in the hash, the undef_iter exception is thrown, if enabled.
The operator ++() public member function returns a non-zero value if the iterator is positioned on a hash item. It returns 0 when the iterator is incremented past the end of the hash.
WCIterExcept::undef_iter, WCValHashSetIter<Type>::current(), WCValHashSetIter<Type>::operator ()(), WCValHashSetIter<Type>::reset() WCValHashTableIter<Type>::current(), WCValHashTableIter<Type>::operator ()(), WCValHashTableIter<Type>::reset()
position the iterator before the first hash element
#include <wchiter.h> public: void reset(); void WCValHashTableIter<Type>::reset( WCValHashTable<Type> & ); void WCValHashSetIter<Type>::reset( WCValHashSet<Type> & );
The first form of the reset() public member function resets the iterator to the initial state, positioning the iterator before the first element in the associated hash.
The second and third forms reset the iterator to operate on the specified hash. The iterator is positioned before the first element in the hash.
The iterator is positioned before the first hash element.
WCValHashSetIter<Type>::WCValHashSetIter(), WCValHashSetIter<Type>::container() WCValHashTableIter<Type>::WCValHashTableIter(), WCValHashTableIter<Type>::container()