34#include <NDEVR/String.h>
35#include <NDEVR/Time.h>
36#include <NDEVR/File.h>
37#include <NDEVR/UUID.h>
38#include <NDEVR/Vector.h>
39#include <NDEVR/TranslatedString.h>
40#include <NDEVR/TypeInfo.h>
41#include <NDEVR/RGBColor.h>
42#include <NDEVR/BitFlag.h>
43#include <NDEVR/Compressor.h>
144 template<
class t_
class>
145 typename std::enable_if<!ObjectInfo<t_class>::Enum>
::type set(
uint04 index,
const t_class& value);
150 template<std::
size_t N>
184 template<
class t_po
inter_type>
193 template<
class t_po
inter_type>
428 template<u
int01 t_dims,
class t_type>
431 lib_assert(
type().vector_size == t_dims * 3,
"Unexpected vector size write to column");
432 for (
uint01 i = 0; i < 3; i++)
433 for (
uint01 n = 0; n < t_dims; n++)
434 set(index, 3 * i + n, value[i][n]);
442 template<u
int01 t_dims,
class t_type>
445 lib_assert(
type().vector_size == t_dims * 2,
"Unexpected vector size write to column");
446 for (
uint01 i = 0; i < 2; i++)
447 for (
uint01 n = 0; n < t_dims; n++)
448 set(index, t_dims * i + n, value[i][n]);
455 template<
class t_type, u
int01 t_col, u
int01 t_row>
458 lib_assert(
type().vector_size == t_col * t_row,
"Unexpected vector size write to column");
459 for (
uint01 col = 0; col < t_col; col++)
460 for (
uint01 row = 0; row < t_row; row++)
461 set(index, col * t_row + row, matrix[col][row]);
468 template<
class t_
class>
469 typename std::enable_if<IsVec<t_class>::value>
::type set(
uint04 index,
const t_class& value)
471 if (t_class::NumberOfDimensions() == 1)
472 set(index, value[0]);
481 template<
class t_
class>
482 typename std::enable_if<ObjectInfo<t_class>::Enum>
::type set(
uint04 index,
const t_class& value)
484 lib_assert(
type().vector_size == 0,
"Unexpected vector size write to column");
493 set(index, bitflag.bits());
507 template<
class t_type>
512 memcpy(((t_type*)
begin()) + start_index, values,
size *
sizeof(t_type));
516 set(i + start_index, values[i]);
523 template<u
int01 t_dims,
class t_type>
527 for (
uint01 i = 0; i < dim_size; i++)
528 set(index, i, value[i]);
554 template<
class t_
class>
557 get(index, vector[0]);
574 template<
class t_
class>
575 typename std::enable_if<std::is_pointer<t_class>::value>
::type get(
uint04 index, t_class& vector)
const
579 vector = (t_class)value;
586 template<
class t_
class>
587 typename std::enable_if<IsVec<t_class>::value && t_class::NumberOfDimensions() != 1>
::type get(
uint04 index, t_class& vector)
const
596 template<
class t_
class>
597 typename std::enable_if<ObjectInfo<t_class>::Enum>
::type get(
uint04 index, t_class& enum_value)
const
608 template<
class t_type>
616 return Constant<uint04>::Invalid;
818 template<
class t_type, u
int01 t_col, u
int01 t_row>
821 for (
uint01 col = 0; col < t_col; col++)
822 for (
uint01 row = 0; row < t_row; row++)
823 get(index, col * t_row + row, matrix[col][row]);
841 for (
uint01 i = 0; i < 16; i++)
842 get(index, i, vector[i]);
876 get(index, int_value);
885 template<u
int01 t_dims,
class t_type>
888 for (
uint01 i = 0; i < 2; i++)
889 for (
uint01 n = 0; n < t_dims; n++)
890 get(index, t_dims * i + n, bounds[i][n]);
899 template<u
int01 t_dims,
class t_type>
902 for (
uint01 i = 0; i < 3; i++)
903 for (
uint01 n = 0; n < t_dims; n++)
904 get(index, 3 * i + n, tri[i][n]);
910 template<
class t_
class>
923 template<
class t_
class>
927 get(index, sub_index, value);
935 template<u
int01 t_dims,
class t_type>
938 for (
uint01 i = 0; i < t_dims; i++)
939 get(index, i, value[i]);
945 template<
class t_type>
960 switch (
type().vector_size)
965 if (
type().is_string)
968 _setAll<1>(to_location, from_location,
size, from_column);
971 case 2: _setAll<2>(to_location, from_location,
size, from_column);
break;
972 case 3: _setAll<3>(to_location, from_location,
size, from_column);
break;
973 case 4: _setAll<4>(to_location, from_location,
size, from_column);
break;
974 case 16: _setAll<16>(to_location, from_location,
size, from_column);
break;
985 template<
class t_type>
991 can_copy &= from_column.
type() ==
type();
992 can_copy &=
begin() !=
nullptr;
993 can_copy &= from_column.
begin() !=
nullptr;
998 , (
uint01*)(from_column.
begin()) + from_location *
sizeof(t_type)
999 ,
size *
sizeof(t_type));
1005 set(to_location + i, from_column.
get<t_type>(from_location + i));
1091 template<
class t_type>
1100 template<
class t_type>
1130 template<
class t_type>
1134 values.setSize(
size);
1137 memcpy(values.begin(), ((
const t_type*)
begin()) + start,
size *
sizeof(t_type));
1142 get(i + start, values[i]);
1182 virtual const void*
end()
const = 0;
1204 template<u
int01 t_dims>
1207 if constexpr (t_dims == 1)
1209 if (
type().is_number)
1211 if (
type().is_float)
1213 if (
type().byte_size == 4)
1214 setAll<fltp04>(to_location, from_location, size, from_column);
1215 if (
type().byte_size == 8)
1216 setAll<fltp08>(to_location, from_location, size, from_column);
1218 else if (type().is_unsigned)
1220 if (type().byte_size == 1)
1221 setAll<uint01>(to_location, from_location, size, from_column);
1222 if (type().byte_size == 2)
1223 setAll<uint02>(to_location, from_location, size, from_column);
1224 if (type().byte_size == 4)
1225 setAll<uint04>(to_location, from_location, size, from_column);
1226 if (type().byte_size == 8)
1227 setAll<uint08>(to_location, from_location, size, from_column);
1231 if (
type().byte_size == 1)
1232 setAll<sint01>(to_location, from_location, size, from_column);
1233 if (
type().byte_size == 2)
1234 setAll<sint02>(to_location, from_location, size, from_column);
1235 if (
type().byte_size == 4)
1236 setAll<sint04>(to_location, from_location, size, from_column);
1237 if (
type().byte_size == 8)
1238 setAll<sint08>(to_location, from_location, size, from_column);
1243 lib_assert(
false,
"Table copy type not supported");
1248 if (
type().is_number)
1250 if (
type().is_float)
1252 if (
type().byte_size == 4)
1253 setAll<Vector<t_dims, fltp04>>(to_location, from_location, size, from_column);
1254 if (
type().byte_size == 8)
1255 setAll<Vector<t_dims, fltp08>>(to_location, from_location, size, from_column);
1257 else if (
type().is_unsigned)
1259 if (
type().byte_size == 1)
1260 setAll<Vector<t_dims, uint01>>(to_location, from_location, size, from_column);
1261 if (
type().byte_size == 2)
1262 setAll<Vector<t_dims, uint02>>(to_location, from_location, size, from_column);
1263 if (
type().byte_size == 4)
1264 setAll<Vector<t_dims, uint04>>(to_location, from_location, size, from_column);
1265 if (
type().byte_size == 8)
1266 setAll<Vector<t_dims, uint08>>(to_location, from_location, size, from_column);
1270 if (
type().byte_size == 1)
1271 setAll<Vector<t_dims, sint01>>(to_location, from_location, size, from_column);
1272 if (
type().byte_size == 2)
1273 setAll<Vector<t_dims, sint02>>(to_location, from_location, size, from_column);
1274 if (
type().byte_size == 4)
1275 setAll<Vector<t_dims, sint04>>(to_location, from_location, size, from_column);
1276 if (
type().byte_size == 8)
1277 setAll<Vector<t_dims, sint08>>(to_location, from_location, size, from_column);
1280 else if (
type().is_color)
1282 setAll<RGBColor>(to_location, from_location, size, from_column);
1286 lib_assert(
false,
"Table copy type not supported");
1295 uint08 result = 2166136261U;
1298 for (
uint01* c = start; c < stop; c++)
1299 result = (127 * result) ^ *c;
A bitset that stores 8 bits (elements with only two possible values: 0 or 1, true or false,...
A convenience class used with Buffers or Vectors of bools for referencing or acting on a single bit.
A specification of upper and lower bounds in N-dimensions.
The equivelent of std::vector but with a bit more control.
Logic for reading or writing to a file as well as navigating filesystems or other common file operati...
Templated logic for doing matrix multiplication.
Represents a color in the RGB space with optional alpha transparency.
This class is like a string view, but may optionally store the data internally Useful if the return t...
The core String View class for the NDEVR API.
The core String class for the NDEVR API.
A virtual storage type that is used with Table class to store data where the actual mechanism for sto...
virtual void removeRows(uint04 index, uint04 size)=0
Removes a contiguous block of rows starting at the given index.
virtual void get(uint04 index, uint04 vector_pos, uint04 &value) const =0
Retrieves a uint04 value at a specific vector position within a row.
void set(uint04 index, const char *string)
Sets the value at the given row index from a C-string pointer.
virtual void get(uint04 index, StringAllocatingView &value) const =0
Retrieves a string value at the given row index as a StringAllocatingView.
virtual void get(uint04 index, uint04 vector_pos, StringAllocatingView &value) const =0
Retrieves a string value at a specific vector position within a row.
virtual void get(uint04 index, fltp04 &value) const =0
Retrieves a fltp04 value at the given row index.
std::enable_if< IsVec< t_class >::value >::type set(uint04 index, const t_class &value)
Sets a vector value at the given row index.
virtual void swapIndices(uint04 a, uint04 b)=0
Swaps two index entries.
virtual void set(uint04 index, fltp04 value)=0
Sets a fltp04 value at the given row index.
virtual void set(uint04 index, uint04 vector_pos, const StringView &value)=0
Sets a string value at a specific vector position within a row.
bool hasChangesSince(const Time &time, const Bounds< 1, uint04 > &range) const
Checks whether any changes have been recorded since the given time within a row range.
virtual void get(uint04 index, UUID &vector) const
Retrieves a UUID value at the given row index by reading 16 bytes.
virtual bool isSame(uint04 index, const StringView &value) const =0
Checks whether the stored string at the given row is exactly equal to the given value.
virtual void removeRow(uint04 index)=0
Removes a single row at the given index.
virtual void mapToFile(BinaryFileTableInfo &, BinaryCompressionObject &)
Maps this column to a binary file using compression.
virtual void removeRows(uint04 offset, const Buffer< bool > &indices)=0
Removes rows indicated by a boolean mask starting from a given offset.
virtual void setDefaultValueFrom(const TableColumn &column)=0
Copies the default value from another column.
virtual const void * begin() const =0
Returns a const pointer to the beginning of the underlying raw data.
virtual void set(uint04 index, const Matrix< fltp08 > &transform)
Sets a 4x4 fltp08 matrix value at the given row index.
void setReferenceTable(const UUID table)
Sets the UUID of a table that this column references.
std::enable_if< IsVec< t_class >::value &&t_class::NumberOfDimensions()!=1 >::type get(uint04 index, t_class &vector) const
Retrieves a multi-dimensional vector value at the given row index.
virtual uint04 size() const =0
Returns the number of rows in this column.
virtual void set(uint04 index, RGBColor value)=0
Sets an RGBColor value at the given row index.
std::enable_if< ObjectInfo< t_class >::Enum >::type set(uint04 index, const t_class &value)
Sets an enum value at the given row index by casting to uint04.
void getVector(uint04 index, Vector< t_dims, t_type > &value) const
Retrieves a generic vector from the given row index by reading each component from consecutive vector...
Time getModifiedTime() const
Returns the last modification time of this column.
virtual void set(uint04 index, uint04 vector_pos, sint02 value)=0
Sets a sint02 value at a specific vector position within a row.
virtual void get(uint04 index, uint02 &value) const =0
Retrieves a uint02 value at the given row index.
void setLabel(const StringView &label)
Sets the label (name) for this column.
virtual void get(uint04 index, uint04 vector_pos, bool &value) const =0
Retrieves a bool value at a specific vector position within a row.
void get(uint04 index, Bounds< t_dims, t_type > &bounds) const
Retrieves a Bounds value at the given row index by reading min and max components from contiguous vec...
virtual const void * end() const =0
Returns a const pointer to one past the end of the underlying raw data.
virtual void mapFromFile(BinaryFileTableInfo &)
Maps this column from a binary file for deserialization.
virtual void set(uint04 index, uint04 vector_pos, uint02 value)=0
Sets a uint02 value at a specific vector position within a row.
virtual void get(uint04 index, StringView &value) const =0
Retrieves a string value at the given row index as a StringView.
void clearUpdates()
Clears all recorded changes and resets the modified time to zero.
void get(uint04 index, File &file) const
Retrieves a File value at the given row index.
void set(uint04 index, const Time &time)
Sets a Time value at the given row index by storing its underlying uint08.
void set(uint04 index, const BitReference &val)
Sets the value at the given row index from a BitReference.
virtual void set(uint04 index, uint02 value)=0
Sets a uint02 value at the given row index.
virtual void compress(BinaryCompressionObject &object)=0
Compresses the column data into the given compression object.
virtual void copyRows(uint04 source, uint04 destination, uint04 size)=0
Copies a contiguous block of rows from one location to another within this column.
virtual void get(uint04 index, Bounds< 3, fltp08 > &bounds) const
Retrieves a 3D fltp08 bounding box from the given row index.
void get(uint04 index, Triangle< t_dims, t_type > &tri) const
Retrieves a Triangle value at the given row index by reading vertex components from contiguous vector...
void setCompressionMode(CompressionMode compression_mode)
Sets the compression mode used when serializing this column.
std::enable_if<!std::is_enum< t_type >::value >::type setDefault(const t_type &value)
Sets the default value for new rows from a non-enum value.
void get(uint04 index, const String &value) const =delete
Deleted overload to prevent accidentally passing a const String by reference as an output parameter.
virtual void get(uint04 index, uint04 vector_pos, fltp08 &value) const =0
Retrieves a fltp08 value at a specific vector position within a row.
virtual void get(uint04 index, uint01 &value) const =0
Retrieves a uint01 value at the given row index.
void get(uint04 index, Matrix< t_type, t_col, t_row > &matrix) const
Retrieves a generic matrix from the given row index by reading each element from contiguous vector po...
virtual void getVector(uint04 index, Vector< 3, fltp08 > &vector) const
Retrieves a 3D fltp08 vector from the given row index.
virtual void finishMapFromFile(BinaryFileTableInfo &)
Completes any deferred work after mapping from a binary file.
t_class get(uint04 index, uint04 sub_index) const
Convenience template that returns a value by type from a specific vector position within a row.
void setVector(uint04 index, const Vector< t_dims, t_type > &value)
Sets a vector value at the given row index, writing each component individually.
virtual void get(uint04 index, uint04 vector_pos, fltp04 &value) const =0
Retrieves a fltp04 value at a specific vector position within a row.
virtual void set(uint04 index, fltp08 value)=0
Sets a fltp08 value at the given row index.
String m_label
The display name or identifier for this column.
virtual void get(uint04 index, sint08 &value) const =0
Retrieves a sint08 value at the given row index.
virtual void set(uint04 index, uint04 vector_pos, sint08 value)=0
Sets a sint08 value at a specific vector position within a row.
void set(uint04 index, const String &value)
Sets a String value at the given row index.
void set(t_type *values, uint04 start_index, uint04 size)
Bulk-sets values from a raw pointer array into this column.
void set(uint04 index, const t_pointer_type *pointer)
Sets the value at the given row index from a const pointer, stored as uint08.
void set(uint04 index, const TranslatedString &value)
Sets a TranslatedString value at the given row index.
void insert(uint04 index, const t_type &value)
Inserts a new row at the given index and immediately sets its value.
virtual void get(uint04 index, sint04 &value) const =0
Retrieves a sint04 value at the given row index.
virtual void get(uint04 index, uint04 vector_pos, uint01 &value) const =0
Retrieves a uint01 value at a specific vector position within a row.
virtual void set(uint04 index, sint04 value)=0
Sets a sint04 value at the given row index.
virtual void set(uint04 index, sint08 value)=0
Sets a sint08 value at the given row index.
virtual void get(uint04 index, uint04 vector_pos, uint08 &value) const =0
Retrieves a uint08 value at a specific vector position within a row.
virtual uint04 getRowSize(uint04) const
Returns the size of an array-typed row at the given index.
virtual void set(uint04 index, bool value)=0
Sets a bool value at the given row index.
virtual void get(uint04 index, uint08 &value) const =0
Retrieves a uint08 value at the given row index.
virtual TypeInfo type() const =0
Returns the TypeInfo describing the data type stored in this column.
virtual void get(uint04 index, Bounds< 3, fltp04 > &bounds) const
Retrieves a 3D fltp04 bounding box from the given row index.
virtual void swap(uint04 a, uint04 b)=0
Swaps the values at two row indices.
virtual void setRowSize(uint04, uint04)
Sets the size of an array-typed row at the given index.
void set(uint04 index, const Bounds< t_dims, t_type > &value)
Sets a Bounds value at the given row index by writing min and max components into contiguous vector p...
virtual void set(uint04 index, const Bounds< 3, fltp08 > &bounds)
Sets a 3D fltp08 bounding box at the given row index.
void setAll(uint04 to_location, uint04 from_location, uint04 size, const TableColumn &from_column)
Copies a range of values from another column into this column using a specific type.
virtual void get(uint04 index, uint04 vector_pos, sint08 &value) const =0
Retrieves a sint08 value at a specific vector position within a row.
virtual void setAll(uint04 to_location, uint04 from_location, uint04 size, const TableColumn &from_column)
Copies a range of values from another column into this column.
virtual void set(uint04 index, uint01 value)=0
Sets a uint01 value at the given row index.
void get(uint04 index, TranslatedString &string) const
Retrieves a TranslatedString value at the given row index.
std::enable_if<!ObjectInfo< t_class >::Enum >::type set(uint04 index, const t_class &value)
Sets the value at the given row index from a non-enum type.
void set(uint04 index, const BitFlag &bitflag)
Sets a BitFlag value at the given row index by storing its underlying bits.
void update(const TableChange &change)
Records a change to this column and updates the modification time.
virtual void set(uint04 index, uint04 vector_pos, uint01 value)=0
Sets a uint01 value at a specific vector position within a row.
virtual void set(uint04 index, const UUID &value)
Sets a UUID value at the given row index.
Buffer< TableChange > changesSince(const Time &time, const Bounds< 1, uint04 > &range) const
Returns all changes recorded since the given time within a specific row range.
void get(uint04 index, BitFlag &bitflag) const
Retrieves a BitFlag value at the given row index.
virtual void set(uint04 index, sint02 value)=0
Sets a sint02 value at the given row index.
void get(uint04 index, Vector< 32, bool > &value) const
Retrieves a 32-element boolean vector at the given row index by reading the stored uint04 and reinter...
Buffer< t_type > getAll(uint04 start, uint04 size) const
Retrieves a contiguous range of values as a typed buffer.
virtual void set(uint04 index, uint04 value)=0
Sets a uint04 value at the given row index.
virtual void set(uint04 index, uint04 vector_pos, fltp04 value)=0
Sets a fltp04 value at a specific vector position within a row.
virtual void get(uint04 index, uint04 vector_pos, sint04 &value) const =0
Retrieves a sint04 value at a specific vector position within a row.
void set(uint04 index, const Vector< 32, bool > &value)
Sets a 32-element boolean vector at the given row index.
std::enable_if< std::is_pointer< t_class >::value >::type get(uint04 index, t_class &vector) const
Retrieves a pointer value at the given row index by reading a stored uint08.
virtual void mapToFile(BinaryFileTableInfo &, int)
Maps this column to a binary file for serialization.
void get(uint04 index, Time &time) const
Retrieves a Time value at the given row index.
virtual void get(uint04 index, uint04 &value) const =0
Retrieves a uint04 value at the given row index.
virtual const StringAllocatingView getDefaultValue() const =0
Returns the default value for new rows as a string representation.
virtual void set(uint04 index, uint08 value)=0
Sets a uint08 value at the given row index.
void set(uint04 index, const std::nullptr_t &)
Sets the value at the given row index to zero (nullptr overload).
virtual void get(uint04 index, Matrix< fltp08 > &transform) const
Retrieves a 4x4 fltp08 matrix from the given row index.
virtual void getVector(uint04 index, Vector< 3, fltp04 > &vector) const
Retrieves a 3D fltp04 vector from the given row index.
Buffer< TableChange > m_changes
The list of recorded changes for change-tracking and synchronization.
virtual ~TableColumn()
Virtual destructor.
UUID m_reference_table
UUID of a table this column references, or Invalid if none.
virtual void set(uint04 index, uint04 vector_pos, bool value)=0
Sets a bool value at a specific vector position within a row.
virtual void set(uint04 index, uint04 vector_pos, fltp08 value)=0
Sets a fltp08 value at a specific vector position within a row.
virtual void removeRows(const Buffer< uint04 > &sorted_remove_indices)=0
Removes multiple rows identified by a sorted list of indices.
virtual void addRow()
Appends a single default-initialized row at the end of the column.
virtual uint08 tableHash() const
Computes a hash of the column's raw data using a variant of the FNV hash algorithm.
virtual void get(uint04 index, RGBColor &value) const =0
Retrieves an RGBColor value at the given row index.
virtual void removeIndices(const Buffer< uint04 > &offset_lookup_list)=0
Removes index entries using an offset lookup list.
virtual void get(uint04 index, uint04 vector_pos, uint02 &value) const =0
Retrieves a uint02 value at a specific vector position within a row.
virtual void get(uint04 index, bool &value) const =0
Retrieves a bool value at the given row index.
t_class get(uint04 index) const
Convenience template that returns a value by type from the given row index.
virtual void get(uint04 index, sint02 &value) const =0
Retrieves a sint02 value at the given row index.
void set(uint04 index, const char(&string)[N])
Sets the value at the given row index from a string literal.
Buffer< TableChange > changesSince(const Time &time) const
Returns all changes recorded since the given time.
virtual void set(uint04 index, const Matrix< fltp04 > &transform)
Sets a 4x4 fltp04 matrix value at the given row index.
void get(uint04 index, Vector< 1, t_class > &vector) const
Retrieves a 1D vector value at the given row index by delegating to the scalar get.
virtual void getVector(uint04 index, Vector< 1, uint04 > &vector) const
Retrieves a 1D uint04 vector from the given row index.
virtual void getVector(uint04 index, Vector< 3, uint04 > &vector) const
Retrieves a 3D uint04 vector from the given row index.
virtual bool beginsWith(uint04 index, const StringView &value, bool ignore_case) const =0
Checks whether the stored string at the given row begins with the given prefix.
virtual void get(uint04 index, sint01 &value) const =0
Retrieves a sint01 value at the given row index.
virtual void updateFrom(const TableColumn &column)
Updates this column's data from another column, typically used for synchronization or mirroring.
void set(uint04 index, const File &value)
Sets a File value at the given row index.
virtual void get(uint04 index, uint04 vector_pos, sint02 &value) const =0
Retrieves a sint02 value at a specific vector position within a row.
CompressionMode m_compression_mode
The compression mode used when serializing this column.
const String & label() const
Returns the label (name) of this column.
virtual void * begin()=0
Returns a mutable pointer to the beginning of the underlying raw data.
const Buffer< TableChange > & changes() const
Returns the list of all recorded changes for this column.
virtual void set(uint04 index, uint04 vector_pos, uint08 value)=0
Sets a uint08 value at a specific vector position within a row.
virtual void removeIndices(uint04 location, uint04 size)=0
Removes a contiguous block of index entries at the given location.
void set(uint04 index, const Triangle< t_dims, t_type > &value)
Sets a Triangle value at the given row index by writing each vertex component into contiguous vector ...
virtual void set(uint04 index, sint01 value)=0
Sets a sint01 value at the given row index.
virtual void get(uint04 index, Matrix< fltp04 > &transform) const
Retrieves a 4x4 fltp04 matrix from the given row index.
std::enable_if< ObjectInfo< t_class >::Enum >::type get(uint04 index, t_class &enum_value) const
Retrieves an enum value at the given row index by reading a stored uint04.
virtual void setDefaultValue(const StringAllocatingView &value)=0
Sets the default value for new rows from a string representation.
virtual void getVector(uint04 index, Vector< 2, uint04 > &vector) const
Retrieves a 2D uint04 vector from the given row index.
virtual void set(uint04 index, uint04 vector_pos, sint04 value)=0
Sets a sint04 value at a specific vector position within a row.
virtual void resetRow(uint04)
Resets a row to its default state.
UUID referenceTable() const
Returns the UUID of a table that this column references, if any.
virtual void set(uint04 index, uint04 vector_pos, sint01 value)=0
Sets a sint01 value at a specific vector position within a row.
virtual void setSize(uint04 size)=0
Sets the number of rows in this column.
TableColumn(const StringView &label)
Constructs a TableColumn with the given label.
virtual void copyRow(uint04 source, uint04 destination)=0
Copies the value from one row to another within this column.
uint04 getIndexOf(const t_type &object) const
Searches for the first row containing the given value.
virtual void insertRows(uint04 location, uint04 size)=0
Inserts a contiguous block of default-initialized rows at the given location.
virtual bool contains(uint04 index, const StringView &value, bool ignore_case) const =0
Checks whether the stored string at the given row contains the given substring.
virtual void get(uint04 index, fltp08 &value) const =0
Retrieves a fltp08 value at the given row index.
std::enable_if< std::is_enum< t_type >::value >::type setDefault(const t_type &value)
Sets the default value for new rows from an enum value by casting to uint04.
void set(uint04 index, t_pointer_type *pointer)
Sets the value at the given row index from a non-const pointer, stored as uint08.
void set(uint04 index, const Matrix< t_type, t_col, t_row > &matrix)
Sets a Matrix value at the given row index by writing each element column-major into contiguous vecto...
virtual void set(uint04 index, uint04 vector_pos, uint04 value)=0
Sets a uint04 value at a specific vector position within a row.
virtual void insertIndices(uint04 location, uint04 size)=0
Inserts a contiguous block of index entries at the given location.
virtual void set(uint04 index, const Bounds< 3, fltp04 > &bounds)
Sets a 3D fltp04 bounding box at the given row index.
virtual TableColumn * getSelected(const Buffer< bool > &selected_indices) const =0
Creates a new TableColumn containing only the rows where the corresponding selected_indices entry is ...
void set(uint04 index, const StringAllocatingView &string)
Sets the value at the given row index from a StringAllocatingView.
Time m_modified_time
The timestamp of the most recent modification to this column.
void updateAll()
Marks the entire column as updated by recording a change spanning all rows.
virtual void * end()=0
Returns a mutable pointer to one past the end of the underlying raw data.
virtual void set(uint04 index, const StringView &value)=0
Sets a string value at the given row index.
virtual void insert(uint04 index)=0
Inserts a default-initialized row at the given index, shifting subsequent rows.
virtual void get(uint04 index, uint04 vector_pos, sint01 &value) const =0
Retrieves a sint01 value at a specific vector position within a row.
Represents a timestamp with utilities for manipulation and conversion.
static Time SystemTime()
Retrieves the current system time which is a combination of std::chrono::steady_clock to ensure smoot...
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
A three-vertex polygon representing a triangle in N-dimensional space.
Stores information about a type, relevant for certain templated functions.
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
A fixed-size array with N dimensions used as the basis for geometric and mathematical types.
The primary namespace for the NDEVR SDK.
@ type
The type identifier string for this model node.
constexpr t_type getMin(const t_type &left, const t_type &right)
Finds the minimum of the given arguments based on the < operator Author: Tyler Parke Date: 2017-11-05...
float fltp04
Defines an alias representing a 4 byte floating-point number Bit layout is as follows: -Sign: 1 bit a...
uint16_t uint02
-Defines an alias representing a 2 byte, unsigned integer -Can represent exact integer values 0 throu...
constexpr std::enable_if<!ObjectInfo< t_type >::Buffer, TypeInfo >::type GetTypeInfo()
Constructs a TypeInfo for a non-buffer type at compile time using ObjectInfo traits.
uint64_t uint08
-Defines an alias representing an 8 byte, unsigned integer
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
double fltp08
Defines an alias representing an 8 byte floating-point number.
CompressionMode
Forward declaration of the Module struct for module metadata.
@ e_default_compression
Uses a sensible default compression strategy.
int16_t sint02
-Defines an alias representing a 2 byte, signed integer.
int32_t sint04
-Defines an alias representing a 4 byte, signed integer.
constexpr t_to & rcast(t_from &value)
Casts the given value.
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
@ file
The source file path associated with this object.
int8_t sint01
-Defines an alias representing a 1 byte, signed integer.
int64_t sint08
-Defines an alias representing an 8 byte, signed integer -Can represent exact integer values -9223372...
constexpr t_to cast(const Angle< t_from > &value)
Casts an Angle from one backing type to another.
A container for storing compressed data, typically used for File IO operations.
Extended file table information for reading and writing NDV binary files.
Information about the object.
Records changes to a table or column noting the bounds of the data adjusted.
TableChange(TableChangeType type, uint04 start, uint04 size, Time time=Time::SystemTime())
Constructs a TableChange recording a specific modification.
TableChangeType
Enumerates the types of changes that can be recorded for a table or column.
@ e_insertion
New rows were inserted.
@ e_update
An existing row range was modified in place.
@ e_full_update
The entire column or table was replaced or rebuilt.
@ e_deletion
Rows were deleted.
Time time
The timestamp when the change occurred.
uint04 size
The number of rows affected by the change.
uint04 start
The starting row index of the affected range.
TableChangeType type
The kind of change that was recorded.