Lumiera  0.pre.03
»edit your freedom«
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"
40 #include "lib/iter-adapter.hpp"
41 
42 #include <vector>
43 #include <utility>
44 
45 
46 
47 namespace steam {
48 namespace engine {
49 
50  using std::pair;
51  using std::vector;
52 
53 
66  struct BuffTable
67  {
68  typedef BuffHandle * PHa;
69  typedef BuffHandle::PBuff * PBu;
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&
113  BuffTable::Builder::announce (uint count, BufferDescriptor const& type)
114  {
115  UNIMPLEMENTED ("accept announcement of additional buffer table entries required");
116  }
117 
118 
119  inline BuffTable&
120  BuffTable::Builder::build()
121  {
122  UNIMPLEMENTED ("finally drop off the newly configured buffer pointer table");
123  }
124 
125 
126  inline void
127  BuffTable::lockBuffers()
128  {
129  UNIMPLEMENTED ("convenience shortcut: lock all preconfigured buffers within this table through the underlying buffer provider");
130  }
131 
132 
133  inline void
134  BuffTable::releaseBuffers()
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
142  BuffTable::buffers()
143  {
144  UNIMPLEMENTED ("expose an iterator to yield all prepared buffers within this buffer table");
145  }
146 
147 
148  inline BuffTable::iterator
149  BuffTable::inBuffers()
150  {
151  UNIMPLEMENTED ("expose an iterator to access all the input buffer slots of this buffer table");
152  }
153 
154 
155  inline BuffTable::iterator
156  BuffTable::outBuffers()
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 steam::engine
167 #endif
Interface to the processing nodes and the render nodes network.
Helper template(s) for creating Lumiera Forward Iterators.
Steam-Layer implementation namespace root.
An opaque descriptor to identify the type and further properties of a data buffer.
Definition: buffhandle.hpp:85
A front-end to support the buffer management within the render nodes.
Lumiera error handling (C++ interface).
Accessing a STL element range through a Lumiera forward iterator, An instance of this iterator adapte...
Obsolete, to be rewritten /////TICKET #826.