Lumiera  0.pre.03
»edit your freedom«
State Class Referenceabstract

#include "steam/state.hpp"

Description

Abstraction to access the state of a currently ongoing render/calculation process, as it is tied to the supporting facilities of the vault layer.

An State (subclass) instance is the sole connection for the render node to invoke services of the vault needed to carry out the calculations.

See also
engine::RenderInvocation top-level entrance point
nodeinvocation.hpp impl. used from within the nodes

Definition at line 59 of file state.hpp.

Public Member Functions

virtual BuffHandle allocateBuffer (const lumiera::StreamType *)=0
 allocate a new writable buffer with type and size according to the BufferDescriptor. More...
 
virtual BuffHandle fetch (FrameID const &)=0
 try to fetch an existing buffer containing the denoted frame from a cache or similar backing system (e.g. 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...
 
virtual BuffTableStoragegetBuffTableStorage ()=0
 necessary for creating a local BuffTableChunk
 
virtual void is_calculated (BuffHandle const &)=0
 declare the data contained in the Buffer to be ready. More...
 
virtual void releaseBuffer (BuffHandle &)=0
 resign control of the buffer denoted by the handle
 

Friends

class engine::StateAdapter
 

Protected Member Functions

virtual StategetCurrentImplementation ()=0
 resolves to the State object currently "in charge". More...
 

Member Function Documentation

◆ allocateBuffer()

virtual BuffHandle allocateBuffer ( const lumiera::StreamType )
pure virtual

allocate a new writable buffer with type and size according to the BufferDescriptor.

The actual provider of this buffer depends on the State implementation; it could be a temporary, located in the cache, used for feeding calculated frames over a network, etc.

Returns
a BuffHandle encapsulating the information necessary to get at the actual buffer address and for releasing the buffer.

Implemented in AllocBufferFromCache, AllocBufferFromParent, and StateProxy.

◆ is_calculated()

virtual void is_calculated ( BuffHandle const &  )
pure virtual

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.

Implemented in StateAdapter, and StateProxy.

Referenced by StateAdapter::is_calculated().

+ Here is the caller graph for this function:

◆ genFrameID()

virtual FrameID const& genFrameID ( NodeID const &  ,
uint  chanNo 
)
pure virtual

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.

Parameters
NodeIDthe unique identification of a specific node
chanNothe number of the output channel of this node
Returns
a complete FrameID which unambiguously denotes this specific frame and can be used for caching

Implemented in Invocation, and StateProxy.

◆ fetch()

virtual BuffHandle fetch ( FrameID const &  )
pure virtual

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

Implemented in StateAdapter, and StateProxy.

Referenced by StateAdapter::fetch().

+ Here is the caller graph for this function:

◆ getCurrentImplementation()

virtual State& getCurrentImplementation ( )
protectedpure virtual

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.

Implemented in StateAdapter, and StateProxy.

+ Inheritance diagram for State:
+ Collaboration diagram for State:

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