aboutsummaryrefslogtreecommitdiff
path: root/src/hash.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2007-11-14 15:22:18 +0000
committerMike Buland <eichlan@xagasoft.com>2007-11-14 15:22:18 +0000
commitc38c6ebe9778244e17544de9067ff35f4ed43906 (patch)
treedea032ee31c428fe9a94f2407a5f42eba206c0a7 /src/hash.h
parent2ab64959d83ed2793d71ab3fa03b8ebdd4925902 (diff)
downloadlibbu++-c38c6ebe9778244e17544de9067ff35f4ed43906.tar.gz
libbu++-c38c6ebe9778244e17544de9067ff35f4ed43906.tar.bz2
libbu++-c38c6ebe9778244e17544de9067ff35f4ed43906.tar.xz
libbu++-c38c6ebe9778244e17544de9067ff35f4ed43906.zip
Thought that a Bu::Hash::getValues() function would be nice to match
Bu::Hash::getKeys().
Diffstat (limited to 'src/hash.h')
-rw-r--r--src/hash.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/hash.h b/src/hash.h
index 04f2657..1b53001 100644
--- a/src/hash.h
+++ b/src/hash.h
@@ -776,6 +776,24 @@ namespace Bu
776 776
777 return lKeys; 777 return lKeys;
778 } 778 }
779
780 Bu::List<value> getValues() const
781 {
782 Bu::List<value> lValues;
783
784 for( uint32_t j = 0; j < nCapacity; j++ )
785 {
786 if( isFilled( j ) )
787 {
788 if( !isDeleted( j ) )
789 {
790 lValues.append( aValues[j] );
791 }
792 }
793 }
794
795 return lValues;
796 }
779 797
780 protected: 798 protected:
781 virtual void onInsert() {} 799 virtual void onInsert() {}