API Documentation
Loading...
Searching...
No Matches
GraphicsBuffer.h
Go to the documentation of this file.
1/*--------------------------------------------------------------------------------------------
2Copyright (c) 2019, NDEVR LLC
3tyler.parke@ndevr.org
4 __ __ ____ _____ __ __ _______
5 | \ | | | __ \ | ___|\ \ / / | __ \
6 | \ | | | | \ \ | |___ \ \ / / | |__) |
7 | . \| | | |__/ / | |___ \ V / | _ /
8 | |\ |_|_____/__|_____|___\_/____| | \ \
9 |__| \__________________________________| \__\
10
11Subject to the terms of the Enterprise+ Agreement, NDEVR hereby grants
12Licensee a limited, non-exclusive, non-transferable, royalty-free license
13(without the right to sublicense) to use the API solely for the purpose of
14Licensee's internal development efforts to develop applications for which
15the API was provided.
16
17The above copyright notice and this permission notice shall be included in all
18copies or substantial portions of the Software.
19
20THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
21INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
22PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
23FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25DEALINGS IN THE SOFTWARE.
26
27Library: Graphics
28File: GraphicsBuffer
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include "DLLInfo.h"
35
36namespace NDEVR
37{
38 /**--------------------------------------------------------------------------------------------------
39 \brief A Special abstract TableColumn responsible for interfacing a Buffer of data with the video card.
40 Provides common interface for setting the memory around primitive types.
41 GraphicsBuffers typically mirror local TableColumns and push updates to the video card at times when it
42 is appropriate to do so.
43 **/
45 {
46 public:
54
55 public:
58
59
60 virtual void cleanup() = 0;
61 virtual void setAccessable(bool is_accessable, bool copy_existing)
62 {
63 if (m_allocated_size == 0)
64 {
65 m_is_accessable = is_accessable;
66 return;
67 }
68 if (m_is_accessable == is_accessable)
69 return;
70 if (!is_accessable)
71 sendToVideoCard(copy_existing);
72 else
73 getFromVideoCard(copy_existing);
74 m_is_accessable = is_accessable;
75 }
76
77 bool isAccessable() const { return m_is_accessable; };
79 {
81 }
82 virtual void compress(BinaryCompressionObject& object) override
83 {
84 UNUSED(object);
85 }
86 virtual void mapToFile(BinaryFile& file, BinaryCompressionObject& object) override
87 {
88 UNUSED(file);
89 UNUSED(object);
90 }
91 virtual void mapToFile(BinaryFile& file, int compression) override
92 {
93 UNUSED(file);
94 UNUSED(compression);
95 }
96 virtual void mapFromFile(BinaryFile& file, uint08 version_number) override
97 {
98 UNUSED(file);
99 UNUSED(version_number);
100 }
101 [[nodiscard]] bool isSame(uint04 index, const String& value) const override { UNUSED(index); UNUSED(value); return false; }
102 [[nodiscard]] bool isSame(uint04 index, const char* value) const override { UNUSED(index); UNUSED(value); return false; }
103 [[nodiscard]] bool contains(uint04 index, const String& value, bool ignore_case) const override { UNUSED(index); UNUSED(value); UNUSED(ignore_case); return false; }
104 [[nodiscard]] bool contains(uint04 index, const char* value, bool ignore_case) const override { UNUSED(index); UNUSED(value); UNUSED(ignore_case); return false; }
105 [[nodiscard]] bool beginsWith(uint04 index, const String& value, bool ignore_case) const override { UNUSED(index); UNUSED(value); UNUSED(ignore_case); return false; }
106 [[nodiscard]] bool beginsWith(uint04 index, const char* value, bool ignore_case) const override { UNUSED(index); UNUSED(value); UNUSED(ignore_case); return false; }
107 virtual TableColumn* getSelected(const Buffer<bool>&) const override { return nullptr; }
108 template<class t_type_a, class t_type_b>
109 void move(void* memory, const t_type_b& value) const
110 {
111 t_type_a new_value = cast<t_type_a>(value);
112 memcpy(memory, &new_value, sizeof(t_type_a));
113 }
114
115 template<class t_type_a, class t_type_b>
116 void move(t_type_b& value, void* memory) const
117 {
118 t_type_a new_value;
119 memcpy(&new_value, memory, sizeof(t_type_a));
120 value = cast<t_type_b>(new_value);
121 }
122
123 template<class t_type_a>
124 void move(void* memory, const String& value) const
125 {
126 t_type_a new_value = value.getAs<t_type_a>();
127 memcpy(memory, &new_value, sizeof(t_type_a));
128 }
129
130 template<class t_type_a, class t_type_b>
131 void get(void* memory, t_type_b& value)
132 {
133 t_type_a new_value;
134 memcpy(&new_value, memory, sizeof(t_type_a));
135 value = cast<t_type_b>(new_value);
136 }
137
138 template<class t_type_a>
139 void get(void* memory, String& value)
140 {
141 t_type_a new_value;
142 memcpy(&new_value, memory, sizeof(t_type_a));
143 value = String(new_value);
144 }
145
146 template<class t_type>
147 void setMemory(uint04 index, uint04 vector_pos, const t_type& value)
148 {
149 lib_assert(m_is_accessable, "Tried to edit unaccessible vertex");
150 void* temp_value = mapMemory(index * type().total_size + vector_pos * type().byte_size, type().total_size);
151 setMemory(temp_value, value);
152 unmapMemory();
153 }
154
155 template<class t_type>
156 void setMemory(void* temp_value, const t_type& value)
157 {
158 switch (type().byte_size)
159 {
160 case 1:
161 if (type().is_unsigned)
162 move<uint01>(temp_value, value);
163 else
164 move<sint01>(temp_value, value);
165 break;
166 case 2:
167 if (type().is_unsigned)
168 move<uint02>(temp_value, value);
169 else
170 move<sint02>(temp_value, value);
171 break;
172 case 4:
173 if (type().is_float)
174 move<fltp04>(temp_value, value);
175 else if (type().is_unsigned)
176 move<uint04>(temp_value, value);
177 else
178 move<sint04>(temp_value, value);
179 break;
180 case 8:
181 if (type().is_float)
182 move<fltp08>(temp_value, value);
183 else if (type().is_unsigned)
184 move<uint08>(temp_value, value);
185 else
186 move<sint08>(temp_value, value);
187 break;
188 default:
189 lib_assert(false, "Bad type");
190 }
191 }
192
193 template<class t_type>
194 void setMemory(const t_type* data_to_insert, uint04 offset, uint04 size)
195 {
196 lib_assert(m_is_accessable, "Tried to edit unaccessible vertex");
197 switch (type().byte_size)
198 {
199 case 1:
200 if (type().is_unsigned)
201 _setRawData<uint01, t_type>(data_to_insert, offset, size);
202 else
203 _setRawData<sint01, t_type>(data_to_insert, offset, size);
204 break;
205 case 2:
206 if (type().is_unsigned)
207 _setRawData<uint02, t_type>(data_to_insert, offset, size);
208 else
209 _setRawData<sint02, t_type>(data_to_insert, offset, size);
210 break;
211 case 4:
212 if (type().is_float)
213 _setRawData<fltp04, t_type>(data_to_insert, offset, size);
214 else if (type().is_unsigned)
215 _setRawData<uint04, t_type>(data_to_insert, offset, size);
216 else
217 _setRawData<sint04, t_type>(data_to_insert, offset, size);
218 break;
219 case 8:
220 if (type().is_float)
221 _setRawData<fltp08, t_type>(data_to_insert, offset, size);
222 else if (type().is_unsigned)
223 _setRawData<uint08, t_type>(data_to_insert, offset, size);
224 else
225 _setRawData<sint08, t_type>(data_to_insert, offset, size);
226 break;
227 case 16:
228 if (type().is_float)
229 _setRawData<fltp04, t_type>(data_to_insert, offset, size);
230 else if (type().is_unsigned)
231 _setRawData<uint04, t_type>(data_to_insert, offset, size);
232 else
233 _setRawData<sint04, t_type>(data_to_insert, offset, size);
234 break;
235 default:
236 lib_assert(false, "unknown type");
237 }
238 lib_assert(m_is_accessable, "Tried to edit unaccessible vertex");
239 }
240
241 template<class t_type>
242 void getMemory(uint04 index, uint04 vector_pos, t_type& value) const
243 {
244 lib_assert(m_is_accessable, "Tried to edit unaccessible vertex");
245 void* temp_value = mapMemory(index * type().total_size + vector_pos * type().byte_size, type().byte_size);
246 switch (type().byte_size)
247 {
248 case 1:
249 if (type().is_unsigned)
250 move<uint01>(value, temp_value);
251 else
252 move<sint01>(value, temp_value);
253 break;
254 case 2:
255 if (type().is_unsigned)
256 move<uint02>(value, temp_value);
257 else
258 move<sint02>(value, temp_value);
259 break;
260 case 4:
261 if (type().is_float)
262 move<fltp04>(value, temp_value);
263 else if (type().is_unsigned)
264 move<uint04>(value, temp_value);
265 else
266 move<sint04>(value, temp_value);
267 break;
268 case 8:
269 if (type().is_float)
270 move<fltp08>(value, temp_value);
271 else if (type().is_unsigned)
272 move<uint08>(value, temp_value);
273 else
274 move<sint08>(value, temp_value);
275 break;
276 default:
277 lib_assert(false, "Bad type");
278 }
279 unmapMemory();
280 lib_assert(m_is_accessable, "Tried to edit unaccessible vertex");
281 }
282 template<class t_type>
283 void setRawMemory(uint04 index, const t_type& value)
284 {
285 lib_assert(m_is_accessable, "Tried to edit unaccessible vertex");
286 void* temp_value = mapMemory(index * type().total_size, type().total_size);
287 move<t_type>(temp_value, value);
288 unmapMemory();
289 }
290 template<class t_type>
291 void getMemory(uint04 index, t_type& value) const
292 {
293 getMemory(index, 0, value);
294 }
295 template<class t_type>
296 void setMemory(uint04 index, const t_type& value)
297 {
298 setMemory(index, 0, value);
299 }
300
301 void set(uint04 index, uint04 vector_pos, bool value) final override { setMemory(index, vector_pos, value); };
302 void set(uint04 index, uint04 vector_pos, uint01 value) final override { setMemory(index, vector_pos, value); };
303 void set(uint04 index, uint04 vector_pos, uint02 value) final override { setMemory(index, vector_pos, value); };
304 void set(uint04 index, uint04 vector_pos, uint04 value) final override { setMemory(index, vector_pos, value); };
305 void set(uint04 index, uint04 vector_pos, uint08 value) final override { setMemory(index, vector_pos, value); };
306 void set(uint04 index, uint04 vector_pos, sint01 value) final override { setMemory(index, vector_pos, value); };
307 void set(uint04 index, uint04 vector_pos, sint02 value) final override { setMemory(index, vector_pos, value); };
308 void set(uint04 index, uint04 vector_pos, sint04 value) final override { setMemory(index, vector_pos, value); };
309 void set(uint04 index, uint04 vector_pos, sint08 value) final override { setMemory(index, vector_pos, value); };
310 void set(uint04 index, uint04 vector_pos, fltp04 value) final override { setMemory(index, vector_pos, value); };
311 void set(uint04 index, uint04 vector_pos, fltp08 value) final override { setMemory(index, vector_pos, value); };
312
313 void set(uint04 index, uint04 vector_pos, const String& value) final override { setMemory(index, vector_pos, value); };
314
315 void set(uint04 index, bool value) final override { setMemory(index, value); };
316 void set(uint04 index, uint01 value) final override { setMemory(index, value); };
317 void set(uint04 index, uint02 value) final override { setMemory(index, value); };
318 void set(uint04 index, uint04 value) final override { setMemory(index, value); };
319 void set(uint04 index, uint08 value) final override { setMemory(index, value); };
320 void set(uint04 index, sint01 value) final override { setMemory(index, value); };
321 void set(uint04 index, sint02 value) final override { setMemory(index, value); };
322 void set(uint04 index, sint04 value) final override { setMemory(index, value); };
323 void set(uint04 index, sint08 value) final override { setMemory(index, value); };
324 void set(uint04 index, fltp04 value) final override { setMemory(index, value); };
325 void set(uint04 index, fltp08 value) final override { setMemory(index, value); };
326 void set(uint04 index, const String& value) final override { setMemory(index, value); };
327 void set(uint04 index, RGBColor value) final override { UNUSED(index); UNUSED(value);/*setMemory(index, value);*/ };
328
329 void get(uint04 index, uint04 vector_pos, bool& value) const final override { getMemory(index, vector_pos, value); };
330 void get(uint04 index, uint04 vector_pos, uint01& value) const final override { getMemory(index, vector_pos, value); };
331 void get(uint04 index, uint04 vector_pos, uint02& value) const final override { getMemory(index, vector_pos, value); };
332 void get(uint04 index, uint04 vector_pos, uint04& value) const final override { getMemory(index, vector_pos, value); };
333 void get(uint04 index, uint04 vector_pos, uint08& value) const final override { getMemory(index, vector_pos, value); };
334 void get(uint04 index, uint04 vector_pos, sint01& value) const final override { getMemory(index, vector_pos, value); };
335 void get(uint04 index, uint04 vector_pos, sint02& value) const final override { getMemory(index, vector_pos, value); };
336 void get(uint04 index, uint04 vector_pos, sint04& value) const final override { getMemory(index, vector_pos, value); };
337 void get(uint04 index, uint04 vector_pos, sint08& value) const final override { getMemory(index, vector_pos, value); };
338 void get(uint04 index, uint04 vector_pos, fltp04& value) const final override { getMemory(index, vector_pos, value); };
339 void get(uint04 index, uint04 vector_pos, fltp08& value) const final override { getMemory(index, vector_pos, value); };
340 void get(uint04 index, uint04 vector_pos, String& value) const final override { getMemory(index, vector_pos, value); };
341
342 void get(uint04 index, bool& value) const final override { getMemory(index, value); };
343 void get(uint04 index, uint01& value) const final override { getMemory(index, value); };
344 void get(uint04 index, uint02& value) const final override { getMemory(index, value); };
345 void get(uint04 index, uint04& value) const final override { getMemory(index, value); };
346 void get(uint04 index, uint08& value) const final override { getMemory(index, value); };
347 void get(uint04 index, sint01& value) const final override { getMemory(index, value); };
348 void get(uint04 index, sint02& value) const final override { getMemory(index, value); };
349 void get(uint04 index, sint04& value) const final override { getMemory(index, value); };
350 void get(uint04 index, sint08& value) const final override { getMemory(index, value); };
351 void get(uint04 index, fltp04& value) const final override { getMemory(index, value); };
352 void get(uint04 index, fltp08& value) const final override { getMemory(index, value); };
353 void get(uint04 index, String& value) const final override { getMemory(index, value); };
354 void get(uint04 index, RGBColor& value) const final override { UNUSED(index); UNUSED(value);/*getMemory(index, value);*/ };
355
356 virtual void copyRow(uint04 source, uint04 destination) override
357 {
358 UNUSED(source);
359 UNUSED(destination);
360 lib_assert(false, "Not yet implemented");
361 }
362 virtual void copyRows(uint04 source, uint04 destination, uint04 size) override
363 {
364 UNUSED(source);
365 UNUSED(destination);
366 UNUSED(size);
367 lib_assert(false, "Not yet implemented");
368 }
369 virtual void insertIndices(uint04 location, uint04 size) override
370 {
371 UNUSED(location);
372 UNUSED(size);
373 lib_assert(false, "Not yet implemented");
374 }
375 virtual void removeIndices(uint04 location, uint04 size) override
376 {
377 UNUSED(location);
378 UNUSED(size);
379 lib_assert(false, "Not yet implemented");
380 }
381 void removeIndices(const Buffer<uint04>& offset_lookup_list) override final { UNUSED(offset_lookup_list); };
382 uint04 size() const final override { return m_size; }
383
384 NDEVR_GRAPHICS_API virtual void updateFrom(const TableColumn& column) override;
385 void removeRow(uint04 index) override final { UNUSED(index); };
386 void removeRows(uint04 index, uint04 size) override final { UNUSED(index); UNUSED(size); };
387 void removeRows(const Buffer<uint04>& indices) override final { UNUSED(indices); };
388 void removeRows(uint04 offset, const Buffer<bool>& indices) override { UNUSED(offset); UNUSED(indices); }
389 void insert(uint04 index) override final { insertRows(index, 1); };
390 virtual void copyData(const TableColumn& reference_data, bool set_type) = 0;
393 template<class t_type>
394 void setData(const t_type* begin, const t_type* end, bool set_type)
395 {
396 if (set_type && m_type != GetTypeInfo<t_type>())
397 {
398 cleanup();
400 }
402 setSize(size);
403 if (size != 0)
404 {
405 TypeInfo insertion_type = GetTypeInfo<t_type>();
406 if (insertion_type.is_number)
407 {
408 if (insertion_type.vector_size > 0)
409 size = size * insertion_type.vector_size;
410 switch (insertion_type.byte_size)
411 {
412 case 1:
413 if (insertion_type.is_unsigned)
414 setMemory((uint01*)begin, 0, size);
415 else
416 setMemory((sint01*)begin, 0, size);
417 break;
418 case 2:
419 if (insertion_type.is_unsigned)
420 setMemory((uint02*)begin, 0, size);
421 else
422 setMemory((sint02*)begin, 0, size);
423 break;
424 case 4:
425 if (insertion_type.is_float)
426 setMemory((fltp04*)begin, 0, size);
427 else if (insertion_type.is_unsigned)
428 setMemory((uint04*)begin, 0, size);
429 else
430 setMemory((sint04*)begin, 0, size);
431 break;
432 case 8:
433 if (insertion_type.is_float)
434 setMemory((fltp08*)begin, 0, size);
435 else if (insertion_type.is_unsigned)
436 setMemory((uint08*)begin, 0, size);
437 else
438 setMemory((sint08*)begin, 0, size);
439 break;
440 case 16://
441 if (insertion_type.is_float)
442 setMemory((fltp04*)begin, 0, size);
443 else if (insertion_type.is_unsigned)
444 setMemory((uint04*)begin, 0, size);
445 else
446 setMemory((sint04*)begin, 0, size);
447 break;
448 default:
449 lib_assert(false, "unknown buffer format");
450 break;
451 }
452 }
453 else
454 {
455 lib_assert(insertion_type == m_type, "unexpected vertex insertion");
456 _setRawData<t_type, t_type>(begin, 0, size);
457 }
458 }
459 lib_assert(m_is_accessable, "Tried to edit unaccessible vertex");
460 }
461
462
463 void* begin() final { return nullptr; };
464 void* end() final { return nullptr; };
465
466 const void* begin() const final { return nullptr; };
467 const void* end() const final { return nullptr; };
468 protected:
469 virtual void getFromVideoCard(bool copy_existing) = 0;
470 virtual void sendToVideoCard(bool copy_existing) = 0;
471 template<class t_type>
472 void getData(t_type* data_to_get, uint04 offset, uint04 size)
473 {
474 void* data = mapMemory(offset * type().total_size, size * type().total_size);
475 memcpy(data_to_get, data, size * type().total_size);
476 unmapMemory();
477 }
478
479 virtual void* mapMemory(size_t offset, size_t size) const = 0;
480 virtual void unmapMemory() const = 0;
481 virtual void updateRegion(const TableColumn& reference_data, uint04 offset, uint04 size) = 0;
482
483 private:
484#if _MSC_VER
485#pragma warning( disable : 4244)
486#endif
487 template<class t_convert_type, class t_type>
488 void _setRawData(const t_type* begin, uint04 offset, uint04 size)
489 {
490 void* data = mapMemory(cast<size_t>(offset) * type().byte_size, size * type().byte_size);
491 if constexpr (std::is_same<t_convert_type, t_type>())
492 {
493 memcpy((uint01*)data, (uint01*)begin, size * type().byte_size);
494 }
495 else
496 {
497 for (uint04 i = 0; i < size; i++)
498 {
499 t_convert_type conversion(*(begin + i));
500 memcpy((uint01*)(data)+type().byte_size * i, &conversion, sizeof(t_convert_type));
501 }
502 }
503 unmapMemory();
504 }
505#if _MSC_VER
506#pragma warning( default : 4244)
507#endif
508 protected:
515 };
516}
#define UNUSED(expr)
Definition BaseValues.hpp:409
#define lib_assert(expression, message)
Definition LibAssert.h:61
#define NDEVR_GRAPHICS_API
Definition DLLInfo.h:56
Logic for reading or writing to a binary file including logic for.
Definition BinaryFile.h:59
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:56
A Special abstract TableColumn responsible for interfacing a Buffer of data with the video card....
Definition GraphicsBuffer.h:45
bool beginsWith(uint04 index, const char *value, bool ignore_case) const override
Definition GraphicsBuffer.h:106
virtual TableColumn * getSelected(const Buffer< bool > &) const override
Definition GraphicsBuffer.h:107
void removeRow(uint04 index) override final
Definition GraphicsBuffer.h:385
void get(uint04 index, uint04 vector_pos, fltp08 &value) const final override
Definition GraphicsBuffer.h:339
void removeIndices(const Buffer< uint04 > &offset_lookup_list) override final
Definition GraphicsBuffer.h:381
void get(uint04 index, fltp08 &value) const final override
Definition GraphicsBuffer.h:352
void get(uint04 index, uint04 vector_pos, fltp04 &value) const final override
Definition GraphicsBuffer.h:338
void get(uint04 index, uint02 &value) const final override
Definition GraphicsBuffer.h:344
void get(void *memory, String &value)
Definition GraphicsBuffer.h:139
void setMemory(void *temp_value, const t_type &value)
Definition GraphicsBuffer.h:156
void set(uint04 index, uint04 vector_pos, sint08 value) final override
Definition GraphicsBuffer.h:309
virtual void updateFrom(const TableColumn &column) override
virtual void sendToVideoCard(bool copy_existing)=0
virtual void insertIndices(uint04 location, uint04 size) override
Definition GraphicsBuffer.h:369
void setData(const t_type *begin, const t_type *end, bool set_type)
Definition GraphicsBuffer.h:394
void set(uint04 index, RGBColor value) final override
Definition GraphicsBuffer.h:327
void get(uint04 index, uint04 vector_pos, sint01 &value) const final override
Definition GraphicsBuffer.h:334
bool isAccessable() const
Definition GraphicsBuffer.h:77
Type
Definition GraphicsBuffer.h:48
@ VERTEX
Definition GraphicsBuffer.h:49
@ INDEX
Definition GraphicsBuffer.h:51
@ UNIFORM
Definition GraphicsBuffer.h:50
@ INSTANCE
Definition GraphicsBuffer.h:52
void getData(t_type *data_to_get, uint04 offset, uint04 size)
Definition GraphicsBuffer.h:472
virtual void copyRow(uint04 source, uint04 destination) override
Definition GraphicsBuffer.h:356
void removeRows(const Buffer< uint04 > &indices) override final
Definition GraphicsBuffer.h:387
void get(uint04 index, uint04 vector_pos, uint01 &value) const final override
Definition GraphicsBuffer.h:330
virtual void copyRows(uint04 source, uint04 destination, uint04 size) override
Definition GraphicsBuffer.h:362
virtual void copyData(const TableColumn &reference_data, bool set_type)=0
void set(uint04 index, uint04 vector_pos, sint01 value) final override
Definition GraphicsBuffer.h:306
virtual void getFromVideoCard(bool copy_existing)=0
GraphicsBuffer(GraphicsBuffer &&buffer) noexcept
void set(uint04 index, fltp04 value) final override
Definition GraphicsBuffer.h:324
virtual void compress(BinaryCompressionObject &object) override
Definition GraphicsBuffer.h:82
const void * end() const final
Definition GraphicsBuffer.h:467
void setType(const TypeInfo &type)
void get(uint04 index, String &value) const final override
Definition GraphicsBuffer.h:353
void set(uint04 index, uint04 vector_pos, uint04 value) final override
Definition GraphicsBuffer.h:304
void set(uint04 index, uint04 vector_pos, bool value) final override
Definition GraphicsBuffer.h:301
GraphicsBuffer(const String &label)
void set(uint04 index, sint01 value) final override
Definition GraphicsBuffer.h:320
uint04 m_size
Definition GraphicsBuffer.h:509
void get(void *memory, t_type_b &value)
Definition GraphicsBuffer.h:131
void get(uint04 index, uint04 vector_pos, uint02 &value) const final override
Definition GraphicsBuffer.h:331
void move(t_type_b &value, void *memory) const
Definition GraphicsBuffer.h:116
virtual void updateRegion(const TableColumn &reference_data, uint04 offset, uint04 size)=0
bool contains(uint04 index, const char *value, bool ignore_case) const override
Definition GraphicsBuffer.h:104
void removeRows(uint04 offset, const Buffer< bool > &indices) override
Definition GraphicsBuffer.h:388
void get(uint04 index, uint04 vector_pos, sint04 &value) const final override
Definition GraphicsBuffer.h:336
bool isSame(uint04 index, const char *value) const override
Definition GraphicsBuffer.h:102
void set(uint04 index, uint04 vector_pos, uint08 value) final override
Definition GraphicsBuffer.h:305
uint04 size() const final override
Definition GraphicsBuffer.h:382
void get(uint04 index, sint04 &value) const final override
Definition GraphicsBuffer.h:349
void get(uint04 index, RGBColor &value) const final override
Definition GraphicsBuffer.h:354
virtual void * mapMemory(size_t offset, size_t size) const =0
void get(uint04 index, uint04 vector_pos, bool &value) const final override
Definition GraphicsBuffer.h:329
void set(uint04 index, sint02 value) final override
Definition GraphicsBuffer.h:321
void get(uint04 index, uint04 vector_pos, sint02 &value) const final override
Definition GraphicsBuffer.h:335
virtual void removeIndices(uint04 location, uint04 size) override
Definition GraphicsBuffer.h:375
bool m_is_memory_owner
Definition GraphicsBuffer.h:514
void get(uint04 index, fltp04 &value) const final override
Definition GraphicsBuffer.h:351
virtual void cleanup()=0
void set(uint04 index, uint04 vector_pos, uint01 value) final override
Definition GraphicsBuffer.h:302
void get(uint04 index, uint04 vector_pos, uint08 &value) const final override
Definition GraphicsBuffer.h:333
void move(void *memory, const String &value) const
Definition GraphicsBuffer.h:124
void set(uint04 index, const String &value) final override
Definition GraphicsBuffer.h:326
virtual void mapToFile(BinaryFile &file, int compression) override
Definition GraphicsBuffer.h:91
void setUsage(Type type)
Definition GraphicsBuffer.h:78
virtual void unmapMemory() const =0
virtual void mapFromFile(BinaryFile &file, uint08 version_number) override
Definition GraphicsBuffer.h:96
void get(uint04 index, uint01 &value) const final override
Definition GraphicsBuffer.h:343
void get(uint04 index, bool &value) const final override
Definition GraphicsBuffer.h:342
void set(uint04 index, sint04 value) final override
Definition GraphicsBuffer.h:322
void get(uint04 index, sint02 &value) const final override
Definition GraphicsBuffer.h:348
void get(uint04 index, uint04 vector_pos, String &value) const final override
Definition GraphicsBuffer.h:340
Type m_internal_type
Definition GraphicsBuffer.h:511
void set(uint04 index, uint04 vector_pos, fltp04 value) final override
Definition GraphicsBuffer.h:310
void set(uint04 index, uint04 vector_pos, const String &value) final override
Definition GraphicsBuffer.h:313
void get(uint04 index, uint04 vector_pos, sint08 &value) const final override
Definition GraphicsBuffer.h:337
void get(uint04 index, sint08 &value) const final override
Definition GraphicsBuffer.h:350
void set(uint04 index, uint04 vector_pos, fltp08 value) final override
Definition GraphicsBuffer.h:311
uint04 capacity()
Definition GraphicsBuffer.h:392
bool beginsWith(uint04 index, const String &value, bool ignore_case) const override
Definition GraphicsBuffer.h:105
bool m_is_normalized
Definition GraphicsBuffer.h:513
void insert(uint04 index) override final
Definition GraphicsBuffer.h:389
void get(uint04 index, uint04 &value) const final override
Definition GraphicsBuffer.h:345
void getMemory(uint04 index, uint04 vector_pos, t_type &value) const
Definition GraphicsBuffer.h:242
void getMemory(uint04 index, t_type &value) const
Definition GraphicsBuffer.h:291
const void * begin() const final
Definition GraphicsBuffer.h:466
void set(uint04 index, uint08 value) final override
Definition GraphicsBuffer.h:319
uint04 m_allocated_size
Definition GraphicsBuffer.h:510
void move(void *memory, const t_type_b &value) const
Definition GraphicsBuffer.h:109
void set(uint04 index, uint01 value) final override
Definition GraphicsBuffer.h:316
void setMemory(const t_type *data_to_insert, uint04 offset, uint04 size)
Definition GraphicsBuffer.h:194
virtual void setAccessable(bool is_accessable, bool copy_existing)
Definition GraphicsBuffer.h:61
void set(uint04 index, bool value) final override
Definition GraphicsBuffer.h:315
void setRawMemory(uint04 index, const t_type &value)
Definition GraphicsBuffer.h:283
void set(uint04 index, uint04 vector_pos, sint04 value) final override
Definition GraphicsBuffer.h:308
void get(uint04 index, uint08 &value) const final override
Definition GraphicsBuffer.h:346
bool m_is_accessable
Definition GraphicsBuffer.h:512
void setMemory(uint04 index, const t_type &value)
Definition GraphicsBuffer.h:296
void set(uint04 index, sint08 value) final override
Definition GraphicsBuffer.h:323
void get(uint04 index, sint01 &value) const final override
Definition GraphicsBuffer.h:347
void removeRows(uint04 index, uint04 size) override final
Definition GraphicsBuffer.h:386
void set(uint04 index, uint04 vector_pos, sint02 value) final override
Definition GraphicsBuffer.h:307
bool isSame(uint04 index, const String &value) const override
Definition GraphicsBuffer.h:101
void setMemory(uint04 index, uint04 vector_pos, const t_type &value)
Definition GraphicsBuffer.h:147
void set(uint04 index, uint04 vector_pos, uint02 value) final override
Definition GraphicsBuffer.h:303
void get(uint04 index, uint04 vector_pos, uint04 &value) const final override
Definition GraphicsBuffer.h:332
void set(uint04 index, uint02 value) final override
Definition GraphicsBuffer.h:317
void * end() final
Definition GraphicsBuffer.h:464
void set(uint04 index, fltp08 value) final override
Definition GraphicsBuffer.h:325
virtual void mapToFile(BinaryFile &file, BinaryCompressionObject &object) override
Definition GraphicsBuffer.h:86
void * begin() final
Definition GraphicsBuffer.h:463
bool contains(uint04 index, const String &value, bool ignore_case) const override
Definition GraphicsBuffer.h:103
void set(uint04 index, uint04 value) final override
Definition GraphicsBuffer.h:318
Represents a color in the RGB space with optional alpha transparency.
Definition RGBColor.h:54
The core String class for the NDEVR API.
Definition String.h:69
t_type getAs() const
Converts a string into an object. To use this function an object must have overwritten StringStream<t...
Definition String.h:143
A virtual storage type that is used with Table class to store data where the actual mechanism for sto...
Definition TableColumn.h:76
TypeInfo m_type
Definition TableColumn.h:617
virtual void insertRows(uint04 location, uint04 size)=0
virtual void setSize(uint04 size)=0
const String & label() const
virtual TypeInfo type() const
Definition TableColumn.h:86
Stores information about a type, relevant for certain templated functions. To get information about a...
Definition TypeInfo.h:43
bool is_number
Definition TypeInfo.h:61
bool is_unsigned
Definition TypeInfo.h:62
uint02 byte_size
Definition TypeInfo.h:58
uint02 vector_size
Definition TypeInfo.h:59
bool is_float
Definition TypeInfo.h:63
Definition ACIColor.h:37
int32_t sint04
-Defines an alias representing a 4 byte, signed integer. -Can represent exact integer values -2147483...
Definition BaseValues.hpp:64
constexpr std::enable_if<!ObjectInfo< t_type >::Buffer, TypeInfo >::type GetTypeInfo()
Definition TypeInfo.h:103
int64_t sint08
-Defines an alias representing an 8 byte, signed integer -Can represent exact integer values -9223372...
Definition BaseValues.hpp:71
float fltp04
Defines an alias representing a 4 byte floating-point number Bit layout is as follows: -Sign: 1 bit a...
Definition BaseValues.hpp:127
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:80
int8_t sint01
-Defines an alias representing a 1 byte, signed integer. -Can represent exact integer values -127 thr...
Definition BaseValues.hpp:50
int16_t sint02
-Defines an alias representing a 2 byte, signed integer. -Can represent exact integer values -32767 t...
Definition BaseValues.hpp:57
uint64_t uint08
-Defines an alias representing an 8 byte, unsigned integer
Definition BaseValues.hpp:106
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:96
constexpr t_to cast(const Angle< t_from > &value)
Definition Angle.h:375
uint16_t uint02
-Defines an alias representing a 2 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:88
double fltp08
Defines an alias representing an 8 byte floating-point number.
Definition BaseValues.hpp:149
A container for storing compressed data, typically used for File IO operations. Responsible for stori...
Definition Compressor.h:52