|
Elm
2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
21 #ifndef ELM_DATA_CUSTOM_H_
22 #define ELM_DATA_CUSTOM_H_
24 #include <elm/alloc/DefaultAllocator.h>
33 template <
class T> T *
alloc()
const {
return static_cast<T *
>(
allocate(
sizeof(T))); }
42 template <
class T> T *
alloc()
const {
return static_cast<T *
>(
allocate(
sizeof(T))); }
49 template <
class T,
class C>
53 inline int doCompare(
const T& x,
const T& y)
const {
return c.doCompare(x, y); }
58 template <
class T,
class H>
63 inline bool isEqual(
const T& key1,
const T& key2)
const {
return h.isEquals(key1, key2); }
68 template <
class T,
class E>
72 inline bool isEqual(
const T& x,
const T& y)
const {
return e.isEquals(x, y); }
void * allocate(t::size size)
Definition: alloc_DefaultAllocator.cpp:131
Printable< T, M > p(const T &data, const M &man)
Definition: Output.h:302
bool isEqual(const T &x, const T &y) const
Definition: custom.h:72
AllocatorDelegate(A &alloc)
Definition: custom.h:39
t::hash computeHash(const T &key) const
Definition: custom.h:62
void free(t::ptr p) const
Definition: custom.h:41
DefaultAllocatorDelegate DefaultAlloc
Definition: custom.h:47
HashDelegate(const H &hash)
Definition: custom.h:61
EquivDelegate(const E &equ)
Definition: custom.h:71
t::ptr allocate(t::size size) const
Definition: custom.h:31
t::ptr allocate(t::size size) const
Definition: custom.h:40
bool isEqual(const T &key1, const T &key2) const
Definition: custom.h:63
void free(t::ptr p) const
Definition: custom.h:32
void free(void *block)
Definition: DefaultAllocator.h:44
uint64 size
Definition: arch.h:35
static DefaultAllocator DEFAULT
Definition: DefaultAllocator.h:41
T * alloc() const
Definition: custom.h:42
ComparatorDelegate(const C &comp)
Definition: custom.h:52
int doCompare(const T &x, const T &y) const
Definition: custom.h:53
t::hash hash(const T &x)
Definition: hash.h:155
T * alloc() const
Definition: custom.h:33
t::intptr hash
Definition: hash.h:34