STXXL
1.4-dev
|
Definition at line 36 of file iterator.h.
Public Types | |
typedef hash_map_type::bid_iterator_type | bid_iterator_type |
typedef hash_map_type::bucket_type | bucket_type |
typedef hash_map_type::const_reference | const_reference |
typedef hash_map_type::external_size_type | external_size_type |
typedef HashMap | hash_map_type |
typedef hash_map_type::internal_size_type | internal_size_type |
typedef std::forward_iterator_tag | iterator_category |
typedef hash_map_type::key_type | key_type |
typedef hash_map_type::node_type | node_type |
typedef buffered_reader < typename hash_map_type::block_cache_type, bid_iterator_type > | reader_type |
typedef hash_map_type::reference | reference |
typedef hash_map_type::source_type | source_type |
typedef hash_map_type::value_type | value_type |
Public Member Functions | |
hash_map_iterator_base (HashMap *map, internal_size_type i_bucket, node_type *node, external_size_type i_external, source_type source, bool ext_valid, key_type key) | |
Construct a new iterator. More... | |
hash_map_iterator_base (hash_map_type *map) | |
Construct a new iterator pointing to the end of the given hash-map. More... | |
hash_map_iterator_base (const hash_map_iterator_base &obj) | |
Construct a new iterator from an existing one. More... | |
virtual | ~hash_map_iterator_base () |
void | find_next (bool start_prefetching=false) |
Advance iterator to the next value The next value is determined in the following way. More... | |
bool | operator!= (const hash_map_iterator_base &obj) const |
hash_map_iterator_base & | operator= (const hash_map_iterator_base &obj) |
Assignment operator. More... | |
bool | operator== (const hash_map_iterator_base &obj) const |
Two iterators are equal if the point to the same value in the same map. More... | |
Protected Member Functions | |
void | init_reader () |
Initialize reader object to scan external values. More... | |
void | reset_reader () |
Reset reader-object. More... | |
Protected Attributes | |
bool | end_ |
true if iterator equals end() More... | |
bool | ext_valid_ |
true if i_external points to the current or next external value More... | |
internal_size_type | i_bucket_ |
index of current bucket More... | |
external_size_type | i_external_ |
position of current (source=external) or next (source=internal) external value (see _ext_valid) More... | |
key_type | key_ |
key of current value More... | |
HashMap * | map_ |
node_type * | node_ |
current (source=internal) or old (src=external) internal node More... | |
bool | prefetch_ |
true if prefetching enabled; false by default, will be set to true when incrementing (see find_next()) More... | |
reader_type * | reader_ |
source_type | source_ |
source of current value: external or internal More... | |
Friends | |
void | HashMap::erase (hash_map_const_iterator< HashMap > it) |
typedef hash_map_type::bid_iterator_type stxxl::hash_map::hash_map_iterator_base< HashMap >::bid_iterator_type |
Definition at line 51 of file iterator.h.
typedef hash_map_type::bucket_type stxxl::hash_map::hash_map_iterator_base< HashMap >::bucket_type |
Definition at line 50 of file iterator.h.
typedef hash_map_type::const_reference stxxl::hash_map::hash_map_iterator_base< HashMap >::const_reference |
Definition at line 48 of file iterator.h.
typedef hash_map_type::external_size_type stxxl::hash_map::hash_map_iterator_base< HashMap >::external_size_type |
Definition at line 44 of file iterator.h.
typedef HashMap stxxl::hash_map::hash_map_iterator_base< HashMap >::hash_map_type |
Definition at line 42 of file iterator.h.
typedef hash_map_type::internal_size_type stxxl::hash_map::hash_map_iterator_base< HashMap >::internal_size_type |
Definition at line 43 of file iterator.h.
typedef std::forward_iterator_tag stxxl::hash_map::hash_map_iterator_base< HashMap >::iterator_category |
Definition at line 56 of file iterator.h.
typedef hash_map_type::key_type stxxl::hash_map::hash_map_iterator_base< HashMap >::key_type |
Definition at line 46 of file iterator.h.
typedef hash_map_type::node_type stxxl::hash_map::hash_map_iterator_base< HashMap >::node_type |
Definition at line 49 of file iterator.h.
typedef buffered_reader<typename hash_map_type::block_cache_type, bid_iterator_type> stxxl::hash_map::hash_map_iterator_base< HashMap >::reader_type |
Definition at line 54 of file iterator.h.
typedef hash_map_type::reference stxxl::hash_map::hash_map_iterator_base< HashMap >::reference |
Definition at line 47 of file iterator.h.
typedef hash_map_type::source_type stxxl::hash_map::hash_map_iterator_base< HashMap >::source_type |
Definition at line 52 of file iterator.h.
typedef hash_map_type::value_type stxxl::hash_map::hash_map_iterator_base< HashMap >::value_type |
Definition at line 45 of file iterator.h.
|
inline |
|
inline |
Construct a new iterator pointing to the end of the given hash-map.
Definition at line 111 of file iterator.h.
|
inline |
Construct a new iterator from an existing one.
Definition at line 124 of file iterator.h.
References STXXL_VERBOSE3.
|
inlinevirtual |
Definition at line 371 of file iterator.h.
References STXXL_VERBOSE3.
|
inline |
Advance iterator to the next value The next value is determined in the following way.
Definition at line 251 of file iterator.h.
|
inlineprotected |
Initialize reader object to scan external values.
Definition at line 194 of file iterator.h.
References stxxl::hash_map::bucket< NodeType >::i_block_.
|
inline |
Definition at line 187 of file iterator.h.
References operator==().
|
inline |
Assignment operator.
Definition at line 143 of file iterator.h.
References stxxl::hash_map::hash_map_iterator_base< HashMap >::end_, stxxl::hash_map::hash_map_iterator_base< HashMap >::ext_valid_, stxxl::hash_map::hash_map_iterator_base< HashMap >::i_bucket_, stxxl::hash_map::hash_map_iterator_base< HashMap >::i_external_, stxxl::hash_map::hash_map_iterator_base< HashMap >::key_, stxxl::hash_map::hash_map_iterator_base< HashMap >::map_, stxxl::hash_map::hash_map_iterator_base< HashMap >::node_, stxxl::hash_map::hash_map_iterator_base< HashMap >::prefetch_, stxxl::hash_map::hash_map_iterator_base< HashMap >::source_, and STXXL_VERBOSE3.
|
inline |
Two iterators are equal if the point to the same value in the same map.
Definition at line 171 of file iterator.h.
References stxxl::hash_map::hash_map_iterator_base< HashMap >::end_, stxxl::hash_map::hash_map_iterator_base< HashMap >::i_bucket_, stxxl::hash_map::hash_map_iterator_base< HashMap >::i_external_, stxxl::hash_map::hash_map_iterator_base< HashMap >::map_, stxxl::hash_map::hash_map_iterator_base< HashMap >::node_, and stxxl::hash_map::hash_map_iterator_base< HashMap >::source_.
|
inlineprotected |
Reset reader-object.
Definition at line 237 of file iterator.h.
|
friend |
|
protected |
true if iterator equals end()
Definition at line 88 of file iterator.h.
Referenced by stxxl::hash_map::hash_map_iterator_base< HashMap >::operator=(), and stxxl::hash_map::hash_map_iterator_base< HashMap >::operator==().
|
protected |
true if i_external points to the current or next external value
example: iterator was created by hash_map::find() and the value was found in internal memory
=> iterator pointing to internal node is created and location of next external value is unknown (_ext_valid == false)
=> when incrementing the iterator the external values will be scanned from the beginning of the bucket to find the valid external index
Definition at line 86 of file iterator.h.
Referenced by stxxl::hash_map::hash_map_iterator_base< HashMap >::operator=().
|
protected |
index of current bucket
Definition at line 65 of file iterator.h.
Referenced by stxxl::hash_map::hash_map< KeyType, MappedType, HashType, CompareType, SubBlockSize, SubBlocksPerBlock, AllocType >::erase(), stxxl::hash_map::hash_map_iterator_base< HashMap >::operator=(), and stxxl::hash_map::hash_map_iterator_base< HashMap >::operator==().
|
protected |
position of current (source=external) or next (source=internal) external value (see _ext_valid)
Definition at line 72 of file iterator.h.
Referenced by stxxl::hash_map::hash_map_iterator_base< HashMap >::operator=(), and stxxl::hash_map::hash_map_iterator_base< HashMap >::operator==().
|
protected |
key of current value
Definition at line 74 of file iterator.h.
Referenced by stxxl::hash_map::hash_map< KeyType, MappedType, HashType, CompareType, SubBlockSize, SubBlocksPerBlock, AllocType >::erase(), and stxxl::hash_map::hash_map_iterator_base< HashMap >::operator=().
|
protected |
Definition at line 59 of file iterator.h.
Referenced by stxxl::hash_map::hash_map_iterator_base< HashMap >::operator=(), and stxxl::hash_map::hash_map_iterator_base< HashMap >::operator==().
|
protected |
current (source=internal) or old (src=external) internal node
Definition at line 69 of file iterator.h.
Referenced by stxxl::hash_map::hash_map< KeyType, MappedType, HashType, CompareType, SubBlockSize, SubBlocksPerBlock, AllocType >::erase(), stxxl::hash_map::hash_map_iterator_base< HashMap >::operator=(), and stxxl::hash_map::hash_map_iterator_base< HashMap >::operator==().
|
protected |
true if prefetching enabled; false by default, will be set to true when incrementing (see find_next())
Definition at line 63 of file iterator.h.
Referenced by stxxl::hash_map::hash_map_iterator_base< HashMap >::operator=().
|
protected |
Definition at line 60 of file iterator.h.
|
protected |
source of current value: external or internal
Definition at line 67 of file iterator.h.
Referenced by stxxl::hash_map::hash_map< KeyType, MappedType, HashType, CompareType, SubBlockSize, SubBlocksPerBlock, AllocType >::erase(), stxxl::hash_map::hash_map_iterator_base< HashMap >::operator=(), and stxxl::hash_map::hash_map_iterator_base< HashMap >::operator==().