Elm  2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
EquivManager< T, E, A > Class Template Reference

#include <elm/data/Manager.h>

Public Types

typedef E equiv_t
 
typedef A alloc_t
 

Public Member Functions

 EquivManager (E &e=single< E >(), A &a=A::DEFAULT)
 
bool equals (const T &v1, const T &v2) const
 
voidallocate (t::size size) const
 
void free (t::ptr p) const
 

Static Public Member Functions

static EquivManager< T, E, A > & def ()
 

Public Attributes

E & eq
 
A & alloc
 

Detailed Description

template<class T, class E = Equiv<T>, class A = DefaultAllocator>
class elm::EquivManager< T, E, A >

This class is used to control the work of container classes (see Data Structures) supporting lookup based on Equiv test. It embeds two control objects:

  • eq of type E – used to test for equality,
  • alloc – for memory allocation.

It is easily customized by changing the type parameters and by passing objects to the constructor.

Parameters
TType of managed data.
EEquivalence class (default to Equiv<T>).
AAllocation class (default to DefaultAllocator).

Member Typedef Documentation

◆ alloc_t

typedef A alloc_t

◆ equiv_t

typedef E equiv_t

Constructor & Destructor Documentation

◆ EquivManager()

EquivManager ( E &  e = single<E>(),
A &  a = A::DEFAULT 
)
inline

Member Function Documentation

◆ allocate()

void* allocate ( t::size  size) const
inline

◆ def()

static EquivManager<T, E, A>& def ( )
inlinestatic

◆ equals()

bool equals ( const T &  v1,
const T &  v2 
) const
inline

◆ free()

void free ( t::ptr  p) const
inline

Member Data Documentation

◆ alloc

◆ eq

E& eq

The documentation for this class was generated from the following file: