summaryrefslogtreecommitdiff
path: root/src/hash.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2007-03-20 23:13:52 +0000
committerMike Buland <eichlan@xagasoft.com>2007-03-20 23:13:52 +0000
commit50dd460655e0ab563de388bad37d3f678ffbb3b4 (patch)
treefe79c205433e2de48095d81e2a03fb5f9ffca078 /src/hash.h
parent2b8255fabce194b35f7b2a350fd08f43d1e698a6 (diff)
downloadlibbu++-50dd460655e0ab563de388bad37d3f678ffbb3b4.tar.gz
libbu++-50dd460655e0ab563de388bad37d3f678ffbb3b4.tar.bz2
libbu++-50dd460655e0ab563de388bad37d3f678ffbb3b4.tar.xz
libbu++-50dd460655e0ab563de388bad37d3f678ffbb3b4.zip
Minor updates to the Hash and FString, Hash got a getKeys function, and FString
got the more normal getStr and getSize functions.
Diffstat (limited to 'src/hash.h')
-rw-r--r--src/hash.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/hash.h b/src/hash.h
index c37cfba..81b472f 100644
--- a/src/hash.h
+++ b/src/hash.h
@@ -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
453protected: 472protected:
454 virtual void onInsert() {} 473 virtual void onInsert() {}
455 virtual void onUpdate() {} 474 virtual void onUpdate() {}