Lumiera  0.pre.03
»edit your freedom«
StateAdapter Class Reference

#include "steam/engine/nodeinvocation.hpp"

Description

Adapter to shield the ProcNode from the actual buffer management, allowing the processing function within ProcNode to use logical buffer IDs.

StateAdapter is created on the stack for each pull() call, using setup/wiring data preconfigured by the builder. Its job is to provide the actual implementation of the Cache push / fetch and recursive downcall to render the source frames.

Definition at line 78 of file nodeinvocation.hpp.

Public Member Functions

virtual BuffHandle fetch (FrameID const &fID)
 try to fetch an existing buffer containing the denoted frame from a cache or similar backing system (e.g. More...
 
virtual BuffTableStoragegetBuffTableStorage ()
 necessary for creating a local BuffTableChunk
 
virtual void is_calculated (BuffHandle const &bh)
 declare the data contained in the Buffer to be ready. More...
 
virtual void releaseBuffer (BuffHandle &bh)
 resign control of the buffer denoted by the handle
 
- Public Member Functions inherited from State
virtual BuffHandle allocateBuffer (const lumiera::StreamType *)=0
 allocate a new writable buffer with type and size according to the BufferDescriptor. More...
 
virtual FrameID const & genFrameID (NodeID const &, uint chanNo)=0
 generate (or calculate) an ID denoting a media data frame appearing at the given position in the render network, for the time point this rendering process is currently calculating data for. More...
 

Protected Member Functions

 StateAdapter (State &callingProcess)
 
virtual StategetCurrentImplementation ()
 resolves to the State object currently "in charge". More...
 

Protected Attributes

Statecurrent_
 
Stateparent_
 

Member Function Documentation

◆ getCurrentImplementation()

virtual State& getCurrentImplementation ( )
inlineprotectedvirtual

resolves to the State object currently "in charge".

Intended as a performance shortcut to avoid calling up through a chain of virtual functions when deep down in chained ProcNode::pull() calls. This allows derived classes to proxy the state interface.

Implements State.

Definition at line 90 of file nodeinvocation.hpp.

◆ is_calculated()

virtual void is_calculated ( BuffHandle const &  )
inlinevirtual

declare the data contained in the Buffer to be ready.

The caller is required to restrain itself from modifying the data afterwards, as this buffer now can be used (readonly) by other calculation processes in parallel.

Implements State.

Definition at line 98 of file nodeinvocation.hpp.

References State::is_calculated().

+ Here is the call graph for this function:

◆ fetch()

virtual BuffHandle fetch ( FrameID const &  )
inlinevirtual

try to fetch an existing buffer containing the denoted frame from a cache or similar backing system (e.g.

network peer).

Returns
either a handle to a readonly buffer, or a null handle
Note
the client is responsible for not modifying the provided data

Implements State.

Definition at line 100 of file nodeinvocation.hpp.

References State::fetch().

+ Here is the call graph for this function:
+ Inheritance diagram for StateAdapter:
+ Collaboration diagram for StateAdapter:

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