forked from HeliumProject/Foundation
-
Notifications
You must be signed in to change notification settings - Fork 1
/
HashSet.inl
70 lines (63 loc) · 2.17 KB
/
HashSet.inl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/// Constructor.
///
/// @param[in] bucketCount Number of buckets to allocate in the hash table.
template< typename Key, typename HashFunction, typename EqualKey, typename Allocator >
Helium::HashSet< Key, HashFunction, EqualKey, Allocator >::HashSet( size_t bucketCount )
: Base( bucketCount, HashFunction(), EqualKey() )
{
}
/// Copy constructor.
///
/// @param[in] rSource Source hash set from which to copy.
template< typename Key, typename HashFunction, typename EqualKey, typename Allocator >
Helium::HashSet< Key, HashFunction, EqualKey, Allocator >::HashSet( const HashSet& rSource )
: Base( rSource )
{
}
/// Copy constructor.
///
/// @param[in] rSource Source hash set from which to copy.
template< typename Key, typename HashFunction, typename EqualKey, typename Allocator >
template< typename OtherAllocator >
Helium::HashSet< Key, HashFunction, EqualKey, Allocator >::HashSet(
const HashSet< Key, HashFunction, EqualKey, OtherAllocator >& rSource )
: Base( rSource )
{
}
/// Destructor.
template< typename Key, typename HashFunction, typename EqualKey, typename Allocator >
Helium::HashSet< Key, HashFunction, EqualKey, Allocator >::~HashSet()
{
}
/// Assignment operator.
///
/// @param[in] rSource Source hash set from which to copy.
///
/// @return Reference to this object.
template< typename Key, typename HashFunction, typename EqualKey, typename Allocator >
Helium::HashSet< Key, HashFunction, EqualKey, Allocator >&
Helium::HashSet< Key, HashFunction, EqualKey, Allocator >::operator=( const HashSet& rSource )
{
if( this != &rSource )
{
Base::operator=( rSource );
}
return *this;
}
/// Assignment operator.
///
/// @param[in] rSource Source hash set from which to copy.
///
/// @return Reference to this object.
template< typename Key, typename HashFunction, typename EqualKey, typename Allocator >
template< typename OtherAllocator >
Helium::HashSet< Key, HashFunction, EqualKey, Allocator >&
Helium::HashSet< Key, HashFunction, EqualKey, Allocator >::operator=(
const HashSet< Key, HashFunction, EqualKey, OtherAllocator >& rSource )
{
if( this != &rSource )
{
Base::operator=( rSource );
}
return *this;
}