]> www.ginac.de Git - cln.git/blob - src/integer/hash/cl_I_hash_gcobject.cc
Finalize CLN 1.3.7 release.
[cln.git] / src / integer / hash / cl_I_hash_gcobject.cc
1 // class cl_ht_from_integer_to_gcobject.
2
3 // General includes.
4 #include "base/cl_sysdep.h"
5
6 // Specification.
7 #include "integer/hash/cl_I_hash_gcobject.h"
8
9
10 // Implementation.
11
12 #include "integer/cl_I.h"
13 #include "base/hash/cl_hash1.h"
14
15 namespace cln {
16
17 static void cl_hashtable_from_integer_to_gcobject_destructor (cl_heap* pointer)
18 {
19         (*(cl_heap_hashtable_from_integer_to_gcobject*)pointer).~cl_heap_hashtable_from_integer_to_gcobject();
20 }
21
22 cl_class cl_class_hashtable_from_integer_to_gcobject = {
23         cl_hashtable_from_integer_to_gcobject_destructor,
24         0
25 };
26
27 // These are not inline, because they tend to duplicate a lot of template code.
28
29 cl_ht_from_integer_to_gcobject::cl_ht_from_integer_to_gcobject ()
30 {
31         var cl_heap_hashtable_from_integer_to_gcobject* ht = new cl_heap_hashtable_from_integer_to_gcobject ();
32         ht->refcount = 1;
33         ht->type = &cl_class_hashtable_from_integer_to_gcobject;
34         pointer = ht;
35 }
36
37 cl_gcobject * cl_ht_from_integer_to_gcobject::get (const cl_I& x) const
38 {
39         return ((cl_heap_hashtable_from_integer_to_gcobject*)pointer)->get(x);
40 }
41
42 void cl_ht_from_integer_to_gcobject::put (const cl_I& x, const cl_gcobject& y) const
43 {
44         ((cl_heap_hashtable_from_integer_to_gcobject*)pointer)->put(x,y);
45 }
46
47 }  // namespace cln