Lumiera
0.pre.03
»edit your freedom«
|
#include "steam/engine/type-handler.hpp"
A pair of functors to maintain a datastructure within a buffer.
TypeHandler describes how to outfit the buffer in a specific way. Special convenience builder function(s) are provided to create a TypeHandler performing placement-new into a buffer given on invocation.
Definition at line 104 of file type-handler.hpp.
Public Types | |
typedef function< void(void *)> | DoInBuffer |
Public Member Functions | |
TypeHandler () | |
build an invalid NIL TypeHandler | |
template<typename CTOR , typename DTOR > | |
TypeHandler (CTOR ctor, DTOR dtor) | |
build a TypeHandler binding to arbitrary constructor and destructor functions. More... | |
bool | isValid () const |
Static Public Member Functions | |
template<class X , typename... ARGS> | |
static TypeHandler | create (ARGS &&...args) |
builder function defining a TypeHandler to place an object into the buffer, possibly with given ctor arguments. More... | |
Static Public Attributes | |
static const TypeHandler | RAW {} |
Marker for the default case: raw buffer without type handling. | |
Public Attributes | |
DoInBuffer | createAttached |
DoInBuffer | destroyAttached |
HashVal | identity |
Friends | |
HashVal | hash_value (TypeHandler const &handler) |
bool | operator!= (TypeHandler const &left, TypeHandler const &right) |
bool | operator== (TypeHandler const &left, TypeHandler const &right) |
|
inline |
build a TypeHandler binding to arbitrary constructor and destructor functions.
On invocation, these functions get a void* to the buffer.
Definition at line 130 of file type-handler.hpp.
|
inlinestatic |
builder function defining a TypeHandler to place an object into the buffer, possibly with given ctor arguments.
Definition at line 141 of file type-handler.hpp.