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