SLikeNet 0.1.3

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Static Public Member Functions | List of all members
SLNet::TableSerializer Class Reference

`#include <slikenet/TableSerializer.h>`

## Static Public Member Functions

static void | SerializeTable (DataStructures::Table *in, SLNet::BitStream *out)
static bool | DeserializeTable (unsigned char *serializedTable, unsigned int dataLength, DataStructures::Table *out)
static bool | DeserializeTable (SLNet::BitStream *in, DataStructures::Table *out)
static void | SerializeColumns (DataStructures::Table *in, SLNet::BitStream *out)
static void | SerializeColumns (DataStructures::Table *in, SLNet::BitStream *out, DataStructures::List< int > &skipColumnIndices)
static bool | DeserializeColumns (SLNet::BitStream *in, DataStructures::Table *out)
static void | SerializeRow (DataStructures::Table::Row *in, unsigned keyIn, const DataStructures::List< DataStructures::Table::ColumnDescriptor > &columns, SLNet::BitStream *out)
static void | SerializeRow (DataStructures::Table::Row *in, unsigned keyIn, const DataStructures::List< DataStructures::Table::ColumnDescriptor > &columns, SLNet::BitStream *out, DataStructures::List< int > &skipColumnIndices)
static bool | DeserializeRow (SLNet::BitStream *in, DataStructures::Table *out)
static void | SerializeCell (SLNet::BitStream *out, DataStructures::Table::Cell *cell, DataStructures::Table::ColumnType columnType)
static bool | DeserializeCell (SLNet::BitStream *in, DataStructures::Table::Cell *cell, DataStructures::Table::ColumnType columnType)
static void | SerializeFilterQuery (SLNet::BitStream *in, DataStructures::Table::FilterQuery *query)
static bool | DeserializeFilterQuery (SLNet::BitStream *out, DataStructures::Table::FilterQuery *query)
static void | SerializeFilterQueryList (SLNet::BitStream *in, DataStructures::Table::FilterQuery *query, unsigned int numQueries, unsigned int maxQueries)
static bool | DeserializeFilterQueryList (SLNet::BitStream *out, DataStructures::Table::FilterQuery **query, unsigned int *numQueries, unsigned int maxQueries, int allocateExtraQueries=0)
static void | DeallocateQueryList (DataStructures::Table::FilterQuery *query, unsigned int numQueries)

## Detailed Description

Definition at line 31 of file TableSerializer.h.

## Member Function Documentation

void TableSerializer::DeallocateQueryList | ( | DataStructures::Table::FilterQuery * | query,
|  | unsigned int | numQueries
| ) |  |

static

Definition at line 326 of file TableSerializer.cpp.

References _FILE_AND_LINE_, SLNet::OP_DELETE(), and SLNet::OP_DELETE_ARRAY().

bool TableSerializer::DeserializeCell | ( | SLNet::BitStream * | in,
|  | DataStructures::Table::Cell * | cell,
|  | DataStructures::Table::ColumnType | columnType
| ) |  |

static

Definition at line 193 of file TableSerializer.cpp.

References SLNet::BitStream::AlignReadToByteBoundary(), DataStructures::Table::BINARY, BITS_TO_BYTES, BYTES_TO_BITS, DataStructures::Table::Cell::Clear(), SLNet::BitStream::GetData(), SLNet::BitStream::GetNumberOfUnreadBits(), SLNet::BitStream::GetReadOffset(), SLNet::BitStream::IgnoreBits(), SLNet::StringCompressor::Instance(), DataStructures::Table::NUMERIC, DataStructures::Table::POINTER, RakAssert, SLNet::BitStream::Read(), DataStructures::Table::Cell::Set(), DataStructures::Table::Cell::SetPtr(), and DataStructures::Table::STRING.

Referenced by DeserializeRow().

bool TableSerializer::DeserializeColumns | ( | SLNet::BitStream * | in,
|  | DataStructures::Table * | out
| ) |  |

static

Definition at line 88 of file TableSerializer.cpp.

References _TABLE_MAX_COLUMN_NAME_LENGTH, DataStructures::Table::AddColumn(), DataStructures::Table::Clear(), SLNet::StringCompressor::DecodeString(), SLNet::StringCompressor::Instance(), and SLNet::BitStream::Read().

Referenced by DeserializeTable().

bool TableSerializer::DeserializeFilterQuery | ( | SLNet::BitStream * | out,
|  | DataStructures::Table::FilterQuery * | query
| ) |  |

static

Definition at line 253 of file TableSerializer.cpp.

References _TABLE_MAX_COLUMN_NAME_LENGTH, DataStructures::Table::Cell::c, DataStructures::Table::FilterQuery::cellValue, DataStructures::Table::Cell::Clear(), DataStructures::Table::FilterQuery::columnIndex, DataStructures::Table::FilterQuery::columnName, SLNet::StringCompressor::DecodeString(), DataStructures::Table::Cell::i, SLNet::StringCompressor::Instance(), DataStructures::Table::Cell::isEmpty, DataStructures::Table::FilterQuery::operation, DataStructures::Table::Cell::ptr, RakAssert, SLNet::BitStream::Read(), SLNet::BitStream::ReadAlignedBytesSafeAlloc(), and SLNet::BitStream::ReadCompressed().

Referenced by DeserializeFilterQueryList().

bool TableSerializer::DeserializeFilterQueryList | ( | SLNet::BitStream * | out,
|  | DataStructures::Table::FilterQuery ** | query,
|  | unsigned int * | numQueries,
|  | unsigned int | maxQueries,
|  | int | allocateExtraQueries = `0`
| ) |  |

static

Definition at line 291 of file TableSerializer.cpp.

References DataStructures::Table::FilterQuery::cellValue, DeserializeFilterQuery(), RakAssert, SLNet::BitStream::Read(), and SLNet::BitStream::ReadCompressed().

bool TableSerializer::DeserializeRow | ( | SLNet::BitStream * | in,
|  | DataStructures::Table * | out
| ) |  |

static

Definition at line 141 of file TableSerializer.cpp.

References DataStructures::Table::AddRow(), DataStructures::Table::Row::cells, DeserializeCell(), DataStructures::Table::GetColumns(), SLNet::BitStream::Read(), and DataStructures::Table::RemoveRow().

Referenced by DeserializeTable().

bool TableSerializer::DeserializeTable | ( | unsigned char * | serializedTable,
|  | unsigned int | dataLength,
|  | DataStructures::Table * | out
| ) |  |

static

Definition at line 65 of file TableSerializer.cpp.

bool TableSerializer::DeserializeTable | ( | SLNet::BitStream * | in,
|  | DataStructures::Table * | out
| ) |  |

static

Definition at line 70 of file TableSerializer.cpp.

References DeserializeColumns(), DeserializeRow(), RakAssert, and SLNet::BitStream::Read().

void TableSerializer::SerializeCell | ( | SLNet::BitStream * | out,
|  | DataStructures::Table::Cell * | cell,
|  | DataStructures::Table::ColumnType | columnType
| ) |  |

static

Definition at line 164 of file TableSerializer.cpp.

References DataStructures::Table::BINARY, DataStructures::Table::Cell::c, SLNet::StringCompressor::EncodeString(), DataStructures::Table::Cell::i, SLNet::StringCompressor::Instance(), DataStructures::Table::Cell::isEmpty, DataStructures::Table::NUMERIC, DataStructures::Table::POINTER, DataStructures::Table::Cell::ptr, RakAssert, DataStructures::Table::STRING, SLNet::BitStream::Write(), and SLNet::BitStream::WriteAlignedBytes().

Referenced by SerializeRow().

void TableSerializer::SerializeColumns | ( | DataStructures::Table * | in,
|  | SLNet::BitStream * | out
| ) |  |

static

Definition at line 40 of file TableSerializer.cpp.

References _TABLE_MAX_COLUMN_NAME_LENGTH, SLNet::StringCompressor::EncodeString(), DataStructures::Table::GetColumns(), SLNet::StringCompressor::Instance(), DataStructures::List< list_type >::Size(), and SLNet::BitStream::Write().

Referenced by SerializeTable().

void TableSerializer::SerializeColumns | ( | DataStructures::Table * | in,
|  | SLNet::BitStream * | out,
|  | DataStructures::List< int > & | skipColumnIndices
| ) |  |

static

Definition at line 51 of file TableSerializer.cpp.

References _TABLE_MAX_COLUMN_NAME_LENGTH, SLNet::StringCompressor::EncodeString(), DataStructures::Table::GetColumns(), DataStructures::List< list_type >::GetIndexOf(), SLNet::StringCompressor::Instance(), DataStructures::List< list_type >::Size(), and SLNet::BitStream::Write().

void TableSerializer::SerializeFilterQuery | ( | SLNet::BitStream * | in,
|  | DataStructures::Table::FilterQuery * | query
| ) |  |

static

Definition at line 239 of file TableSerializer.cpp.

References _TABLE_MAX_COLUMN_NAME_LENGTH, DataStructures::Table::Cell::c, DataStructures::Table::FilterQuery::cellValue, DataStructures::Table::FilterQuery::columnIndex, DataStructures::Table::FilterQuery::columnName, SLNet::StringCompressor::EncodeString(), DataStructures::Table::Cell::i, SLNet::StringCompressor::Instance(), DataStructures::Table::Cell::isEmpty, DataStructures::Table::FilterQuery::operation, DataStructures::Table::Cell::ptr, SLNet::BitStream::Write(), SLNet::BitStream::WriteAlignedBytesSafe(), and SLNet::BitStream::WriteCompressed().

Referenced by SerializeFilterQueryList().

void TableSerializer::SerializeFilterQueryList | ( | SLNet::BitStream * | in,
|  | DataStructures::Table::FilterQuery * | query,
|  | unsigned int | numQueries,
|  | unsigned int | maxQueries
| ) |  |

static

Definition at line 276 of file TableSerializer.cpp.

References RakAssert, SerializeFilterQuery(), SLNet::BitStream::Write(), and SLNet::BitStream::WriteCompressed().

void TableSerializer::SerializeRow | ( | DataStructures::Table::Row * | in,
|  | unsigned | keyIn,
|  | const DataStructures::List< DataStructures::Table::ColumnDescriptor > & | columns,
|  | SLNet::BitStream * | out
| ) |  |

static

Definition at line 106 of file TableSerializer.cpp.

References DataStructures::Table::Row::cells, SerializeCell(), DataStructures::List< list_type >::Size(), and SLNet::BitStream::Write().

Referenced by SerializeTable().

void TableSerializer::SerializeRow | ( | DataStructures::Table::Row * | in,
|  | unsigned | keyIn,
|  | const DataStructures::List< DataStructures::Table::ColumnDescriptor > & | columns,
|  | SLNet::BitStream * | out,
|  | DataStructures::List< int > & | skipColumnIndices
| ) |  |

static

Definition at line 118 of file TableSerializer.cpp.

References DataStructures::Table::Row::cells, DataStructures::List< list_type >::GetIndexOf(), SerializeCell(), DataStructures::List< list_type >::Size(), and SLNet::BitStream::Write().

void TableSerializer::SerializeTable | ( | DataStructures::Table * | in,
|  | SLNet::BitStream * | out
| ) |  |

static

Definition at line 24 of file TableSerializer.cpp.

References DataStructures::Page< KeyType, DataType, order >::data, DataStructures::Table::GetColumns(), DataStructures::BPlusTree< KeyType, DataType, order >::GetListHead(), DataStructures::Table::GetRows(), DataStructures::Page< KeyType, DataType, order >::keys, DataStructures::Page< KeyType, DataType, order >::next, SerializeColumns(), SerializeRow(), DataStructures::Page< KeyType, DataType, order >::size, DataStructures::BPlusTree< KeyType, DataType, order >::Size(), and SLNet::BitStream::Write().

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

- Source/include/slikenet/TableSerializer.h
- Source/src/TableSerializer.cpp