Lumiera  0.pre.03
»edit your freedom«
type-handler.hpp File Reference

Go to the source code of this file.

Description

Helper holding a pair of type-build-up and destruction functors.

Basically these two functors embody all type specific knowledge required to place an object into some buffer space and to clean up later. They may even be used in a more unspecific way, e.g. just to "prepare" a buffer or frame and to "clean up" after usage.

Within the Lumiera Engine, the BufferProvider default implementation utilises instances of TypeHandler to describe specific buffer types capable of managing an attached object, or requiring some other kind of special treatment of the memory area used for the buffer. This BufferDescriptor is embodied into the BufferMetadata::Key and used later on to invoke the contained ctor / dtor functors, passing a concrete buffer (memory area).

See also
buffer-metadata.hpp
buffer-provider.hpp
BufferMetadataKey_test::verifyTypeHandler unit-test

Definition in file type-handler.hpp.

#include "lib/error.hpp"
#include "lib/hash-value.h"
#include <functional>
#include <boost/functional/hash.hpp>

Classes

struct  TypeHandler
 A pair of functors to maintain a datastructure within a buffer. More...
 

Functions

template<class X >
void buildIntoBuffer (void *storageBuffer)
 
template<class X , typename A1 >
void buildIntoBuffer_A1 (void *storageBuffer, A1 arg1)
 
template<typename CTOR , typename DTOR >
HashVal deriveCombinedTypeIdenity ()
 
template<class X >
void destroyInBuffer (void *storageBuffer)
 

Namespaces

 steam
 Steam-Layer implementation namespace root.
 
 steam::engine
 Lumiera's render engine core and operational control.