diff options
author | Mike Buland <eichlan@xagasoft.com> | 2007-11-14 15:22:18 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2007-11-14 15:22:18 +0000 |
commit | c38c6ebe9778244e17544de9067ff35f4ed43906 (patch) | |
tree | dea032ee31c428fe9a94f2407a5f42eba206c0a7 /src/hash.h | |
parent | 2ab64959d83ed2793d71ab3fa03b8ebdd4925902 (diff) | |
download | libbu++-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.h | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -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() {} |