![]() |
Elm
2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
#include <elm/data/Manager.h>
Public Types | |
| typedef T | t |
| typedef E | equiv_t |
| typedef A | alloc_t |
Public Member Functions | |
| CompareManager (const C &c=single< C >(), const E &e=single< E >(), A &a=DefaultAllocator::DEFAULT) | |
| int | compare (const T &v1, const T &v2) const |
| bool | equals (const T &v1, const T &v2) const |
| void * | allocate (elm::t::size size) const |
| void | free (elm::t::ptr p) const |
Static Public Member Functions | |
| static CompareManager< T, C, E, A > & | def () |
Public Attributes | |
| const C & | cmp |
| const E & | eq |
| A & | alloc |
This class is used to control the work of container classes (see Data Structures) supporting lookup and sorting based on comparisons. It embeds two control objects:
It is easily customized by changing the type parameters and by passing objects to the constructor.
| T | Type of managed data. |
| C | Comparator class (default to Comparator<T>). |
| A | Allocation class (default to DefaultAllocator). |
| typedef A alloc_t |
| typedef E equiv_t |
| typedef T t |
|
inline |
|
inline |
References CompareManager< T, C, E, A >::alloc.
|
inline |
References CompareManager< T, C, E, A >::cmp.
|
inlinestatic |
|
inline |
References CompareManager< T, C, E, A >::eq.
|
inline |
References CompareManager< T, C, E, A >::alloc, and elm::io::p().
| A& alloc |
Referenced by CompareManager< T, C, E, A >::allocate(), and CompareManager< T, C, E, A >::free().
| const C& cmp |
Referenced by CompareManager< T, C, E, A >::compare().
| const E& eq |
Referenced by CompareManager< T, C, E, A >::equals().