GEOS
Classes | Namespaces | Functions | Variables
TableData.hpp File Reference
#include "common/Units.hpp"
#include "common/DataTypes.hpp"
#include "common/format/Format.hpp"
#include "TableTypes.hpp"

Go to the source code of this file.

Classes

class  geos::TableData
 Class for managing table data. More...
 
struct  geos::TableData::CellData
 Representing a single cell's data within a TableData row. More...
 
class  geos::TableData2D
 Class for managing 2D table m_data. More...
 
struct  geos::TableData2D::TableDataHolder
 Struct containing conversion informations. More...
 

Namespaces

 geos
 

Functions

template<typename T >
unsigned long geos::basicSerialization::sizeOfPrimitive (T)
 
unsigned long geos::basicSerialization::sizeOfString (string const &str)
 Returns the size of a string (header size + content). More...
 
void geos::basicSerialization::serializeString (string const &data, stdVector< buffer_unit_type > &out)
 Write a string value to the buffer. More...
 
void geos::basicSerialization::deserializeString (string &str, buffer_unit_type const *&ptr, buffer_unit_type const *end)
 Reads a string value from the buffer and advances the pointer. More...
 
bool geos::tableDataSorting::positiveNumberStringComp (string_view a, string_view b)
 Compare two string number string by in ascending numerical order. More...
 
Inlines definition
template<typename T , std::enable_if_t< std::is_trivially_copyable_v< T >, bool > = true>
void geos::basicSerialization::serializePrimitive (T const data, stdVector< buffer_unit_type > &out)
 Write the data to the buffer. More...
 
template<typename T , std::enable_if_t< std::is_trivially_copyable_v< T >, bool > = true>
void geos::basicSerialization::deserializePrimitive (T &data, buffer_unit_type const *&ptr, buffer_unit_type const *end)
 Reads the data from the buffer and advances the pointer. More...
 

Variables

template<typename T >
constexpr bool geos::isCellType = std::is_same_v< T, CellType >
 Trait to check is the args is a special type of cell. More...
 

Function Documentation

◆ deserializePrimitive()

template<typename T , std::enable_if_t< std::is_trivially_copyable_v< T >, bool > = true>
void geos::basicSerialization::deserializePrimitive ( T &  data,
buffer_unit_type const *&  ptr,
buffer_unit_type const *  end 
)

Reads the data from the buffer and advances the pointer.

Template Parameters
TThe type of the data who must be trivially copiable
Parameters
dataDestination variable.
ptrCurrent read pointer (advanced by sizeof(string)).
endSafety: maximum buffer limit.

Definition at line 412 of file TableData.hpp.

◆ deserializeString()

void geos::basicSerialization::deserializeString ( string &  str,
buffer_unit_type const *&  ptr,
buffer_unit_type const *  end 
)

Reads a string value from the buffer and advances the pointer.

Parameters
strDestination string variable.
ptrCurrent read pointer (advanced by sizeof(string)).
endSafety: maximum buffer limit.

◆ positiveNumberStringComp()

bool geos::tableDataSorting::positiveNumberStringComp ( string_view  a,
string_view  b 
)

Compare two string number string by in ascending numerical order.

Parameters
aThe string to compare
bThe string to compare
Returns
True if a is greater than b

◆ serializePrimitive()

template<typename T , std::enable_if_t< std::is_trivially_copyable_v< T >, bool > = true>
void geos::basicSerialization::serializePrimitive ( T const  data,
stdVector< buffer_unit_type > &  out 
)

Write the data to the buffer.

Template Parameters
TThe type of the data who must be trivially copiable
Parameters
dataDestination variable.
outThe buffer to write in.

Definition at line 402 of file TableData.hpp.

◆ serializeString()

void geos::basicSerialization::serializeString ( string const &  data,
stdVector< buffer_unit_type > &  out 
)

Write a string value to the buffer.

Parameters
dataString variable.
outThe buffer to write in.

◆ sizeOfPrimitive()

template<typename T >
unsigned long geos::basicSerialization::sizeOfPrimitive ( T  )
inline
Template Parameters
TThe trivial type
Returns
Returns the size occupied by a trivial type in memory.

Definition at line 335 of file TableData.hpp.

◆ sizeOfString()

unsigned long geos::basicSerialization::sizeOfString ( string const &  str)
inline

Returns the size of a string (header size + content).

Parameters
strThe target string
Returns
Size in bytes.

Definition at line 343 of file TableData.hpp.