acme
Foundational cross-platform layer of the ca2 framework
Loading...
Searching...
No Matches
aaa__set_impl.h
1#pragma once
2
3
4template < typename KEY, typename ARG_KEY, typename PAYLOAD >
5void set < KEY, ARG_KEY, PAYLOAD >::InitHashTable(
6 ::u32 nHashSize, bool bAllocNow)
7 //
8 // Used to force allocation of a hash table or to override the default
9 // hash table i32_size of (which is fairly small)
10{
11
12 ASSERT_OK(this);
13 ASSERT(this->m_nCount == 0);
14 ASSERT(nHashSize > 0);
15
16 this->m_hashtable.InitHashTable(nHashSize,bAllocNow);
17
18}
19
20
21template < typename KEY, typename ARG_KEY, typename PAYLOAD >
22void set < KEY, ARG_KEY, PAYLOAD >::dump(dump_context& dumpcontext) const
23{
24
25 ::matter::dump(dumpcontext);
26
27 //dumpcontext << "with " << this->m_nCount << " elements";
28 //if (dumpcontext.GetDepth() > 0)
29 //{
30 // // Dump in format "[key] -> value"
31
32 // const association* passociation = get_start();
33 // while (passociation != nullptr)
34 // {
35 // passociation = get_next(passociation);
36 // dumpcontext << "\n\t[";
37 // dump_elements<KEY>(dumpcontext, &passociation->key(), 1);
38 // }
39 //}
40
41 //dumpcontext << "\n";
42}
43
44
45