diff options
author | Mike Buland <eichlan@xagasoft.com> | 2010-10-15 15:12:31 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2010-10-15 15:12:31 +0000 |
commit | 93c028162318a00b9bd03fc4a48383f830cc529d (patch) | |
tree | 26a2edd7b3e12922d046cfbc41a40fce819c56d9 /src/listhash.h | |
parent | 867dae89929a11a421ec21af71d494ad0ecc1963 (diff) | |
download | libbu++-93c028162318a00b9bd03fc4a48383f830cc529d.tar.gz libbu++-93c028162318a00b9bd03fc4a48383f830cc529d.tar.bz2 libbu++-93c028162318a00b9bd03fc4a48383f830cc529d.tar.xz libbu++-93c028162318a00b9bd03fc4a48383f830cc529d.zip |
RingBuffer is now SharedCore. I think that's all the container classes, there
may be a few other things that should change too, we'll see.
Played with doxygen docs on List, we can actually use @cond to remove things
from the docs, either permenently or conditionally, and so I could trick it into
making all of the sharedcore classes inherit from the same SharedCore in the
docs instead of different ones. Or, just not inherit from SharedCore at all.
What to do...? :-P
I also got rid of ListHash, it wasn't working out yet anyway.
Diffstat (limited to 'src/listhash.h')
-rw-r--r-- | src/listhash.h | 54 |
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 | |||
14 | namespace 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 | ||