Lumiera  0.pre.03
»edityourfreedom«
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
bufftable.hpp
Go to the documentation of this file.
1 /*
2  BUFFTABLE.hpp - Table of buffer pointers to be used by the render nodes
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 
33 #ifndef ENGINE_BUFFHTABLE_H
34 #define ENGINE_BUFFHTABLE_H
35 
36 
37 #include "lib/error.hpp"
39 #include "proc/engine/procnode.hpp"
40 #include "lib/iter-adapter.hpp"
41 
42 #include <vector>
43 #include <utility>
44 
45 
46 
47 namespace proc {
48 namespace engine {
49 
50  using std::pair;
51  using std::vector;
52 
53 
66  struct BuffTable
67  {
68  typedef BuffHandle * PHa;
70 
71  struct StorageChunk
72  { };
73 
74  template<uint count>
75  struct Storage
76  {
77  enum{size = count * sizeof(StorageChunk)};
78  };
79 
80  class Builder
81  {
82  public:
83  Builder& announce (uint count, BufferDescriptor const& type);
84  BuffTable& build();
85  };
86 
87  static Builder& prepare (const size_t STORAGE_SIZE, void* storage);
88 
89  void lockBuffers();
90  void releaseBuffers();
91 
92  typedef vector<BuffHandle> BuffHandleTable;
94 
95  iterator buffers();
96  iterator inBuffers();
97  iterator outBuffers();
98  };
99 
100 
101 
102 
103  /* === Implementation === */
104 
105  inline BuffTable::Builder&
106  BuffTable::prepare (const size_t STORAGE_SIZE, void* storage)
107  {
108  UNIMPLEMENTED ("expose a builder object for outfitting a buffer pointer table");
109  }
110 
111 
112  inline BuffTable::Builder&
114  {
115  UNIMPLEMENTED ("accept announcement of additional buffer table entries required");
116  }
117 
118 
119  inline BuffTable&
121  {
122  UNIMPLEMENTED ("finally drop off the newly configured buffer pointer table");
123  }
124 
125 
126  inline void
128  {
129  UNIMPLEMENTED ("convenience shortcut: lock all preconfigured buffers within this table through the underlying buffer provider");
130  }
131 
132 
133  inline void
135  {
136  UNIMPLEMENTED ("convenience shortcut: release all the buffers managed through this buffer table, by forwarding to the underlying buffer provider");
137  }
138 
139 
140 
141  inline BuffTable::iterator
143  {
144  UNIMPLEMENTED ("expose an iterator to yield all prepared buffers within this buffer table");
145  }
146 
147 
148  inline BuffTable::iterator
150  {
151  UNIMPLEMENTED ("expose an iterator to access all the input buffer slots of this buffer table");
152  }
153 
154 
155  inline BuffTable::iterator
157  {
158  UNIMPLEMENTED ("expose an iterator to access all the output buffer slots of this buffer table");
159  }
160 
161 
162 
163 
164 
165 
166 }} // namespace proc::engine
167 #endif
Interface to the processing nodes and the render nodes network.
BuffHandle::PBuff * PBu
Definition: bufftable.hpp:69
placeholder type for the contents of a data buffer.
Definition: streamtype.hpp:121
Helper template(s) for creating Lumiera Forward Iterators.
An opaque descriptor to identify the type and further properties of a data buffer.
Definition: buffhandle.hpp:81
static Builder & prepare(const size_t STORAGE_SIZE, void *storage)
Definition: bufftable.hpp:106
Handle for a buffer for processing data, abstracting away the actual implementation.
Definition: buffhandle.hpp:111
lib::RangeIter< BuffHandleTable::iterator > iterator
Definition: bufftable.hpp:93
A front-end to support the buffer management within the render nodes.
Lumiera error handling (C++ interface).
vector< BuffHandle > BuffHandleTable
Definition: bufftable.hpp:92
Accessing a STL element range through a Lumiera forward iterator, An instance of this iterator adapte...
Builder & announce(uint count, BufferDescriptor const &type)
Definition: bufftable.hpp:113
Proc-Layer implementation namespace root.
Definition: id-scheme.hpp:63
Obsolete, to be rewritten /////TICKET #826.