NDEVR
API Documentation
TableColumnBuffer< t_type >

A base class for a Table column with N-number of rows held in a Buffer object. More...

Inheritance diagram for TableColumnBuffer< t_type >:
[legend]
Collaboration diagram for TableColumnBuffer< t_type >:
[legend]

Public Member Functions

 TableColumnBuffer (const Buffer< t_type > &buffer, const StringView &label)
 Constructs a TableColumnBuffer from an existing buffer of data.
 TableColumnBuffer (const StringView &label)
 Constructs a TableColumnBuffer with the given label and an invalid default value.
 TableColumnBuffer (const StringView &label, const t_type &default_value)
 Constructs a TableColumnBuffer with the given label and explicit default value.
virtual void addRow () override
 Appends a new row initialized with the default value.
const void * begin () const override
 Returns a const pointer to the beginning of the raw data buffer.
void * begin () override
 Returns a pointer to the beginning of the raw data buffer.
bool beginsWith (uint04 index, const StringView &value, bool ignore_case) const override
 Checks whether the string form of the value at the given row begins with a prefix.
virtual void compress (BinaryCompressionObject &object) override
 Compresses the column data into a binary compression object.
bool contains (uint04 index, const StringView &value, bool ignore_case) const override
 Checks whether the string form of the value at the given row contains a substring.
virtual void copyRow (uint04 source, uint04 destination) override
 Copies the value from the source row to the destination row.
virtual void copyRows (uint04 source, uint04 destination, uint04 size) override
 Copies a contiguous range of rows from source to destination.
const void * end () const override
 Returns a const pointer past the end of the raw data buffer.
void * end () override
 Returns a pointer past the end of the raw data buffer.
virtual void finishMapFromFile (BinaryFileTableInfo &file) override
 Completes file deserialization by extracting the default value from the buffer.
const StringAllocatingView getDefaultValue () const override
 Returns the default value as a string representation.
void insert (uint04 index) override
 Inserts a new row at the given index, initialized to the default value.
virtual void insertRows (uint04 location, uint04 size) override
 Inserts multiple rows at the given location, each initialized to the default value.
bool isSame (uint04 index, const StringView &value) const override
 Checks whether the value at the given row equals the provided string value.
virtual void mapFromFile (BinaryFileTableInfo &file) override
 Reads the column data from a binary file, handling multiple version formats.
virtual void mapToFile (BinaryFileTableInfo &file, BinaryCompressionObject &object) override
 Writes pre-compressed column data to a binary file.
virtual void mapToFile (BinaryFileTableInfo &file, int compression) override
 Writes the column data to a binary file with the given compression mode.
decltype(auto) operator[] (const uint04 index)
 Returns a reference to the element at the given row index.
decltype(auto) operator[] (const uint04 index) const
 Returns a const reference to the element at the given row index.
void removeRow (uint04 index) override
 Removes a single row at the given index.
virtual void removeRows (const Buffer< uint04 > &sorted_remove_indices) override
 Removes rows at the specified sorted indices.
virtual void removeRows (uint04 index, uint04 size) override
 Removes a contiguous range of rows starting at the given index.
void removeRows (uint04 offset, const Buffer< bool > &indices) override
 Removes rows using a boolean mask starting at the given offset.
virtual void resetRow (uint04 row) override
 Resets the specified row to the default value.
void set (uint04 index, const t_type &value)
 Sets the value at the given row index.
virtual void setDefaultValue (const StringAllocatingView &value) override
 Sets the default value for new rows by parsing a string representation.
virtual void setDefaultValueFrom (const TableColumn &column) override
 Copies the default value from another column into this one.
void setSize (uint04 size) override
 Resizes the column to the specified number of rows.
uint04 size () const override
 Returns the number of rows in this column.
virtual void swap (uint04 a, uint04 b) override
 Swaps the values at two row indices.
virtual TypeInfo type () const override
 Returns TypeInfo describing the stored element type t_type.
Public Member Functions inherited from TableColumn
 TableColumn (const StringView &label)
 Constructs a TableColumn with the given label.
virtual ~TableColumn ()
 Virtual destructor.
const Buffer< TableChange > & changes () const
 Returns the list of all recorded changes for this column.
Buffer< TableChangechangesSince (const Time &time) const
 Returns all changes recorded since the given time.
Buffer< TableChangechangesSince (const Time &time, const Bounds< 1, uint04 > &range) const
 Returns all changes recorded since the given time within a specific row range.
void clearUpdates ()
 Clears all recorded changes and resets the modified time to zero.
template<class t_class>
t_class get (uint04 index) const
 Convenience template that returns a value by type from the given row index.
void get (uint04 index, BitFlag &bitflag) const
 Retrieves a BitFlag value at the given row index.
virtual void get (uint04 index, bool &value) const =0
 Retrieves a bool value at the given row index.
virtual void get (uint04 index, Bounds< 3, fltp04 > &bounds) const
 Retrieves a 3D fltp04 bounding box from the given row index.
virtual void get (uint04 index, Bounds< 3, fltp08 > &bounds) const
 Retrieves a 3D fltp08 bounding box from the given row index.
template<uint01 t_dims, class t_type>
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 vector positions.
void get (uint04 index, const String &value) const =delete
 Deleted overload to prevent accidentally passing a const String by reference as an output parameter.
void get (uint04 index, File &file) const
 Retrieves a File value at the given row index.
virtual void get (uint04 index, fltp04 &value) const =0
 Retrieves a fltp04 value at the given row index.
virtual void get (uint04 index, fltp08 &value) const =0
 Retrieves a fltp08 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.
virtual void get (uint04 index, Matrix< fltp08 > &transform) const
 Retrieves a 4x4 fltp08 matrix from the given row index.
template<class t_type, uint01 t_col, uint01 t_row>
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 positions in column-major order.
virtual void get (uint04 index, RGBColor &value) const =0
 Retrieves an RGBColor value at the given row index.
virtual void get (uint04 index, sint01 &value) const =0
 Retrieves a sint01 value at the given row index.
virtual void get (uint04 index, sint02 &value) const =0
 Retrieves a sint02 value at the given row index.
virtual void get (uint04 index, sint04 &value) const =0
 Retrieves a sint04 value at the given row index.
virtual void get (uint04 index, sint08 &value) const =0
 Retrieves a sint08 value at the given row index.
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, StringView &value) const =0
 Retrieves a string value at the given row index as a StringView.
template<class t_class>
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.
template<class t_class>
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.
template<class t_class>
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.
void get (uint04 index, Time &time) const
 Retrieves a Time value at the given row index.
void get (uint04 index, TranslatedString &string) const
 Retrieves a TranslatedString value at the given row index.
template<uint01 t_dims, class t_type>
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 positions.
virtual void get (uint04 index, uint01 &value) const =0
 Retrieves a uint01 value at the given row index.
virtual void get (uint04 index, uint02 &value) const =0
 Retrieves a uint02 value at the given row index.
virtual void get (uint04 index, uint04 &value) const =0
 Retrieves a uint04 value at the given row index.
template<class t_class>
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.
virtual void get (uint04 index, uint04 vector_pos, bool &value) const =0
 Retrieves a bool value at a specific vector position within a row.
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 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, uint04 vector_pos, sint01 &value) const =0
 Retrieves a sint01 value at a specific vector position within a row.
virtual void get (uint04 index, uint04 vector_pos, sint02 &value) const =0
 Retrieves a sint02 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.
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 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, uint04 vector_pos, uint01 &value) const =0
 Retrieves a uint01 value at a specific vector position within a row.
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, uint04 vector_pos, uint04 &value) const =0
 Retrieves a uint04 value at a specific vector position within a row.
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 void get (uint04 index, uint08 &value) const =0
 Retrieves a uint08 value at the given row index.
virtual void get (uint04 index, UUID &vector) const
 Retrieves a UUID value at the given row index by reading 16 bytes.
template<class t_class>
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.
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 reinterpreting its bits.
template<class t_type>
Buffer< t_type > getAll (uint04 start, uint04 size) const
 Retrieves a contiguous range of values as a typed buffer.
template<class t_type>
uint04 getIndexOf (const t_type &object) const
 Searches for the first row containing the given value.
Time getModifiedTime () const
 Returns the last modification time of this column.
virtual uint04 getRowSize (uint04) const
 Returns the size of an array-typed row at the given index.
virtual TableColumngetSelected (const Buffer< bool > &selected_indices) const =0
 Creates a new TableColumn containing only the rows where the corresponding selected_indices entry is true.
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< 2, uint04 > &vector) const
 Retrieves a 2D uint04 vector 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.
virtual void getVector (uint04 index, Vector< 3, fltp08 > &vector) const
 Retrieves a 3D fltp08 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.
template<uint01 t_dims, class t_type>
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 positions.
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.
template<class t_type>
void insert (uint04 index, const t_type &value)
 Inserts a new row at the given index and immediately sets its value.
virtual void insertIndices (uint04 location, uint04 size)=0
 Inserts a contiguous block of index entries at the given location.
const Stringlabel () const
 Returns the label (name) of this column.
UUID referenceTable () const
 Returns the UUID of a table that this column references, if any.
virtual void removeIndices (const Buffer< uint04 > &offset_lookup_list)=0
 Removes index entries using an offset lookup list.
virtual void removeIndices (uint04 location, uint04 size)=0
 Removes a contiguous block of index entries at the given location.
template<class t_type>
void set (t_type *values, uint04 start_index, uint04 size)
 Bulk-sets values from a raw pointer array into this column.
virtual void set (uint04 index, bool value)=0
 Sets a bool value at the given row index.
void set (uint04 index, const BitFlag &bitflag)
 Sets a BitFlag value at the given row index by storing its underlying bits.
void set (uint04 index, const BitReference &val)
 Sets the value at the given row index from a BitReference.
virtual void set (uint04 index, const Bounds< 3, fltp04 > &bounds)
 Sets a 3D fltp04 bounding box at the given row index.
virtual void set (uint04 index, const Bounds< 3, fltp08 > &bounds)
 Sets a 3D fltp08 bounding box at the given row index.
template<uint01 t_dims, class t_type>
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 positions.
void set (uint04 index, const char *string)
 Sets the value at the given row index from a C-string pointer.
template<std::size_t N>
void set (uint04 index, const char(&string)[N])
 Sets the value at the given row index from a string literal.
void set (uint04 index, const File &value)
 Sets a File value at the given row index.
virtual void set (uint04 index, const Matrix< fltp04 > &transform)
 Sets a 4x4 fltp04 matrix value at the given row index.
virtual void set (uint04 index, const Matrix< fltp08 > &transform)
 Sets a 4x4 fltp08 matrix value at the given row index.
template<class t_type, uint01 t_col, uint01 t_row>
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 vector positions.
void set (uint04 index, const std::nullptr_t &)
 Sets the value at the given row index to zero (nullptr overload).
void set (uint04 index, const String &value)
 Sets a String value at the given row index.
void set (uint04 index, const StringAllocatingView &string)
 Sets the value at the given row index from a StringAllocatingView.
virtual void set (uint04 index, const StringView &value)=0
 Sets a string value at the given row index.
template<class t_class>
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.
template<class t_class>
std::enable_if< IsVec< t_class >::value >::type set (uint04 index, const t_class &value)
 Sets a vector value at the given row index.
template<class t_class>
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.
template<class t_pointer_type>
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 Time &time)
 Sets a Time value at the given row index by storing its underlying uint08.
void set (uint04 index, const TranslatedString &value)
 Sets a TranslatedString value at the given row index.
template<uint01 t_dims, class t_type>
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 positions.
virtual void set (uint04 index, const UUID &value)
 Sets a UUID value at the given row index.
void set (uint04 index, const Vector< 32, bool > &value)
 Sets a 32-element boolean vector at the given row index.
virtual void set (uint04 index, fltp04 value)=0
 Sets a fltp04 value at the given row index.
virtual void set (uint04 index, fltp08 value)=0
 Sets a fltp08 value at the given row index.
virtual void set (uint04 index, RGBColor value)=0
 Sets an RGBColor value at the given row index.
virtual void set (uint04 index, sint01 value)=0
 Sets a sint01 value at the given row index.
virtual void set (uint04 index, sint02 value)=0
 Sets a sint02 value at the given row index.
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.
template<class t_pointer_type>
void set (uint04 index, t_pointer_type *pointer)
 Sets the value at the given row index from a non-const pointer, stored as uint08.
virtual void set (uint04 index, uint01 value)=0
 Sets a uint01 value at the given row index.
virtual void set (uint04 index, uint02 value)=0
 Sets a uint02 value at the given row index.
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, bool value)=0
 Sets a bool value at a specific vector position within a row.
virtual void set (uint04 index, uint04 vector_pos, const StringView &value)=0
 Sets a string value at a specific vector position within a row.
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 set (uint04 index, uint04 vector_pos, fltp08 value)=0
 Sets a fltp08 value at a specific vector position within a row.
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 set (uint04 index, uint04 vector_pos, sint02 value)=0
 Sets a sint02 value at a specific vector position within a row.
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 set (uint04 index, uint04 vector_pos, sint08 value)=0
 Sets a sint08 value at a specific vector position within a row.
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, uint04 vector_pos, uint02 value)=0
 Sets a uint02 value at a specific vector position within a row.
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 set (uint04 index, uint04 vector_pos, uint08 value)=0
 Sets a uint08 value at a specific vector position within a row.
virtual void set (uint04 index, uint08 value)=0
 Sets a uint08 value at the given row index.
template<class t_type>
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 setAll (uint04 to_location, uint04 from_location, uint04 size, const TableColumn &from_column)
 Copies a range of values from another column into this column.
void setCompressionMode (CompressionMode compression_mode)
 Sets the compression mode used when serializing this column.
template<class t_type>
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.
template<class t_type>
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 setLabel (const StringView &label)
 Sets the label (name) for this column.
void setReferenceTable (const UUID table)
 Sets the UUID of a table that this column references.
virtual void setRowSize (uint04, uint04)
 Sets the size of an array-typed row at the given index.
template<uint01 t_dims, class t_type>
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 swapIndices (uint04 a, uint04 b)=0
 Swaps two index entries.
void update (const TableChange &change)
 Records a change to this column and updates the modification time.
void updateAll ()
 Marks the entire column as updated by recording a change spanning all rows.
virtual void updateFrom (const TableColumn &column)
 Updates this column's data from another column, typically used for synchronization or mirroring.

Protected Member Functions

decltype(auto) defaultValue ()
 Returns a reference to the default value.
decltype(auto) defaultValue () const
 Returns a const reference to the default value.
decltype(auto) pullValue (uint04 index)
 Returns a reference to the value at the given row index.
decltype(auto) pullValue (uint04 index) const
 Returns a const reference to the value at the given row index.

Protected Attributes

Buffer< t_type > m_buffer
 The underlying data buffer storing all row values.
Buffer< uint01m_compressed_data
 Temporary storage for compressed column data.
t_type m_default_value
 The default value assigned to new rows.
bool m_has_been_read = false
 Whether data has been read from file and needs finalization.
Protected Attributes inherited from TableColumn
Buffer< TableChangem_changes
 The list of recorded changes for change-tracking and synchronization.
CompressionMode m_compression_mode = CompressionMode::e_default_compression
 The compression mode used when serializing this column.
String m_label
 The display name or identifier for this column.
Time m_modified_time
 The timestamp of the most recent modification to this column.
UUID m_reference_table = Constant<UUID>::Invalid
 UUID of a table this column references, or Invalid if none.

Detailed Description

template<class t_type>
class TableColumnBuffer< t_type >

A base class for a Table column with N-number of rows held in a Buffer object.


Allows for virtual memory access with the caller not needing to know how the data itself is stored.

Definition at line 103 of file TableColumnType.h.

Constructor & Destructor Documentation

◆ TableColumnBuffer() [1/3]

template<class t_type>
TableColumnBuffer< t_type >::TableColumnBuffer ( const StringView & label)
inline

Constructs a TableColumnBuffer with the given label and an invalid default value.

Parameters
[in]labelThe name/label for this column.

Definition at line 126 of file TableColumnType.h.

References TableColumn::TableColumn(), TableColumn::label(), and m_default_value.

Referenced by TableColumnTypeBuffer< T >::TableColumnTypeBuffer(), TableVectorType< 1, T >::TableVectorType(), TableVectorType< 1, T >::TableVectorType(), TableVectorType< 1, t_type >::TableVectorType(), TableVectorType< 1, t_type >::TableVectorType(), TableColumnTypeBuffer< T >::get(), TableColumnTypeBuffer< T >::get(), TableColumnTypeBuffer< T >::get(), TableColumnTypeBuffer< T >::get(), TableColumnTypeBuffer< T >::get(), TableColumnTypeBuffer< T >::get(), TableColumnTypeBuffer< T >::get(), TableColumnTypeBuffer< T >::get(), TableColumnTypeBuffer< T >::get(), TableColumnTypeBuffer< T >::get(), TableColumnTypeBuffer< T >::get(), TableColumnTypeBuffer< T >::get(), TableColumnTypeBuffer< T >::get(), TableColumnTypeBuffer< T >::get(), TableColumnTypeBuffer< T >::get(), TableColumnTypeBuffer< T >::get(), TableColumnTypeBuffer< T >::get(), TableColumnTypeBuffer< T >::get(), TableColumnTypeBuffer< T >::get(), TableColumnTypeBuffer< T >::get(), TableColumnTypeBuffer< T >::get(), TableColumnTypeBuffer< T >::get(), TableColumnTypeBuffer< T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableColumnTypeBuffer< T >::getRowSize(), TableVectorType< 1, T >::getSelected(), TableVectorType< 1, T >::getVector(), TableVectorType< 1, T >::getVector(), TableVectorType< 1, T >::getVector(), TableVectorType< 1, T >::getVector(), TableVectorType< 1, T >::insertIndices(), TableVectorType< 1, T >::removeIndices(), TableVectorType< 1, T >::removeIndices(), TableColumnTypeBuffer< T >::set(), TableColumnTypeBuffer< T >::set(), TableColumnTypeBuffer< T >::set(), TableColumnTypeBuffer< T >::set(), TableColumnTypeBuffer< T >::set(), TableColumnTypeBuffer< T >::set(), TableColumnTypeBuffer< T >::set(), TableColumnTypeBuffer< T >::set(), TableColumnTypeBuffer< T >::set(), TableColumnTypeBuffer< T >::set(), TableColumnTypeBuffer< T >::set(), TableColumnTypeBuffer< T >::set(), TableColumnTypeBuffer< T >::set(), TableColumnTypeBuffer< T >::set(), TableColumnTypeBuffer< T >::set(), TableColumnTypeBuffer< T >::set(), TableColumnTypeBuffer< T >::set(), TableColumnTypeBuffer< T >::set(), TableColumnTypeBuffer< T >::set(), TableColumnTypeBuffer< T >::set(), TableColumnTypeBuffer< T >::set(), TableColumnTypeBuffer< T >::set(), TableColumnTypeBuffer< T >::set(), TableVectorType< 1, T >::set(), TableVectorType< 1, T >::set(), TableVectorType< 1, T >::set(), TableVectorType< 1, T >::set(), TableVectorType< 1, T >::set(), TableVectorType< 1, T >::set(), TableVectorType< 1, T >::set(), TableVectorType< 1, T >::set(), TableVectorType< 1, T >::set(), TableVectorType< 1, T >::set(), TableVectorType< 1, T >::set(), TableVectorType< 1, T >::set(), TableVectorType< 1, T >::set(), TableVectorType< 1, T >::set(), TableVectorType< 1, T >::set(), TableVectorType< 1, T >::set(), TableVectorType< 1, T >::set(), TableVectorType< 1, T >::set(), TableVectorType< 1, T >::set(), TableVectorType< 1, T >::set(), TableVectorType< 1, T >::set(), TableVectorType< 1, T >::set(), TableVectorType< 1, T >::set(), TableVectorType< 1, T >::set(), TableVectorType< 1, T >::set(), TableColumnTypeBuffer< T >::setRowSize(), TableVectorType< 1, T >::swapIndices(), TableColumnTypeBuffer< T >::tableHash(), and TableVectorType< 1, T >::tableHash().

◆ TableColumnBuffer() [2/3]

template<class t_type>
TableColumnBuffer< t_type >::TableColumnBuffer ( const StringView & label,
const t_type & default_value )
inline

Constructs a TableColumnBuffer with the given label and explicit default value.

Parameters
[in]labelThe name/label for this column.
[in]default_valueThe default value assigned to new rows.

Definition at line 134 of file TableColumnType.h.

References TableColumn::TableColumn(), TableColumn::label(), and m_default_value.

◆ TableColumnBuffer() [3/3]

template<class t_type>
TableColumnBuffer< t_type >::TableColumnBuffer ( const Buffer< t_type > & buffer,
const StringView & label )
inline

Constructs a TableColumnBuffer from an existing buffer of data.

Parameters
[in]bufferThe pre-populated data buffer.
[in]labelThe name/label for this column.

Definition at line 142 of file TableColumnType.h.

References TableColumn::TableColumn(), TableColumn::label(), m_buffer, and m_default_value.

Member Function Documentation

◆ begin() [1/2]

template<class t_type>
const void * TableColumnBuffer< t_type >::begin ( ) const
inlineoverridevirtual

Returns a const pointer to the beginning of the raw data buffer.

Returns
A const void pointer to the start of the buffer memory.
Note
Asserts if t_type is boolean, as raw pointer access is not supported for packed booleans.

Implements TableColumn.

Definition at line 391 of file TableColumnType.h.

References m_buffer.

◆ begin() [2/2]

template<class t_type>
void * TableColumnBuffer< t_type >::begin ( )
inlineoverridevirtual

Returns a pointer to the beginning of the raw data buffer.

Returns
A void pointer to the start of the buffer memory.
Note
Asserts if t_type is boolean, as raw pointer access is not supported for packed booleans.

Implements TableColumn.

Definition at line 383 of file TableColumnType.h.

References m_buffer.

◆ beginsWith()

template<class t_type>
bool TableColumnBuffer< t_type >::beginsWith ( uint04 index,
const StringView & value,
bool ignore_case ) const
inlinenodiscardoverridevirtual

Checks whether the string form of the value at the given row begins with a prefix.

Parameters
[in]indexThe row index to check.
[in]valueThe prefix to check for.
[in]ignore_caseWhether to perform a case-insensitive comparison.
Returns
True if the row's string representation begins with the prefix.

Implements TableColumn.

Reimplemented in TableColumnString.

Definition at line 427 of file TableColumnType.h.

References String::beginsWith(), and pullValue().

◆ compress()

template<class t_type>
virtual void TableColumnBuffer< t_type >::compress ( BinaryCompressionObject & object)
inlineoverridevirtual

Compresses the column data into a binary compression object.

Temporarily appends the default value to the buffer before compression, then removes it afterward.

Parameters
[in]objectThe compression object that receives the compressed data.

Implements TableColumn.

Definition at line 357 of file TableColumnType.h.

References Compressor::Compress(), defaultValue(), e_default_compression, m_buffer, m_compressed_data, and TableColumn::m_compression_mode.

◆ contains()

template<class t_type>
bool TableColumnBuffer< t_type >::contains ( uint04 index,
const StringView & value,
bool ignore_case ) const
inlinenodiscardoverridevirtual

Checks whether the string form of the value at the given row contains a substring.

Parameters
[in]indexThe row index to check.
[in]valueThe substring to search for.
[in]ignore_caseWhether to perform a case-insensitive comparison.
Returns
True if the row's string representation contains the substring.

Implements TableColumn.

Reimplemented in TableColumnString.

Definition at line 421 of file TableColumnType.h.

References String::hasSubString(), and pullValue().

◆ copyRow()

template<class t_type>
virtual void TableColumnBuffer< t_type >::copyRow ( uint04 source,
uint04 destination )
inlineoverridevirtual

Copies the value from the source row to the destination row.

Parameters
[in]sourceThe row index to copy from.
[in]destinationThe row index to copy to.

Implements TableColumn.

Definition at line 266 of file TableColumnType.h.

References m_buffer.

◆ copyRows()

template<class t_type>
virtual void TableColumnBuffer< t_type >::copyRows ( uint04 source,
uint04 destination,
uint04 size )
inlineoverridevirtual

Copies a contiguous range of rows from source to destination.

Handles overlapping regions by copying in the appropriate direction.

Parameters
[in]sourceThe starting row index to copy from.
[in]destinationThe starting row index to copy to.
[in]sizeThe number of rows to copy.

Implements TableColumn.

Definition at line 276 of file TableColumnType.h.

References IsValid(), m_buffer, and size().

◆ defaultValue() [1/2]

template<class t_type>
decltype(auto) TableColumnBuffer< t_type >::defaultValue ( )
inlineprotected

Returns a reference to the default value.

Returns
A reference to m_default_value.

Definition at line 468 of file TableColumnType.h.

References m_default_value.

Referenced by addRow(), compress(), insert(), insertRows(), and setSize().

◆ defaultValue() [2/2]

template<class t_type>
decltype(auto) TableColumnBuffer< t_type >::defaultValue ( ) const
inlineprotected

Returns a const reference to the default value.

Returns
A const reference to m_default_value.

Definition at line 474 of file TableColumnType.h.

References m_default_value.

◆ end() [1/2]

template<class t_type>
const void * TableColumnBuffer< t_type >::end ( ) const
inlineoverridevirtual

Returns a const pointer past the end of the raw data buffer.

Returns
A const void pointer to one byte past the last byte of buffer memory.

Implements TableColumn.

Definition at line 394 of file TableColumnType.h.

References m_buffer.

◆ end() [2/2]

template<class t_type>
void * TableColumnBuffer< t_type >::end ( )
inlineoverridevirtual

Returns a pointer past the end of the raw data buffer.

Returns
A void pointer to one byte past the last byte of buffer memory.

Implements TableColumn.

Definition at line 386 of file TableColumnType.h.

References m_buffer.

◆ finishMapFromFile()

template<class t_type>
virtual void TableColumnBuffer< t_type >::finishMapFromFile ( BinaryFileTableInfo & file)
inlineoverridevirtual

Completes file deserialization by extracting the default value from the buffer.

Handles version-specific storage layouts where the default value was stored either at the front or at the end of the serialized buffer.

Parameters
[in]fileThe binary file info containing version and file state.

Reimplemented from TableColumn.

Definition at line 180 of file TableColumnType.h.

References file, m_buffer, m_default_value, and m_has_been_read.

◆ getDefaultValue()

template<class t_type>
const StringAllocatingView TableColumnBuffer< t_type >::getDefaultValue ( ) const
inlineoverridevirtual

Returns the default value as a string representation.

Returns
A StringAllocatingView containing the string form of the default value.

Implements TableColumn.

Definition at line 120 of file TableColumnType.h.

References m_default_value.

◆ insert()

template<class t_type>
void TableColumnBuffer< t_type >::insert ( uint04 index)
inlineoverridevirtual

Inserts a new row at the given index, initialized to the default value.

Parameters
[in]indexThe position at which to insert the new row.

Implements TableColumn.

Definition at line 252 of file TableColumnType.h.

References defaultValue(), and m_buffer.

◆ insertRows()

template<class t_type>
virtual void TableColumnBuffer< t_type >::insertRows ( uint04 location,
uint04 size )
inlineoverridevirtual

Inserts multiple rows at the given location, each initialized to the default value.

Parameters
[in]locationThe position at which to insert the rows.
[in]sizeThe number of rows to insert.

Implements TableColumn.

Definition at line 406 of file TableColumnType.h.

References defaultValue(), m_buffer, and size().

◆ isSame()

template<class t_type>
bool TableColumnBuffer< t_type >::isSame ( uint04 index,
const StringView & value ) const
inlinenodiscardoverridevirtual

Checks whether the value at the given row equals the provided string value.

Parameters
[in]indexThe row index to check.
[in]valueThe string representation to compare against.
Returns
True if the row value matches the parsed string value.

Implements TableColumn.

Reimplemented in TableColumnString.

Definition at line 415 of file TableColumnType.h.

References StringView::getAs(), and pullValue().

◆ mapFromFile()

template<class t_type>
virtual void TableColumnBuffer< t_type >::mapFromFile ( BinaryFileTableInfo & file)
inlineoverridevirtual

Reads the column data from a binary file, handling multiple version formats.

Versions <= 1539350691 had an error in default value storage, so the default is skipped. Versions <= 1613942093 stored the default in a separate buffer. Later versions append the default to the end of the main buffer.

Parameters
[in]fileThe binary file info with version number and file handle.

Reimplemented from TableColumn.

Reimplemented in TableColumnString.

Definition at line 203 of file TableColumnType.h.

References file, m_buffer, m_default_value, and m_has_been_read.

Referenced by TableColumnString::mapFromFile().

◆ mapToFile() [1/2]

template<class t_type>
virtual void TableColumnBuffer< t_type >::mapToFile ( BinaryFileTableInfo & file,
BinaryCompressionObject & object )
inlineoverridevirtual

Writes pre-compressed column data to a binary file.

Parameters
[in]fileThe binary file info containing the output file handle.
[in]objectThe pre-compressed data to write.

Reimplemented from TableColumn.

Definition at line 375 of file TableColumnType.h.

References file.

◆ mapToFile() [2/2]

template<class t_type>
virtual void TableColumnBuffer< t_type >::mapToFile ( BinaryFileTableInfo & file,
int compression )
inlineoverridevirtual

Writes the column data to a binary file with the given compression mode.

Parameters
[in]fileThe binary file info containing the output file handle.
[in]compressionThe compression mode to use when writing.

Reimplemented from TableColumn.

Definition at line 368 of file TableColumnType.h.

References cast(), and file.

◆ operator[]() [1/2]

template<class t_type>
decltype(auto) TableColumnBuffer< t_type >::operator[] ( const uint04 index)
inlinenodiscard

Returns a reference to the element at the given row index.

Parameters
[in]indexThe row index to access.
Returns
A reference to the element at the specified index.

Definition at line 157 of file TableColumnType.h.

References m_buffer.

◆ operator[]() [2/2]

template<class t_type>
decltype(auto) TableColumnBuffer< t_type >::operator[] ( const uint04 index) const
inlinenodiscard

Returns a const reference to the element at the given row index.

Parameters
[in]indexThe row index to access.
Returns
A const reference to the element at the specified index.

Definition at line 164 of file TableColumnType.h.

References m_buffer.

◆ pullValue() [1/2]

template<class t_type>
decltype(auto) TableColumnBuffer< t_type >::pullValue ( uint04 index)
inlineprotected

Returns a reference to the value at the given row index.

Parameters
[in]indexThe row index.
Returns
A reference to the element.

Definition at line 455 of file TableColumnType.h.

References m_buffer.

Referenced by beginsWith(), contains(), TableColumnColorType::get(), TableColumnColorType::get(), TableColumnColorType::get(), TableColumnColorType::get(), TableColumnColorType::get(), TableColumnColorType::get(), TableColumnColorType::get(), TableColumnColorType::get(), TableColumnColorType::get(), TableColumnColorType::get(), TableColumnColorType::get(), TableColumnColorType::get(), TableColumnColorType::get(), TableColumnColorType::get(), TableColumnColorType::get(), TableColumnColorType::get(), TableColumnColorType::get(), TableColumnColorType::get(), TableColumnColorType::get(), TableColumnColorType::get(), TableColumnColorType::get(), TableColumnColorType::get(), TableColumnColorType::get(), TableColumnColorType::get(), TableColumnColorType::get(), TableColumnString::get(), TableColumnString::get(), TableColumnString::get(), TableColumnString::get(), TableColumnString::get(), TableColumnString::get(), TableColumnString::get(), TableColumnString::get(), TableColumnString::get(), TableColumnString::get(), TableColumnString::get(), TableColumnString::get(), TableColumnString::get(), TableColumnString::get(), TableColumnString::get(), TableColumnString::get(), TableColumnString::get(), TableColumnString::get(), TableColumnString::get(), TableColumnString::get(), TableColumnString::get(), TableColumnString::get(), TableColumnString::get(), TableColumnString::get(), TableColumnString::get(), TableColumnString::get(), TableColumnTypeBuffer< T >::get(), TableColumnTypeBuffer< T >::get(), TableColumnTypeBuffer< T >::get(), TableColumnTypeBuffer< T >::get(), TableColumnTypeBuffer< T >::get(), TableColumnTypeBuffer< T >::get(), TableColumnTypeBuffer< T >::get(), TableColumnTypeBuffer< T >::get(), TableColumnTypeBuffer< T >::get(), TableColumnTypeBuffer< T >::get(), TableColumnTypeBuffer< T >::get(), TableColumnTypeBuffer< T >::get(), TableColumnTypeBuffer< T >::get(), TableColumnTypeBuffer< T >::get(), TableColumnTypeBuffer< T >::get(), TableColumnTypeBuffer< T >::get(), TableColumnTypeBuffer< T >::get(), TableColumnTypeBuffer< T >::get(), TableColumnTypeBuffer< T >::get(), TableColumnTypeBuffer< T >::get(), TableColumnTypeBuffer< T >::get(), TableColumnTypeBuffer< T >::get(), TableColumnTypeBuffer< T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, T >::get(), TableVectorType< 1, t_type >::get(), TableVectorType< 1, t_type >::get(), TableVectorType< 1, t_type >::get(), TableVectorType< 1, t_type >::get(), TableVectorType< 1, t_type >::get(), TableVectorType< 1, t_type >::get(), TableVectorType< 1, t_type >::get(), TableVectorType< 1, t_type >::get(), TableVectorType< 1, t_type >::get(), TableVectorType< 1, t_type >::get(), TableVectorType< 1, t_type >::get(), TableVectorType< 1, t_type >::get(), TableVectorType< 1, t_type >::get(), TableVectorType< 1, t_type >::get(), TableVectorType< 1, t_type >::get(), TableVectorType< 1, t_type >::get(), TableVectorType< 1, t_type >::get(), TableVectorType< 1, t_type >::get(), TableVectorType< 1, t_type >::get(), TableVectorType< 1, t_type >::get(), TableVectorType< 1, t_type >::get(), TableVectorType< 1, t_type >::get(), TableVectorType< 1, t_type >::get(), TableVectorType< 1, t_type >::get(), isSame(), TableColumnColorType::set(), TableColumnColorType::set(), TableColumnColorType::set(), TableColumnColorType::set(), TableColumnColorType::set(), TableColumnColorType::set(), TableColumnColorType::set(), TableColumnColorType::set(), TableColumnColorType::set(), TableColumnColorType::set(), TableColumnColorType::set(), TableColumnColorType::set(), TableColumnColorType::set(), TableColumnColorType::set(), TableColumnColorType::set(), TableColumnColorType::set(), TableColumnColorType::set(), TableColumnColorType::set(), TableColumnColorType::set(), TableColumnColorType::set(), TableColumnColorType::set(), TableColumnColorType::set(), TableColumnColorType::set(), TableColumnColorType::set(), TableColumnString::set(), TableColumnString::set(), TableColumnString::set(), TableColumnString::set(), TableColumnString::set(), TableColumnString::set(), TableColumnString::set(), TableColumnString::set(), TableColumnString::set(), TableColumnString::set(), TableColumnString::set(), TableColumnString::set(), TableColumnString::set(), TableColumnString::set(), TableColumnString::set(), TableColumnString::set(), TableColumnString::set(), TableColumnString::set(), TableColumnString::set(), TableColumnString::set(), TableColumnString::set(), TableColumnString::set(), TableColumnString::set(), TableColumnString::set(), TableVectorType< 1, t_type >::set(), TableVectorType< 1, t_type >::set(), TableVectorType< 1, t_type >::set(), TableVectorType< 1, t_type >::set(), TableVectorType< 1, t_type >::set(), TableVectorType< 1, t_type >::set(), TableVectorType< 1, t_type >::set(), TableVectorType< 1, t_type >::set(), TableVectorType< 1, t_type >::set(), TableVectorType< 1, t_type >::set(), TableVectorType< 1, t_type >::set(), TableVectorType< 1, t_type >::set(), TableVectorType< 1, t_type >::set(), TableVectorType< 1, t_type >::set(), TableVectorType< 1, t_type >::set(), TableVectorType< 1, t_type >::set(), TableVectorType< 1, t_type >::set(), TableVectorType< 1, t_type >::set(), TableVectorType< 1, t_type >::set(), TableVectorType< 1, t_type >::set(), TableVectorType< 1, t_type >::set(), TableVectorType< 1, t_type >::set(), TableVectorType< 1, t_type >::set(), and TableVectorType< 1, t_type >::set().

◆ pullValue() [2/2]

template<class t_type>
decltype(auto) TableColumnBuffer< t_type >::pullValue ( uint04 index) const
inlineprotected

Returns a const reference to the value at the given row index.

Parameters
[in]indexThe row index.
Returns
A const reference to the element.

Definition at line 462 of file TableColumnType.h.

References m_buffer.

◆ removeRow()

template<class t_type>
void TableColumnBuffer< t_type >::removeRow ( uint04 index)
inlineoverridevirtual

Removes a single row at the given index.

Parameters
[in]indexThe row index to remove.

Implements TableColumn.

Definition at line 291 of file TableColumnType.h.

References m_buffer.

◆ removeRows() [1/3]

template<class t_type>
virtual void TableColumnBuffer< t_type >::removeRows ( const Buffer< uint04 > & sorted_remove_indices)
inlineoverridevirtual

Removes rows at the specified sorted indices.

Indices must be provided in ascending sorted order for correct behavior.

Parameters
[in]sorted_remove_indicesA sorted buffer of row indices to remove.

Implements TableColumn.

Definition at line 306 of file TableColumnType.h.

References m_buffer.

◆ removeRows() [2/3]

template<class t_type>
virtual void TableColumnBuffer< t_type >::removeRows ( uint04 index,
uint04 size )
inlineoverridevirtual

Removes a contiguous range of rows starting at the given index.

Parameters
[in]indexThe starting row index.
[in]sizeThe number of rows to remove.

Implements TableColumn.

Definition at line 298 of file TableColumnType.h.

References m_buffer, and size().

◆ removeRows() [3/3]

template<class t_type>
void TableColumnBuffer< t_type >::removeRows ( uint04 offset,
const Buffer< bool > & indices )
inlineoverridevirtual

Removes rows using a boolean mask starting at the given offset.

Rows where the corresponding boolean is true are removed. Remaining rows after the mask region are shifted down to fill gaps.

Parameters
[in]offsetThe starting row index for the mask.
[in]indicesA boolean buffer where true indicates removal.

Implements TableColumn.

Definition at line 333 of file TableColumnType.h.

References m_buffer.

◆ resetRow()

template<class t_type>
virtual void TableColumnBuffer< t_type >::resetRow ( uint04 row)
inlineoverridevirtual

Resets the specified row to the default value.

Parameters
[in]rowThe row index to reset.

Reimplemented from TableColumn.

Definition at line 259 of file TableColumnType.h.

References m_buffer, and m_default_value.

◆ set()

template<class t_type>
void TableColumnBuffer< t_type >::set ( uint04 index,
const t_type & value )
inline

Sets the value at the given row index.

Parameters
[in]indexThe row index.
[in]valueThe value to assign.

Definition at line 171 of file TableColumnType.h.

References m_buffer.

◆ setDefaultValue()

template<class t_type>
virtual void TableColumnBuffer< t_type >::setDefaultValue ( const StringAllocatingView & value)
inlineoverridevirtual

Sets the default value for new rows by parsing a string representation.

Parameters
[in]valueThe string representation of the default value to set.

Implements TableColumn.

Reimplemented in TableColumnColorType, TableMatrixType< t_type, t_cols, t_rows >, and TableMatrixType< T, t_cols, t_rows >.

Definition at line 114 of file TableColumnType.h.

References StringView::getAs(), and m_default_value.

◆ setDefaultValueFrom()

template<class t_type>
virtual void TableColumnBuffer< t_type >::setDefaultValueFrom ( const TableColumn & column)
inlineoverridevirtual

Copies the default value from another column into this one.

Parameters
[in]columnThe source column to copy the default value from.

Implements TableColumn.

Definition at line 245 of file TableColumnType.h.

References TableColumn::TableColumn(), and DefaultSetter< t_type >::setDefaultValueFrom().

◆ setSize()

template<class t_type>
void TableColumnBuffer< t_type >::setSize ( uint04 size)
inlineoverridevirtual

Resizes the column to the specified number of rows.

When growing, new rows are filled with the default value. When shrinking, excess rows are discarded.

Parameters
[in]sizeThe desired number of rows.

Implements TableColumn.

Definition at line 229 of file TableColumnType.h.

References defaultValue(), m_buffer, and size().

Referenced by TableColumnColorType::getSelected(), TableVectorType< 1, T >::getSelected(), and TableVectorType< 1, t_type >::getSelected().

◆ size()

◆ swap()

template<class t_type>
virtual void TableColumnBuffer< t_type >::swap ( uint04 a,
uint04 b )
inlineoverridevirtual

Swaps the values at two row indices.

Parameters
[in]aThe first row index.
[in]bThe second row index.

Implements TableColumn.

Definition at line 150 of file TableColumnType.h.

References m_buffer.

◆ type()


The documentation for this class was generated from the following file: