diff options
Diffstat (limited to 'src/hash.h')
-rw-r--r-- | src/hash.h | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -5,6 +5,7 @@ | |||
5 | #include <string.h> | 5 | #include <string.h> |
6 | #include <memory> | 6 | #include <memory> |
7 | #include <iostream> | 7 | #include <iostream> |
8 | #include <list> | ||
8 | #include "exceptionbase.h" | 9 | #include "exceptionbase.h" |
9 | #include "hashable.h" | 10 | #include "hashable.h" |
10 | #include "serializable.h" | 11 | #include "serializable.h" |
@@ -450,6 +451,24 @@ public: | |||
450 | return iterator( *this, true ); | 451 | return iterator( *this, true ); |
451 | } | 452 | } |
452 | 453 | ||
454 | std::list<key> getKeys() | ||
455 | { | ||
456 | std::list<key> lKeys; | ||
457 | |||
458 | for( uint32_t j = 0; j < nCapacity; j++ ) | ||
459 | { | ||
460 | if( isFilled( j ) ) | ||
461 | { | ||
462 | if( !isDeleted( j ) ) | ||
463 | { | ||
464 | lKeys.push_back( aKeys[j] ); | ||
465 | } | ||
466 | } | ||
467 | } | ||
468 | |||
469 | return lKeys; | ||
470 | } | ||
471 | |||
453 | protected: | 472 | protected: |
454 | virtual void onInsert() {} | 473 | virtual void onInsert() {} |
455 | virtual void onUpdate() {} | 474 | virtual void onUpdate() {} |