engine::State Class Reference

#include <state.hpp>

Inheritance diagram for engine::State:

Inheritance graph
[legend]

List of all members.


Detailed Description

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

An State (subclass) instance is the sole connection for the render node to invoke services of the backend 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 55 of file state.hpp.


Public Member Functions

virtual BuffHandle allocateBuffer (BufferDescriptor const &)=0
 allocate a new writable buffer with type and size according to the BufferDescriptor.
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.
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.
virtual BuffTableStorage & getBuffTableStorage ()=0
 necessary for creating a local BuffTableChunk
virtual void is_calculated (BuffHandle const &)=0
 declare the data contained in the Buffer to be ready.
virtual void releaseBuffer (BuffHandle &)=0
 resign control of the buffer denoted by the handle

Protected Member Functions

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

Friends

class engine::StateAdapter

Member Function Documentation

virtual BuffHandle engine::State::allocateBuffer ( BufferDescriptor const &   )  [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 engine::AllocBufferFromParent, and engine::AllocBufferFromCache.

Referenced by engine::AllocBufferFromCache::allocateBuffer(), and engine::AllocBufferFromParent::allocateBuffer().

Here is the caller graph for this function:

virtual BuffHandle engine::State::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 engine::StateAdapter.

Referenced by engine::StateAdapter::fetch().

Here is the caller graph for this function:

virtual FrameID const& engine::State::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:
NodeID the unique identification of a specific node
chanNo the 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 engine::Invocation.

Referenced by engine::Invocation::genFrameID().

Here is the caller graph for this function:

virtual BuffTableStorage& engine::State::getBuffTableStorage (  )  [pure virtual]

necessary for creating a local BuffTableChunk

Implemented in engine::StateAdapter.

Referenced by engine::StateAdapter::getBuffTableStorage().

Here is the caller graph for this function:

virtual State& engine::State::getCurrentImplementation (  )  [protected, pure 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 engine::StateAdapter.

virtual void engine::State::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 engine::StateAdapter.

Referenced by engine::StateAdapter::is_calculated().

Here is the caller graph for this function:

virtual void engine::State::releaseBuffer ( BuffHandle  )  [pure virtual]

resign control of the buffer denoted by the handle

Implemented in engine::StateAdapter.

Referenced by engine::StateAdapter::releaseBuffer().

Here is the caller graph for this function:


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

Generated on Sun Aug 1 21:32:21 2010 for Lumiera by  doxygen 1.5.6