Lumiera  0.pre.03
»edit your freedom«
state.hpp
Go to the documentation of this file.
1 /*
2  STATE.hpp - Key Interface representing a render process and encapsulating state
3 
4  Copyright (C) Lumiera.org
5  2008, Hermann Vosseler <Ichthyostega@web.de>
6 
7  This program is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public License as
9  published by the Free Software Foundation; either version 2 of
10  the License, or (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 
21 */
22 
23 
29 #ifndef STEAM_INTERFACE_STATE_H
30 #define STEAM_INTERFACE_STATE_H
31 
32 
33 #include "lib/error.hpp"
34 #include "lib/frameid.hpp"
36 
37 #include <cstddef>
38 
39 
40 namespace steam {
41 namespace engine {
42 
43  using lumiera::FrameID;
44  using lumiera::NodeID;
45 
46  class StateAdapter;
47  class BuffTableStorage;
48 
49 
59  class State
60  {
62  public:
70  virtual BuffHandle allocateBuffer (const lumiera::StreamType*) =0;
71 
73  virtual void releaseBuffer (BuffHandle&) =0;
74 
80  virtual void is_calculated (BuffHandle const&) =0;
81 
91  virtual FrameID const& genFrameID (NodeID const&, uint chanNo) =0;
92 
98  virtual BuffHandle fetch (FrameID const&) =0;
99 
101  virtual BuffTableStorage& getBuffTableStorage() =0;
102 
103 
104  protected:
105  virtual ~State() {};
106 
113  virtual State& getCurrentImplementation () =0;
114 
115  friend class engine::StateAdapter;
116  };
117 
118 }} // namespace steam::engine
119 
120 
121 
122 namespace proc_interface {
123 
124  using steam::engine::State;
125 
126 
127 } // namespace proc_interface
128 #endif
Abstraction to access the state of a currently ongoing render/calculation process, as it is tied to the supporting facilities of the vault layer.
Definition: state.hpp:59
Identification tuple for addressing frames unambiguously.
Definition: frameid.hpp:78
Obsolete, to be rewritten /////TICKET #826.
Marker tuple to identify a specific frame.
virtual void releaseBuffer(BuffHandle &)=0
resign control of the buffer denoted by the handle
virtual BuffHandle allocateBuffer(const lumiera::StreamType *)=0
allocate a new writable buffer with type and size according to the BufferDescriptor.
Adapter to shield the ProcNode from the actual buffer management, allowing the processing function wi...
Steam-Layer implementation namespace root.
virtual BuffTableStorage & getBuffTableStorage()=0
necessary for creating a local BuffTableChunk
virtual BuffHandle fetch(FrameID const &)=0
try to fetch an existing buffer containing the denoted frame from a cache or similar backing system (...
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 rend...
virtual void is_calculated(BuffHandle const &)=0
declare the data contained in the Buffer to be ready.
virtual State & getCurrentImplementation()=0
resolves to the State object currently "in charge".
A front-end to support the buffer management within the render nodes.
Lumiera error handling (C++ interface).
Handle for a buffer for processing data, abstracting away the actual implementation.
Definition: buffhandle.hpp:115
Identification tuple for denoting render nodes unambiguously.
Definition: frameid.hpp:51