From 4539b8e7c51fb46d419fc80b48469cee91d4e149 Mon Sep 17 00:00:00 2001 From: Eliot Horowitz Date: Fri, 15 Jan 2010 16:11:00 -0500 Subject: [PATCH] iterall for HashTable --- util/hashtab.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/util/hashtab.h b/util/hashtab.h index defc2c35bd9..56106fb712e 100644 --- a/util/hashtab.h +++ b/util/hashtab.h @@ -141,7 +141,17 @@ namespace mongo { nodes[i].value = value; return true; } - + + typedef void (*IteratorCallback)( const Key& k , Type& v ); + + void iterall( IteratorCallback callback ){ + for ( int i=0; i