32 #ifndef STEAM_ENGINE_BUFFR_PROVIDER_H 33 #define STEAM_ENGINE_BUFFR_PROVIDER_H 53 using std::unique_ptr;
78 unique_ptr<BufferMetadata> meta_;
88 virtual uint prepareBuffers (uint count,
HashVal typeID) =0;
105 template<
typename BU,
typename...ARGS>
118 template<
typename BU,
typename...ARGS>
126 size_t getBufferSize (
HashVal typeID)
const;
131 bool was_created_by_this_provider (
BuffDescr const&)
const;
146 template<
typename BU,
typename...ARGS>
150 BuffDescr attach_object_automatically = getDescriptor<BU> (forward<ARGS> (args)...);
151 return lockBuffer (attach_object_automatically);
159 template<
typename BU,
typename...ARGS>
163 return getDescriptorFor (
sizeof(BU), TypeHandler::create<BU> (forward<ARGS> (args)...));
bool verifyValidity(BuffDescr const &) const
uint announce(uint count, BuffDescr const &)
BufferProvider API: declare in advance the need for working buffers.
void attachTypeHandler(BuffHandle const &target, BuffDescr const &reference)
allow for attaching and owing an object within an already created buffer
void releaseBuffer(BuffHandle const &)
BufferProvider API: declare done and detach.
Any copy and copy construction prohibited.
A marker data type used in metadata / buffer management of the render engine.
inline string literal This is a marker type to indicate that
void emergencyCleanup(BuffHandle const &target, bool invokeDtor=false)
An opaque descriptor to identify the type and further properties of a data buffer.
an opaque mark to be used by the BufferProvider implementation.
Steam-Layer implementation namespace root.
BuffDescr getDescriptorFor(size_t storageSize=0)
describe the kind of buffer managed by this provider
Mix-Ins to allow or prohibit various degrees of copying and cloning.
BuffDescr getDescriptor(ARGS ...args)
define a "buffer type" for automatically creating an instance of the template type embedded into the ...
Marker types to indicate a literal string and a Symbol.
LUMIERA_ERROR_DECLARE(BUFFER_MANAGEMENT)
Problem providing working buffers.
BuffHandle lockBuffer(BuffDescr const &)
BufferProvider API: retrieve a single buffer for exclusive use.
A front-end to support the buffer management within the render nodes.
Helper holding a pair of type-build-up and destruction functors.
BufferProvider(Literal implementationID)
build a new provider instance, managing a family of buffers.
Lumiera error handling (C++ interface).
BuffHandle lockBufferFor(ARGS ...args)
convenience shortcut: prepare and claim ("lock") a buffer suitable to hold an object of the given typ...
static const LocalTag UNKNOWN
Marker when no distinct local key is given.
Hash value types and utilities.
Handle for a buffer for processing data, abstracting away the actual implementation.
size_t HashVal
a STL compatible hash value
virtual ~BufferProvider()
this is an ABC
A pair of functors to maintain a datastructure within a buffer.
Interface: a facility providing and managing working buffers for media calculations.
BuffHandle buildHandle(HashVal typeID, Buff *storage, LocalTag const &=LocalTag::UNKNOWN)
callback from implementation to build and enrol a BufferHandle, to be returned to the client as resul...
void emitBuffer(BuffHandle const &)
BufferProvider API: state transition to emitted state.
placeholder type for the contents of a data buffer.