summaryrefslogtreecommitdiff
path: root/src/listhash.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/listhash.h')
-rw-r--r--src/listhash.h54
1 files changed, 0 insertions, 54 deletions
diff --git a/src/listhash.h b/src/listhash.h
deleted file mode 100644
index e5ec4ee..0000000
--- a/src/listhash.h
+++ /dev/null
@@ -1,54 +0,0 @@
1/*
2 * Copyright (C) 2007-2010 Xagasoft, All rights reserved.
3 *
4 * This file is part of the libbu++ library and is released under the
5 * terms of the license contained in the file LICENSE.
6 */
7
8#ifndef BU_LIST_HASH_H
9#define BU_LIST_HASH_H
10
11#include "bu/hash.h"
12#include "bu/list.h"
13
14namespace Bu
15{
16 template<typename key, typename value, typename sizecalc = __calcNextTSize_fast, typename keyalloc = std::allocator<key>, typename valuealloc = std::allocator<Bu::List<value> >, typename challoc = std::allocator<uint32_t> >
17 class ListHash : public Hash<key, Bu::List<value>, sizecalc, keyalloc, valuealloc, challoc>
18 {
19 typedef Hash<key, Bu::List<value>, sizecalc, keyalloc, valuealloc, challoc> ParentType;
20 public:
21 ListHash()
22 {
23 }
24
25 ListHash( const ListHash &src ) :
26 ParentType( src )
27 {
28 }
29
30 virtual ~ListHash()
31 {
32 }
33
34 ListHash &operator=( const ListHash &src )
35 {
36 *dynamic_cast<ParentType *>(this) =
37 dynamic_cast<ParentType &>(src);
38 }
39
40 virtual void insert( const key &k, const value &v )
41 {
42 if( !has( k ) )
43 {
44 ParentType::insert( k, List<value>() );
45 }
46 get( k ).append( v );
47 }
48
49 private:
50 };
51
52};
53
54#endif