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{
39 {
40 public:
48
49 public:
52
53
54 virtual void cleanup() = 0;
55 virtual void setAccessable(bool is_accessable, bool copy_existing)
56 {
57 if (m_allocated_size == 0)
58 {
59 m_is_accessable = is_accessable;
60 return;
61 }
62 if (m_is_accessable == is_accessable)
63 return;
64 if (!is_accessable)
65 sendToVideoCard(copy_existing);
66 else
67 getFromVideoCard(copy_existing);
68 m_is_accessable = is_accessable;
69 }
70
71 bool isAccessable() const { return m_is_accessable; };
73 {
75 }
76 virtual void compress(BinaryCompressionObject& object) override
77 {
78 UNUSED(object);
79 }
80 virtual void mapToFile(BinaryFile& file, BinaryCompressionObject& object) override
81 {
82 UNUSED(file);
83 UNUSED(object);
84 }
85 virtual void mapToFile(BinaryFile& file, int compression) override
86 {
87 UNUSED(file);
88 UNUSED(compression);
89 }
90 virtual void mapFromFile(BinaryFile& file, uint08 version_number) override
91 {
92 UNUSED(file);
93 UNUSED(version_number);
94 }
95 [[nodiscard]] bool isSame(uint04 index, const String& value) const override { UNUSED(index); UNUSED(value); return false; }
96 [[nodiscard]] bool isSame(uint04 index, const char* value) const override { UNUSED(index); UNUSED(value); return false; }
97 [[nodiscard]] bool contains(uint04 index, const String& value, bool ignore_case) const override { UNUSED(index); UNUSED(value); UNUSED(ignore_case); return false; }
98 [[nodiscard]] bool contains(uint04 index, const char* value, bool ignore_case) const override { UNUSED(index); UNUSED(value); UNUSED(ignore_case); return false; }
99 [[nodiscard]] bool beginsWith(uint04 index, const String& value, bool ignore_case) const override { UNUSED(index); UNUSED(value); UNUSED(ignore_case); return false; }
100 [[nodiscard]] bool beginsWith(uint04 index, const char* value, bool ignore_case) const override { UNUSED(index); UNUSED(value); UNUSED(ignore_case); return false; }
101 virtual TableColumn* getSelected(const Buffer<bool>&) const override { return nullptr; }
102 template<class t_type_a, class t_type_b>
103 void move(void* memory, const t_type_b& value) const
104 {
105 t_type_a new_value = cast<t_type_a>(value);
106 memcpy(memory, &new_value, sizeof(t_type_a));
107 }
108
109 template<class t_type_a, class t_type_b>
110 void move(t_type_b& value, void* memory) const
111 {
112 t_type_a new_value;
113 memcpy(&new_value, memory, sizeof(t_type_a));
114 value = cast<t_type_b>(new_value);
115 }
116
117 template<class t_type_a>
118 void move(void* memory, const String& value) const
119 {
120 t_type_a new_value = value.getAs<t_type_a>();
121 memcpy(memory, &new_value, sizeof(t_type_a));
122 }
123
124 template<class t_type_a, class t_type_b>
125 void get(void* memory, t_type_b& value)
126 {
127 t_type_a new_value;
128 memcpy(&new_value, memory, sizeof(t_type_a));
129 value = cast<t_type_b>(new_value);
130 }
131
132 template<class t_type_a>
133 void get(void* memory, String& value)
134 {
135 t_type_a new_value;
136 memcpy(&new_value, memory, sizeof(t_type_a));
137 value = String(new_value);
138 }
139
140 template<class t_type>
141 void setMemory(uint04 index, uint04 vector_pos, const t_type& value)
142 {
143 lib_assert(m_is_accessable, "Tried to edit unaccessible vertex");
144 void* temp_value = mapMemory(index * type().total_size + vector_pos * type().byte_size, type().total_size);
145 setMemory(temp_value, value);
146 unmapMemory();
147 }
148
149 template<class t_type>
150 void setMemory(void* temp_value, const t_type& value)
151 {
152 switch (type().byte_size)
153 {
154 case 1:
155 if (type().is_unsigned)
156 move<uint01>(temp_value, value);
157 else
158 move<sint01>(temp_value, value);
159 break;
160 case 2:
161 if (type().is_unsigned)
162 move<uint02>(temp_value, value);
163 else
164 move<sint02>(temp_value, value);
165 break;
166 case 4:
167 if (type().is_float)
168 move<fltp04>(temp_value, value);
169 else if (type().is_unsigned)
170 move<uint04>(temp_value, value);
171 else
172 move<sint04>(temp_value, value);
173 break;
174 case 8:
175 if (type().is_float)
176 move<fltp08>(temp_value, value);
177 else if (type().is_unsigned)
178 move<uint08>(temp_value, value);
179 else
180 move<sint08>(temp_value, value);
181 break;
182 default:
183 lib_assert(false, "Bad type");
184 }
185 }
186
187 template<class t_type>
188 void setMemory(const t_type* data_to_insert, uint04 offset, uint04 size)
189 {
190 lib_assert(m_is_accessable, "Tried to edit unaccessible vertex");
191 switch (type().byte_size)
192 {
193 case 1:
194 if (type().is_unsigned)
195 _setRawData<uint01, t_type>(data_to_insert, offset, size);
196 else
197 _setRawData<sint01, t_type>(data_to_insert, offset, size);
198 break;
199 case 2:
200 if (type().is_unsigned)
201 _setRawData<uint02, t_type>(data_to_insert, offset, size);
202 else
203 _setRawData<sint02, t_type>(data_to_insert, offset, size);
204 break;
205 case 4:
206 if (type().is_float)
207 _setRawData<fltp04, t_type>(data_to_insert, offset, size);
208 else if (type().is_unsigned)
209 _setRawData<uint04, t_type>(data_to_insert, offset, size);
210 else
211 _setRawData<sint04, t_type>(data_to_insert, offset, size);
212 break;
213 case 8:
214 if (type().is_float)
215 _setRawData<fltp08, t_type>(data_to_insert, offset, size);
216 else if (type().is_unsigned)
217 _setRawData<uint08, t_type>(data_to_insert, offset, size);
218 else
219 _setRawData<sint08, t_type>(data_to_insert, offset, size);
220 break;
221 case 16:
222 if (type().is_float)
223 _setRawData<fltp04, t_type>(data_to_insert, offset, size);
224 else if (type().is_unsigned)
225 _setRawData<uint04, t_type>(data_to_insert, offset, size);
226 else
227 _setRawData<sint04, t_type>(data_to_insert, offset, size);
228 break;
229 default:
230 lib_assert(false, "unknown type");
231 }
232 lib_assert(m_is_accessable, "Tried to edit unaccessible vertex");
233 }
234
235 template<class t_type>
236 void getMemory(uint04 index, uint04 vector_pos, t_type& value) const
237 {
238 lib_assert(m_is_accessable, "Tried to edit unaccessible vertex");
239 void* temp_value = mapMemory(index * type().total_size + vector_pos * type().byte_size, type().byte_size);
240 switch (type().byte_size)
241 {
242 case 1:
243 if (type().is_unsigned)
244 move<uint01>(value, temp_value);
245 else
246 move<sint01>(value, temp_value);
247 break;
248 case 2:
249 if (type().is_unsigned)
250 move<uint02>(value, temp_value);
251 else
252 move<sint02>(value, temp_value);
253 break;
254 case 4:
255 if (type().is_float)
256 move<fltp04>(value, temp_value);
257 else if (type().is_unsigned)
258 move<uint04>(value, temp_value);
259 else
260 move<sint04>(value, temp_value);
261 break;
262 case 8:
263 if (type().is_float)
264 move<fltp08>(value, temp_value);
265 else if (type().is_unsigned)
266 move<uint08>(value, temp_value);
267 else
268 move<sint08>(value, temp_value);
269 break;
270 default:
271 lib_assert(false, "Bad type");
272 }
273 unmapMemory();
274 lib_assert(m_is_accessable, "Tried to edit unaccessible vertex");
275 }
276 template<class t_type>
277 void setRawMemory(uint04 index, const t_type& value)
278 {
279 lib_assert(m_is_accessable, "Tried to edit unaccessible vertex");
280 void* temp_value = mapMemory(index * type().total_size, type().total_size);
281 move<t_type>(temp_value, value);
282 unmapMemory();
283 }
284 template<class t_type>
285 void getMemory(uint04 index, t_type& value) const
286 {
287 getMemory(index, 0, value);
288 }
289 template<class t_type>
290 void setMemory(uint04 index, const t_type& value)
291 {
292 setMemory(index, 0, value);
293 }
294
295 void set(uint04 index, uint04 vector_pos, bool value) final override { setMemory(index, vector_pos, value); };
296 void set(uint04 index, uint04 vector_pos, uint01 value) final override { setMemory(index, vector_pos, value); };
297 void set(uint04 index, uint04 vector_pos, uint02 value) final override { setMemory(index, vector_pos, value); };
298 void set(uint04 index, uint04 vector_pos, uint04 value) final override { setMemory(index, vector_pos, value); };
299 void set(uint04 index, uint04 vector_pos, uint08 value) final override { setMemory(index, vector_pos, value); };
300 void set(uint04 index, uint04 vector_pos, sint01 value) final override { setMemory(index, vector_pos, value); };
301 void set(uint04 index, uint04 vector_pos, sint02 value) final override { setMemory(index, vector_pos, value); };
302 void set(uint04 index, uint04 vector_pos, sint04 value) final override { setMemory(index, vector_pos, value); };
303 void set(uint04 index, uint04 vector_pos, sint08 value) final override { setMemory(index, vector_pos, value); };
304 void set(uint04 index, uint04 vector_pos, fltp04 value) final override { setMemory(index, vector_pos, value); };
305 void set(uint04 index, uint04 vector_pos, fltp08 value) final override { setMemory(index, vector_pos, value); };
306
307 void set(uint04 index, uint04 vector_pos, const String& value) final override { setMemory(index, vector_pos, value); };
308
309 void set(uint04 index, bool value) final override { setMemory(index, value); };
310 void set(uint04 index, uint01 value) final override { setMemory(index, value); };
311 void set(uint04 index, uint02 value) final override { setMemory(index, value); };
312 void set(uint04 index, uint04 value) final override { setMemory(index, value); };
313 void set(uint04 index, uint08 value) final override { setMemory(index, value); };
314 void set(uint04 index, sint01 value) final override { setMemory(index, value); };
315 void set(uint04 index, sint02 value) final override { setMemory(index, value); };
316 void set(uint04 index, sint04 value) final override { setMemory(index, value); };
317 void set(uint04 index, sint08 value) final override { setMemory(index, value); };
318 void set(uint04 index, fltp04 value) final override { setMemory(index, value); };
319 void set(uint04 index, fltp08 value) final override { setMemory(index, value); };
320 void set(uint04 index, const String& value) final override { setMemory(index, value); };
321 void set(uint04 index, RGBColor value) final override { UNUSED(index); UNUSED(value);/*setMemory(index, value);*/ };
322
323 void get(uint04 index, uint04 vector_pos, bool& value) const final override { getMemory(index, vector_pos, value); };
324 void get(uint04 index, uint04 vector_pos, uint01& value) const final override { getMemory(index, vector_pos, value); };
325 void get(uint04 index, uint04 vector_pos, uint02& value) const final override { getMemory(index, vector_pos, value); };
326 void get(uint04 index, uint04 vector_pos, uint04& value) const final override { getMemory(index, vector_pos, value); };
327 void get(uint04 index, uint04 vector_pos, uint08& value) const final override { getMemory(index, vector_pos, value); };
328 void get(uint04 index, uint04 vector_pos, sint01& value) const final override { getMemory(index, vector_pos, value); };
329 void get(uint04 index, uint04 vector_pos, sint02& value) const final override { getMemory(index, vector_pos, value); };
330 void get(uint04 index, uint04 vector_pos, sint04& value) const final override { getMemory(index, vector_pos, value); };
331 void get(uint04 index, uint04 vector_pos, sint08& value) const final override { getMemory(index, vector_pos, value); };
332 void get(uint04 index, uint04 vector_pos, fltp04& value) const final override { getMemory(index, vector_pos, value); };
333 void get(uint04 index, uint04 vector_pos, fltp08& value) const final override { getMemory(index, vector_pos, value); };
334 void get(uint04 index, uint04 vector_pos, String& value) const final override { getMemory(index, vector_pos, value); };
335
336 void get(uint04 index, bool& value) const final override { getMemory(index, value); };
337 void get(uint04 index, uint01& value) const final override { getMemory(index, value); };
338 void get(uint04 index, uint02& value) const final override { getMemory(index, value); };
339 void get(uint04 index, uint04& value) const final override { getMemory(index, value); };
340 void get(uint04 index, uint08& value) const final override { getMemory(index, value); };
341 void get(uint04 index, sint01& value) const final override { getMemory(index, value); };
342 void get(uint04 index, sint02& value) const final override { getMemory(index, value); };
343 void get(uint04 index, sint04& value) const final override { getMemory(index, value); };
344 void get(uint04 index, sint08& value) const final override { getMemory(index, value); };
345 void get(uint04 index, fltp04& value) const final override { getMemory(index, value); };
346 void get(uint04 index, fltp08& value) const final override { getMemory(index, value); };
347 void get(uint04 index, String& value) const final override { getMemory(index, value); };
348 void get(uint04 index, RGBColor& value) const final override { UNUSED(index); UNUSED(value);/*getMemory(index, value);*/ };
349
350 virtual void copyRow(uint04 source, uint04 destination) override
351 {
352 UNUSED(source);
353 UNUSED(destination);
354 lib_assert(false, "Not yet implemented");
355 }
356 virtual void copyRows(uint04 source, uint04 destination, uint04 size) override
357 {
358 UNUSED(source);
359 UNUSED(destination);
360 UNUSED(size);
361 lib_assert(false, "Not yet implemented");
362 }
363 virtual void insertIndices(uint04 location, uint04 size) override
364 {
365 UNUSED(location);
366 UNUSED(size);
367 lib_assert(false, "Not yet implemented");
368 }
369 virtual void removeIndices(uint04 location, uint04 size) override
370 {
371 UNUSED(location);
372 UNUSED(size);
373 lib_assert(false, "Not yet implemented");
374 }
375 void removeIndices(const Buffer<uint04>& offset_lookup_list) override final { UNUSED(offset_lookup_list); };
376 uint04 size() const final override { return m_size; }
377
378 NDEVR_GRAPHICS_API virtual void updateFrom(const TableColumn& column) override;
379 void removeRow(uint04 index) override final { UNUSED(index); };
380 void removeRows(uint04 index, uint04 size) override final { UNUSED(index); UNUSED(size); };
381 void removeRows(const Buffer<uint04>& indices) override final { UNUSED(indices); };
382 void removeRows(uint04 offset, const Buffer<bool>& indices) override { UNUSED(offset); UNUSED(indices); }
383 void insert(uint04 index) override final { insertRows(index, 1); };
384 virtual void copyData(const TableColumn& reference_data, bool set_type) = 0;
387 template<class t_type>
388 void setData(const t_type* begin, const t_type* end, bool set_type)
389 {
390 if (set_type && m_type != GetTypeInfo<t_type>())
391 {
392 cleanup();
394 }
396 setSize(size);
397 if (size != 0)
398 {
399 TypeInfo insertion_type = GetTypeInfo<t_type>();
400 if (insertion_type.is_number)
401 {
402 if (insertion_type.vector_size > 0)
403 size = size * insertion_type.vector_size;
404 switch (insertion_type.byte_size)
405 {
406 case 1:
407 if (insertion_type.is_unsigned)
408 setMemory((uint01*)begin, 0, size);
409 else
410 setMemory((sint01*)begin, 0, size);
411 break;
412 case 2:
413 if (insertion_type.is_unsigned)
414 setMemory((uint02*)begin, 0, size);
415 else
416 setMemory((sint02*)begin, 0, size);
417 break;
418 case 4:
419 if (insertion_type.is_float)
420 setMemory((fltp04*)begin, 0, size);
421 else if (insertion_type.is_unsigned)
422 setMemory((uint04*)begin, 0, size);
423 else
424 setMemory((sint04*)begin, 0, size);
425 break;
426 case 8:
427 if (insertion_type.is_float)
428 setMemory((fltp08*)begin, 0, size);
429 else if (insertion_type.is_unsigned)
430 setMemory((uint08*)begin, 0, size);
431 else
432 setMemory((sint08*)begin, 0, size);
433 break;
434 case 16://
435 if (insertion_type.is_float)
436 setMemory((fltp04*)begin, 0, size);
437 else if (insertion_type.is_unsigned)
438 setMemory((uint04*)begin, 0, size);
439 else
440 setMemory((sint04*)begin, 0, size);
441 break;
442 default:
443 lib_assert(false, "unknown buffer format");
444 break;
445 }
446 }
447 else
448 {
449 lib_assert(insertion_type == m_type, "unexpected vertex insertion");
451 }
452 }
453 lib_assert(m_is_accessable, "Tried to edit unaccessible vertex");
454 }
455
456
457 void* begin() final { return nullptr; };
458 void* end() final { return nullptr; };
459
460 const void* begin() const final { return nullptr; };
461 const void* end() const final { return nullptr; };
462 protected:
463 virtual void getFromVideoCard(bool copy_existing) = 0;
464 virtual void sendToVideoCard(bool copy_existing) = 0;
465#if _MSC_VER
466#pragma warning( disable : 4244)
467#endif
468 template<class t_convert_type, class t_type>
469 void _setRawData(const t_type* begin, uint04 offset, uint04 size)
470 {
471 void* data = mapMemory(cast<size_t>(offset) * type().byte_size, size * type().byte_size);
472 if constexpr (std::is_same<t_convert_type, t_type>())
473 {
474 memcpy((uint01*)data, (uint01*)begin, size * type().byte_size);
475 }
476 else
477 {
478 for (uint04 i = 0; i < size; i++)
479 {
480 t_convert_type conversion(*(begin + i));
481 memcpy((uint01*)(data)+type().byte_size * i, &conversion, sizeof(t_convert_type));
482 }
483 }
484 unmapMemory();
485 }
486#if _MSC_VER
487#pragma warning( default : 4244)
488#endif
489 template<class t_type>
490 void getData(t_type* data_to_get, uint04 offset, uint04 size)
491 {
492 void* data = mapMemory(offset * type().total_size, size * type().total_size);
493 memcpy(data_to_get, data, size * type().total_size);
494 unmapMemory();
495 }
496
497 virtual void* mapMemory(size_t offset, size_t size) const = 0;
498 virtual void unmapMemory() const = 0;
499 virtual void updateRegion(const TableColumn& reference_data, uint04 offset, uint04 size) = 0;
500 protected:
507 };
508}
#define UNUSED(expr)
Definition BaseValues.hpp:428
#define lib_assert(expression, message)
Asserts some logic in the code. Disabled in non debug mode by default. Can be re-enabled in release u...
Definition LibAssert.h:70
#define NDEVR_GRAPHICS_API
Definition DLLInfo.h:74
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:59
Definition GraphicsBuffer.h:39
bool beginsWith(uint04 index, const char *value, bool ignore_case) const override
Definition GraphicsBuffer.h:100
virtual TableColumn * getSelected(const Buffer< bool > &) const override
Definition GraphicsBuffer.h:101
void removeRow(uint04 index) override final
Definition GraphicsBuffer.h:379
void get(uint04 index, uint04 vector_pos, fltp08 &value) const final override
Definition GraphicsBuffer.h:333
void removeIndices(const Buffer< uint04 > &offset_lookup_list) override final
Definition GraphicsBuffer.h:375
void get(uint04 index, fltp08 &value) const final override
Definition GraphicsBuffer.h:346
void get(uint04 index, uint04 vector_pos, fltp04 &value) const final override
Definition GraphicsBuffer.h:332
void get(uint04 index, uint02 &value) const final override
Definition GraphicsBuffer.h:338
void get(void *memory, String &value)
Definition GraphicsBuffer.h:133
void setMemory(void *temp_value, const t_type &value)
Definition GraphicsBuffer.h:150
void set(uint04 index, uint04 vector_pos, sint08 value) final override
Definition GraphicsBuffer.h:303
virtual void sendToVideoCard(bool copy_existing)=0
virtual void insertIndices(uint04 location, uint04 size) override
Definition GraphicsBuffer.h:363
void setData(const t_type *begin, const t_type *end, bool set_type)
Definition GraphicsBuffer.h:388
void set(uint04 index, RGBColor value) final override
Definition GraphicsBuffer.h:321
void get(uint04 index, uint04 vector_pos, sint01 &value) const final override
Definition GraphicsBuffer.h:328
bool isAccessable() const
Definition GraphicsBuffer.h:71
Type
Definition GraphicsBuffer.h:42
@ VERTEX
Definition GraphicsBuffer.h:43
@ INDEX
Definition GraphicsBuffer.h:45
@ UNIFORM
Definition GraphicsBuffer.h:44
@ INSTANCE
Definition GraphicsBuffer.h:46
void getData(t_type *data_to_get, uint04 offset, uint04 size)
Definition GraphicsBuffer.h:490
virtual void copyRow(uint04 source, uint04 destination) override
Definition GraphicsBuffer.h:350
void removeRows(const Buffer< uint04 > &indices) override final
Definition GraphicsBuffer.h:381
void get(uint04 index, uint04 vector_pos, uint01 &value) const final override
Definition GraphicsBuffer.h:324
virtual void copyRows(uint04 source, uint04 destination, uint04 size) override
Definition GraphicsBuffer.h:356
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:300
void _setRawData(const t_type *begin, uint04 offset, uint04 size)
Definition GraphicsBuffer.h:469
virtual void getFromVideoCard(bool copy_existing)=0
void set(uint04 index, fltp04 value) final override
Definition GraphicsBuffer.h:318
virtual void compress(BinaryCompressionObject &object) override
Definition GraphicsBuffer.h:76
const void * end() const final
Definition GraphicsBuffer.h:461
NDEVR_GRAPHICS_API void setType(const TypeInfo &type)
Definition GraphicsBuffer.cpp:80
void get(uint04 index, String &value) const final override
Definition GraphicsBuffer.h:347
void set(uint04 index, uint04 vector_pos, uint04 value) final override
Definition GraphicsBuffer.h:298
void set(uint04 index, uint04 vector_pos, bool value) final override
Definition GraphicsBuffer.h:295
NDEVR_GRAPHICS_API GraphicsBuffer(const String &label)
Definition GraphicsBuffer.cpp:5
void set(uint04 index, sint01 value) final override
Definition GraphicsBuffer.h:314
uint04 m_size
Definition GraphicsBuffer.h:501
void get(void *memory, t_type_b &value)
Definition GraphicsBuffer.h:125
void get(uint04 index, uint04 vector_pos, uint02 &value) const final override
Definition GraphicsBuffer.h:325
void move(t_type_b &value, void *memory) const
Definition GraphicsBuffer.h:110
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:98
void removeRows(uint04 offset, const Buffer< bool > &indices) override
Definition GraphicsBuffer.h:382
void get(uint04 index, uint04 vector_pos, sint04 &value) const final override
Definition GraphicsBuffer.h:330
bool isSame(uint04 index, const char *value) const override
Definition GraphicsBuffer.h:96
void set(uint04 index, uint04 vector_pos, uint08 value) final override
Definition GraphicsBuffer.h:299
uint04 size() const final override
Definition GraphicsBuffer.h:376
void get(uint04 index, sint04 &value) const final override
Definition GraphicsBuffer.h:343
void get(uint04 index, RGBColor &value) const final override
Definition GraphicsBuffer.h:348
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:323
void set(uint04 index, sint02 value) final override
Definition GraphicsBuffer.h:315
void get(uint04 index, uint04 vector_pos, sint02 &value) const final override
Definition GraphicsBuffer.h:329
virtual void removeIndices(uint04 location, uint04 size) override
Definition GraphicsBuffer.h:369
bool m_is_memory_owner
Definition GraphicsBuffer.h:506
void get(uint04 index, fltp04 &value) const final override
Definition GraphicsBuffer.h:345
virtual void cleanup()=0
void set(uint04 index, uint04 vector_pos, uint01 value) final override
Definition GraphicsBuffer.h:296
void get(uint04 index, uint04 vector_pos, uint08 &value) const final override
Definition GraphicsBuffer.h:327
void move(void *memory, const String &value) const
Definition GraphicsBuffer.h:118
void set(uint04 index, const String &value) final override
Definition GraphicsBuffer.h:320
virtual void mapToFile(BinaryFile &file, int compression) override
Definition GraphicsBuffer.h:85
void setUsage(Type type)
Definition GraphicsBuffer.h:72
virtual void unmapMemory() const =0
virtual void mapFromFile(BinaryFile &file, uint08 version_number) override
Definition GraphicsBuffer.h:90
void get(uint04 index, uint01 &value) const final override
Definition GraphicsBuffer.h:337
void get(uint04 index, bool &value) const final override
Definition GraphicsBuffer.h:336
void set(uint04 index, sint04 value) final override
Definition GraphicsBuffer.h:316
void get(uint04 index, sint02 &value) const final override
Definition GraphicsBuffer.h:342
void get(uint04 index, uint04 vector_pos, String &value) const final override
Definition GraphicsBuffer.h:334
Type m_internal_type
Definition GraphicsBuffer.h:503
void set(uint04 index, uint04 vector_pos, fltp04 value) final override
Definition GraphicsBuffer.h:304
void set(uint04 index, uint04 vector_pos, const String &value) final override
Definition GraphicsBuffer.h:307
void get(uint04 index, uint04 vector_pos, sint08 &value) const final override
Definition GraphicsBuffer.h:331
void get(uint04 index, sint08 &value) const final override
Definition GraphicsBuffer.h:344
void set(uint04 index, uint04 vector_pos, fltp08 value) final override
Definition GraphicsBuffer.h:305
uint04 capacity()
Definition GraphicsBuffer.h:386
bool beginsWith(uint04 index, const String &value, bool ignore_case) const override
Definition GraphicsBuffer.h:99
bool m_is_normalized
Definition GraphicsBuffer.h:505
void insert(uint04 index) override final
Definition GraphicsBuffer.h:383
void get(uint04 index, uint04 &value) const final override
Definition GraphicsBuffer.h:339
void getMemory(uint04 index, uint04 vector_pos, t_type &value) const
Definition GraphicsBuffer.h:236
void getMemory(uint04 index, t_type &value) const
Definition GraphicsBuffer.h:285
const void * begin() const final
Definition GraphicsBuffer.h:460
void set(uint04 index, uint08 value) final override
Definition GraphicsBuffer.h:313
uint04 m_allocated_size
Definition GraphicsBuffer.h:502
void move(void *memory, const t_type_b &value) const
Definition GraphicsBuffer.h:103
void set(uint04 index, uint01 value) final override
Definition GraphicsBuffer.h:310
void setMemory(const t_type *data_to_insert, uint04 offset, uint04 size)
Definition GraphicsBuffer.h:188
virtual void setAccessable(bool is_accessable, bool copy_existing)
Definition GraphicsBuffer.h:55
void set(uint04 index, bool value) final override
Definition GraphicsBuffer.h:309
void setRawMemory(uint04 index, const t_type &value)
Definition GraphicsBuffer.h:277
void set(uint04 index, uint04 vector_pos, sint04 value) final override
Definition GraphicsBuffer.h:302
virtual NDEVR_GRAPHICS_API void updateFrom(const TableColumn &column) override
Definition GraphicsBuffer.cpp:25
void get(uint04 index, uint08 &value) const final override
Definition GraphicsBuffer.h:340
bool m_is_accessable
Definition GraphicsBuffer.h:504
void setMemory(uint04 index, const t_type &value)
Definition GraphicsBuffer.h:290
void set(uint04 index, sint08 value) final override
Definition GraphicsBuffer.h:317
void get(uint04 index, sint01 &value) const final override
Definition GraphicsBuffer.h:341
void removeRows(uint04 index, uint04 size) override final
Definition GraphicsBuffer.h:380
void set(uint04 index, uint04 vector_pos, sint02 value) final override
Definition GraphicsBuffer.h:301
bool isSame(uint04 index, const String &value) const override
Definition GraphicsBuffer.h:95
void setMemory(uint04 index, uint04 vector_pos, const t_type &value)
Definition GraphicsBuffer.h:141
void set(uint04 index, uint04 vector_pos, uint02 value) final override
Definition GraphicsBuffer.h:297
void get(uint04 index, uint04 vector_pos, uint04 &value) const final override
Definition GraphicsBuffer.h:326
void set(uint04 index, uint02 value) final override
Definition GraphicsBuffer.h:311
void * end() final
Definition GraphicsBuffer.h:458
void set(uint04 index, fltp08 value) final override
Definition GraphicsBuffer.h:319
virtual void mapToFile(BinaryFile &file, BinaryCompressionObject &object) override
Definition GraphicsBuffer.h:80
void * begin() final
Definition GraphicsBuffer.h:457
bool contains(uint04 index, const String &value, bool ignore_case) const override
Definition GraphicsBuffer.h:97
void set(uint04 index, uint04 value) final override
Definition GraphicsBuffer.h:312
Represents a color in the RGB space with optional alpha transparency.
Definition RGBColor.h:53
The core String class for the software.
Definition String.h:47
t_type getAs() const
Definition String.h:341
Definition TableColumn.h:68
TypeInfo m_type
Definition TableColumn.h:609
virtual void insertRows(uint04 location, uint04 size)=0
virtual void setSize(uint04 size)=0
const String & label() const
Definition TableColumn.cpp:303
virtual TypeInfo type() const
Definition TableColumn.h:78
Stores information about a type, relevant for certain templated functions.
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:71
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:81
float fltp04
Defines an alias representing a 4 byte floating-point number.
Definition BaseValues.hpp:152
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:93
int8_t sint01
-Defines an alias representing a 1 byte, signed integer. -Can represent exact integer values -127 thr...
Definition BaseValues.hpp:51
int16_t sint02
-Defines an alias representing a 2 byte, signed integer. -Can represent exact integer values -32767 t...
Definition BaseValues.hpp:61
uint64_t uint08
-Defines an alias representing an 8 byte, unsigned integer -Can represent exact integer values 0 thro...
Definition BaseValues.hpp:127
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:115
constexpr t_to cast(const Angle< t_from > &value)
Definition Angle.h:510
uint16_t uint02
-Defines an alias representing a 2 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:104
double fltp08
Defines an alias representing an 8 byte floating-point number.
Definition BaseValues.hpp:176
fltp08 conversion(fltp08 t)
Definition LABColor.cpp:15
A container for storing compressed data, typically used for FileIO operations.
Definition Compressor.h:50