#include <ord_hash_set.h>
Definition at line 19 of file ord_hash_set.h.
re2c::ord_hash_set_t::ord_hash_set_t |
( |
| ) |
|
re2c::ord_hash_set_t::~ord_hash_set_t |
( |
| ) |
|
Definition at line 74 of file ord_hash_set.h.
76 std::for_each(elems.begin(), elems.end(), free);
template<typename data_t >
size_t re2c::ord_hash_set_t::deref |
( |
size_t |
i, |
|
|
data_t *& |
data |
|
) |
| |
Definition at line 106 of file ord_hash_set.h.
108 elem_t *e = elems[i];
109 data =
reinterpret_cast<data_t*
>(e->data);
110 return e->size /
sizeof(data_t);
size_t re2c::ord_hash_set_t::insert |
( |
const void * |
data, |
|
|
size_t |
size |
|
) |
| |
Definition at line 84 of file ord_hash_set.h.
86 const hash_t h = hash(data,
size);
88 std::map<hash_t, elem_t*>::const_iterator i = lookup.find(h);
89 if (i != lookup.end())
91 for (elem_t *e = i->second; e; e = e->next)
94 && memcmp(e->data, data,
size) == 0)
101 const size_t index = elems.size();
102 elems.push_back(lookup[h] = make_elem(lookup[h], index,
size, data));
size_t re2c::ord_hash_set_t::size |
( |
| ) |
const |
The documentation for this class was generated from the following file: