summaryrefslogtreecommitdiff
path: root/sql/hash_filo.h
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-03-19 09:57:09 +0100
committerSergei Golubchik <sergii@pisem.net>2014-03-19 09:57:09 +0100
commit16d8367aae66039476b834a6926bdd251ac100ae (patch)
tree476310f3017c1d9e98c4fdab805a347073c4f388 /sql/hash_filo.h
parent94c97e5b68c83b4ade57a8739c1ba91a6e844279 (diff)
downloadmariadb-git-16d8367aae66039476b834a6926bdd251ac100ae.tar.gz
List<>-style template wrapper over hash_filo
Diffstat (limited to 'sql/hash_filo.h')
-rw-r--r--sql/hash_filo.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/sql/hash_filo.h b/sql/hash_filo.h
index abba4824c9e..4c8c7575efc 100644
--- a/sql/hash_filo.h
+++ b/sql/hash_filo.h
@@ -199,4 +199,17 @@ public:
}
};
+template <class T> class Hash_filo: public hash_filo
+{
+public:
+ Hash_filo(uint size_arg, uint key_offset_arg, uint key_length_arg,
+ my_hash_get_key get_key_arg, my_hash_free_key free_element_arg,
+ CHARSET_INFO *hash_charset_arg) :
+ hash_filo(size_arg, key_offset_arg, key_length_arg,
+ get_key_arg, free_element_arg, hash_charset_arg) {}
+ T* first() { return (T*)hash_filo::first(); }
+ T* last() { return (T*)hash_filo::last(); }
+ T* search(uchar* key, size_t len) { return (T*)hash_filo::search(key, len); }
+};
+
#endif