acme
Foundational cross-platform layer of the ca2 framework
Loading...
Searching...
No Matches
aaa__fifo_map_impl.h
1#pragma once
2
3
4
5//template < class KEY, class ARG_KEY, class PAYLOAD, class ARG_VALUE, class COMPARE >
6//index fifo_map < KEY, ARG_KEY, PAYLOAD, ARG_VALUE, COMPARE >::add_key(ARG_KEY key)
7//{
8//
9// index i;
10//
11// if(!find_key(key, i))
12// {
13//
14// m_ptra.add(aaa_primitive_new pair(this, key));
15//
16// i = m_ptra.get_upper_bound();
17//
18// }
19//
20// return i;
21//
22//}
23//
24//
25//
26//template < class KEY, class ARG_KEY, class PAYLOAD, class ARG_VALUE, class COMPARE >
27//index fifo_map < KEY, ARG_KEY, PAYLOAD, ARG_VALUE, COMPARE >::add_pair(ARG_KEY key, ARG_VALUE newValue)
28//{
29//
30// index i;
31//
32// if(!find_key(key, i))
33// {
34//
35// m_ptra.add(aaa_primitive_new pair(key));
36//
37// i = m_ptra.get_upper_bound();
38//
39// }
40//
41// m_ptra[i]->element2() = newValue;
42//
43// return i;
44//
45//}
46//
47//
48//template < class type_map >
49//fifo_attrib_map < type_map > & fifo_attrib_map < type_map >::operator = (const fifo_attrib_map & attribmap)
50//{
51//
52// if(this != &attribmap)
53// {
54//
55// this->erase_all();
56//
57// typename type_map::pair * ppair;
58//
59// for(::collection::index i = 0; i < attribmap.m_ptra.get_count(); i++)
60// {
61//
62// ppair = aaa_primitive_new typename type_map::pair(this, attribmap.m_ptra[i]->element1());
63//
64// ppair->element2() = attribmap.m_ptra[i]->element2();
65//
66// this->m_ptra.add(ppair);
67//
68// }
69//
70// }
71//
72// return *this;
73//
74//}