102 template<
class t_type_a,
class t_type_b>
103 void move(
void* memory,
const t_type_b& value)
const
106 memcpy(memory, &new_value,
sizeof(t_type_a));
109 template<
class t_type_a,
class t_type_b>
110 void move(t_type_b& value,
void* memory)
const
113 memcpy(&new_value, memory,
sizeof(t_type_a));
117 template<
class t_type_a>
120 t_type_a new_value = value.
getAs<t_type_a>();
121 memcpy(memory, &new_value,
sizeof(t_type_a));
124 template<
class t_type_a,
class t_type_b>
125 void get(
void* memory, t_type_b& value)
128 memcpy(&new_value, memory,
sizeof(t_type_a));
132 template<
class t_type_a>
136 memcpy(&new_value, memory,
sizeof(t_type_a));
137 value =
String(new_value);
140 template<
class t_type>
144 void* temp_value =
mapMemory(index *
type().total_size + vector_pos *
type().byte_size,
type().total_size);
149 template<
class t_type>
152 switch (
type().byte_size)
155 if (
type().is_unsigned)
161 if (
type().is_unsigned)
169 else if (
type().is_unsigned)
177 else if (
type().is_unsigned)
187 template<
class t_type>
191 switch (
type().byte_size)
194 if (
type().is_unsigned)
200 if (
type().is_unsigned)
208 else if (
type().is_unsigned)
216 else if (
type().is_unsigned)
224 else if (
type().is_unsigned)
235 template<
class t_type>
239 void* temp_value =
mapMemory(index *
type().total_size + vector_pos *
type().byte_size,
type().byte_size);
240 switch (
type().byte_size)
243 if (
type().is_unsigned)
249 if (
type().is_unsigned)
257 else if (
type().is_unsigned)
265 else if (
type().is_unsigned)
276 template<
class t_type>
284 template<
class t_type>
289 template<
class t_type>
387 template<
class t_type>
457 void*
begin() final {
return nullptr; };
458 void*
end() final {
return nullptr; };
460 const void*
begin() const final {
return nullptr; };
461 const void*
end() const final {
return nullptr; };
466#pragma warning( disable : 4244)
468 template<
class t_convert_type,
class t_type>
472 if constexpr (std::is_same<t_convert_type, t_type>())
487#pragma warning( default : 4244)
489 template<
class t_type>
493 memcpy(data_to_get, data,
size *
type().total_size);
#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
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
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
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