Crystal Space: csHash< T, K, ArrayMemoryAlloc >::GlobalIterator Class Reference (Crystal Space Public API Reference)

| ## Public API Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# csHash< T, K, ArrayMemoryAlloc >::GlobalIterator Class Reference

An iterator class for the hash. More...

`#include <csutil/hash.h>`

List of all members.

## Public Member Functions
void | Advance ()
| Advance the iterator of one step.
| GlobalIterator (const GlobalIterator &o)
| Copy constructor.
bool | HasNext () const
| Returns a boolean indicating whether or not the hash has more elements.
T & | Next (K &key)
| Get the next element's value and key.
T & | Next ()
| Get the next element's value.
T & | NextNoAdvance (K &key)
| Get the next element's value and key, don't move the iterator.
T & | NextNoAdvance ()
| Get the next element's value, don't move the iterator.
GlobalIterator & | operator= (const GlobalIterator &o)
| Assignment operator.
void | Reset ()
| Move the iterator back to the first element.
## Protected Member Functions
| GlobalIterator (csHash< T, K > *hash0)
## Friends
class | csHash< T, K >

## Detailed Description

### template<class T, class K = unsigned int, class ArrayMemoryAlloc = CS::Memory::AllocatorMalloc>
class csHash< T, K, ArrayMemoryAlloc >::GlobalIterator

An iterator class for the hash.

Definition at line 655 of file hash.h.

## Constructor & Destructor Documentation

template<class T, class K = unsigned int, class ArrayMemoryAlloc = CS::Memory::AllocatorMalloc>

csHash< T, K, ArrayMemoryAlloc >::GlobalIterator::GlobalIterator | ( | const GlobalIterator & | o | ) | `[inline]`

Copy constructor.

Definition at line 695 of file hash.h.

## Member Function Documentation

template<class T, class K = unsigned int, class ArrayMemoryAlloc = CS::Memory::AllocatorMalloc>

void csHash< T, K, ArrayMemoryAlloc >::GlobalIterator::Advance | ( |  | ) | `[inline]`

Advance the iterator of one step.

Definition at line 719 of file hash.h.

Referenced by csHash< T, K, ArrayMemoryAlloc >::GlobalIterator::Next().

template<class T, class K = unsigned int, class ArrayMemoryAlloc = CS::Memory::AllocatorMalloc>

bool csHash< T, K, ArrayMemoryAlloc >::GlobalIterator::HasNext | ( |  | ) | const`[inline]`

Returns a boolean indicating whether or not the hash has more elements.

Definition at line 712 of file hash.h.

template<class T, class K = unsigned int, class ArrayMemoryAlloc = CS::Memory::AllocatorMalloc>

T& csHash< T, K, ArrayMemoryAlloc >::GlobalIterator::Next | ( | K & | key | ) | `[inline]`

Get the next element's value and key.

Definition at line 747 of file hash.h.

References csHash< T, K, ArrayMemoryAlloc >::GlobalIterator::Next().

template<class T, class K = unsigned int, class ArrayMemoryAlloc = CS::Memory::AllocatorMalloc>

T& csHash< T, K, ArrayMemoryAlloc >::GlobalIterator::Next | ( |  | ) | `[inline]`

Get the next element's value.

Definition at line 732 of file hash.h.

References csHash< T, K, ArrayMemoryAlloc >::GlobalIterator::Advance(), and csHash< T, K, ArrayMemoryAlloc >::GlobalIterator::NextNoAdvance().

Referenced by csHash< T, K, ArrayMemoryAlloc >::GlobalIterator::Next().

template<class T, class K = unsigned int, class ArrayMemoryAlloc = CS::Memory::AllocatorMalloc>

T& csHash< T, K, ArrayMemoryAlloc >::GlobalIterator::NextNoAdvance | ( | K & | key | ) | `[inline]`

Get the next element's value and key, don't move the iterator.

Definition at line 740 of file hash.h.

References csHash< T, K, ArrayMemoryAlloc >::GlobalIterator::NextNoAdvance().

template<class T, class K = unsigned int, class ArrayMemoryAlloc = CS::Memory::AllocatorMalloc>

T& csHash< T, K, ArrayMemoryAlloc >::GlobalIterator::NextNoAdvance | ( |  | ) | `[inline]`

Get the next element's value, don't move the iterator.

Definition at line 726 of file hash.h.

Referenced by csHash< T, K, ArrayMemoryAlloc >::GlobalIterator::Next(), and csHash< T, K, ArrayMemoryAlloc >::GlobalIterator::NextNoAdvance().

template<class T, class K = unsigned int, class ArrayMemoryAlloc = CS::Memory::AllocatorMalloc>

GlobalIterator& csHash< T, K, ArrayMemoryAlloc >::GlobalIterator::operator= | ( | const GlobalIterator & | o | ) | `[inline]`

Assignment operator.

Definition at line 702 of file hash.h.

References csHash< T, K, ArrayMemoryAlloc >::GlobalIterator::bucket, csHash< T, K, ArrayMemoryAlloc >::GlobalIterator::element, csHash< T, K, ArrayMemoryAlloc >::GlobalIterator::hash, and csHash< T, K, ArrayMemoryAlloc >::GlobalIterator::size.

template<class T, class K = unsigned int, class ArrayMemoryAlloc = CS::Memory::AllocatorMalloc>

void csHash< T, K, ArrayMemoryAlloc >::GlobalIterator::Reset | ( |  | ) | `[inline]`

Move the iterator back to the first element.

Definition at line 754 of file hash.h.

The documentation for this class was generated from the following file:

- csutil/hash.h