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)
5  2008, Hermann Vosseler <Ichthyostega@web.de>
6 
7   **Lumiera** is free software; you can redistribute it and/or modify it
8   under the terms of the GNU General Public License as published by the
9   Free Software Foundation; either version 2 of the License, or (at your
10   option) any later version. See the file COPYING for further details.
11 
12 */
13 
14 
24 #ifndef ENGINE_BUFFHTABLE_H
25 #define ENGINE_BUFFHTABLE_H
26 
27 
28 #include "lib/error.hpp"
31 #include "lib/iter-adapter.hpp"
32 
33 #include <vector>
34 #include <utility>
35 
36 
37 
38 namespace steam {
39 namespace engine {
40 
41  using std::pair;
42  using std::vector;
43 
44 
57  struct BuffTable
58  {
59  typedef BuffHandle * PHa;
60  typedef BuffHandle::PBuff * PBu;
61 
62  struct StorageChunk
63  { };
64 
65  template<uint count>
66  struct Storage
67  {
68  enum{size = count * sizeof(StorageChunk)};
69  };
70 
71  class Builder
72  {
73  public:
74  Builder& announce (uint count, BuffDescr const& type);
75  BuffTable& build();
76  };
77 
78  static Builder& prepare (const size_t STORAGE_SIZE, void* storage);
79 
80  void lockBuffers();
81  void releaseBuffers();
82 
83  typedef vector<BuffHandle> BuffHandleTable;
85 
86  iterator buffers();
87  iterator inBuffers();
88  iterator outBuffers();
89  };
90 
91 
92 
93 
94  /* === Implementation === */
95 
96  inline BuffTable::Builder&
97  BuffTable::prepare (const size_t STORAGE_SIZE, void* storage)
98  {
99  UNIMPLEMENTED ("expose a builder object for outfitting a buffer pointer table");
100  }
101 
102 
103  inline BuffTable::Builder&
104  BuffTable::Builder::announce (uint count, BuffDescr const& type)
105  {
106  UNIMPLEMENTED ("accept announcement of additional buffer table entries required");
107  }
108 
109 
110  inline BuffTable&
111  BuffTable::Builder::build()
112  {
113  UNIMPLEMENTED ("finally drop off the newly configured buffer pointer table");
114  }
115 
116 
117  inline void
118  BuffTable::lockBuffers()
119  {
120  UNIMPLEMENTED ("convenience shortcut: lock all preconfigured buffers within this table through the underlying buffer provider");
121  }
122 
123 
124  inline void
125  BuffTable::releaseBuffers()
126  {
127  UNIMPLEMENTED ("convenience shortcut: release all the buffers managed through this buffer table, by forwarding to the underlying buffer provider");
128  }
129 
130 
131 
132  inline BuffTable::iterator
133  BuffTable::buffers()
134  {
135  UNIMPLEMENTED ("expose an iterator to yield all prepared buffers within this buffer table");
136  }
137 
138 
139  inline BuffTable::iterator
140  BuffTable::inBuffers()
141  {
142  UNIMPLEMENTED ("expose an iterator to access all the input buffer slots of this buffer table");
143  }
144 
145 
146  inline BuffTable::iterator
147  BuffTable::outBuffers()
148  {
149  UNIMPLEMENTED ("expose an iterator to access all the output buffer slots of this buffer table");
150  }
151 
152 
153 
154 
155 
156 
157 }} // namespace steam::engine
158 #endif
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:77
Steam-Layer implementation namespace root.
Interface to the processing nodes and the render nodes network.
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:111
Accessing a STL element range through a Lumiera forward iterator, An instance of this iterator adapte...
Tables of buffer handles and corresponding dereferenced buffer pointers.
Definition: bufftable.hpp:57
placeholder type for the contents of a data buffer.
Definition: streamtype.hpp:112