Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
serialize.h File Reference
#include "irrlichttypes_bloated.h"
#include "exceptions.h"
#include "ieee_float.h"
#include "config.h"
#include <cstring>
#include <cassert>
#include <iostream>
#include <string>
#include <string_view>
+ Include dependency graph for serialize.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define LITTLE_ENDIAN   1234
 
#define BIG_ENDIAN   4321
 
#define FIXEDPOINT_FACTOR   1000.0f
 
#define F1000_MIN   ((float)(s32)((float)(-0x7FFFFFFF - 1) / FIXEDPOINT_FACTOR))
 
#define F1000_MAX   ((float)(s32)((float)(0x7FFFFFFF) / FIXEDPOINT_FACTOR))
 
#define STRING_MAX_LEN   0xFFFF
 
#define WIDE_STRING_MAX_LEN   0xFFFF
 
#define LONG_STRING_MAX_LEN   (64 * 1024 * 1024)
 
#define MAKE_STREAM_READ_FXN(T, N, S)
 
#define MAKE_STREAM_WRITE_FXN(T, N, S)
 

Functions

u16 readU16 (const u8 *data)
 
u32 readU32 (const u8 *data)
 
u64 readU64 (const u8 *data)
 
void writeU16 (u8 *data, u16 i)
 
void writeU32 (u8 *data, u32 i)
 
void writeU64 (u8 *data, u64 i)
 
u8 readU8 (const u8 *data)
 
s8 readS8 (const u8 *data)
 
s16 readS16 (const u8 *data)
 
s32 readS32 (const u8 *data)
 
s64 readS64 (const u8 *data)
 
f32 readF1000 (const u8 *data)
 
f32 readF32 (const u8 *data)
 
video::SColor readARGB8 (const u8 *data)
 
v2s16 readV2S16 (const u8 *data)
 
v3s16 readV3S16 (const u8 *data)
 
v2s32 readV2S32 (const u8 *data)
 
v3s32 readV3S32 (const u8 *data)
 
v3f readV3F1000 (const u8 *data)
 
v2f readV2F32 (const u8 *data)
 
v3f readV3F32 (const u8 *data)
 
void writeU8 (u8 *data, u8 i)
 
void writeS8 (u8 *data, s8 i)
 
void writeS16 (u8 *data, s16 i)
 
void writeS32 (u8 *data, s32 i)
 
void writeS64 (u8 *data, s64 i)
 
void writeF1000 (u8 *data, f32 i)
 
void writeF32 (u8 *data, f32 i)
 
void writeARGB8 (u8 *data, video::SColor p)
 
void writeV2S16 (u8 *data, v2s16 p)
 
void writeV3S16 (u8 *data, v3s16 p)
 
void writeV2S32 (u8 *data, v2s32 p)
 
void writeV3S32 (u8 *data, v3s32 p)
 
void writeV3F1000 (u8 *data, v3f p)
 
void writeV2F32 (u8 *data, v2f p)
 
void writeV3F32 (u8 *data, v3f p)
 
 MAKE_STREAM_READ_FXN (u8, U8, 1)
 
 MAKE_STREAM_READ_FXN (u16, U16, 2)
 
 MAKE_STREAM_READ_FXN (u32, U32, 4)
 
 MAKE_STREAM_READ_FXN (u64, U64, 8)
 
 MAKE_STREAM_READ_FXN (s8, S8, 1)
 
 MAKE_STREAM_READ_FXN (s16, S16, 2)
 
 MAKE_STREAM_READ_FXN (s32, S32, 4)
 
 MAKE_STREAM_READ_FXN (s64, S64, 8)
 
 MAKE_STREAM_READ_FXN (f32, F1000, 4)
 
 MAKE_STREAM_READ_FXN (f32, F32, 4)
 
 MAKE_STREAM_READ_FXN (v2s16, V2S16, 4)
 
 MAKE_STREAM_READ_FXN (v3s16, V3S16, 6)
 
 MAKE_STREAM_READ_FXN (v2s32, V2S32, 8)
 
 MAKE_STREAM_READ_FXN (v3s32, V3S32, 12)
 
 MAKE_STREAM_READ_FXN (v3f, V3F1000, 12)
 
 MAKE_STREAM_READ_FXN (v2f, V2F32, 8)
 
 MAKE_STREAM_READ_FXN (v3f, V3F32, 12)
 
 MAKE_STREAM_READ_FXN (video::SColor, ARGB8, 4)
 
 MAKE_STREAM_WRITE_FXN (u8, U8, 1)
 
 MAKE_STREAM_WRITE_FXN (u16, U16, 2)
 
 MAKE_STREAM_WRITE_FXN (u32, U32, 4)
 
 MAKE_STREAM_WRITE_FXN (u64, U64, 8)
 
 MAKE_STREAM_WRITE_FXN (s8, S8, 1)
 
 MAKE_STREAM_WRITE_FXN (s16, S16, 2)
 
 MAKE_STREAM_WRITE_FXN (s32, S32, 4)
 
 MAKE_STREAM_WRITE_FXN (s64, S64, 8)
 
 MAKE_STREAM_WRITE_FXN (f32, F1000, 4)
 
 MAKE_STREAM_WRITE_FXN (f32, F32, 4)
 
 MAKE_STREAM_WRITE_FXN (v2s16, V2S16, 4)
 
 MAKE_STREAM_WRITE_FXN (v3s16, V3S16, 6)
 
 MAKE_STREAM_WRITE_FXN (v2s32, V2S32, 8)
 
 MAKE_STREAM_WRITE_FXN (v3s32, V3S32, 12)
 
 MAKE_STREAM_WRITE_FXN (v3f, V3F1000, 12)
 
 MAKE_STREAM_WRITE_FXN (v2f, V2F32, 8)
 
 MAKE_STREAM_WRITE_FXN (v3f, V3F32, 12)
 
 MAKE_STREAM_WRITE_FXN (video::SColor, ARGB8, 4)
 
float clampToF1000 (float v)
 
v3f clampToF1000 (v3f v)
 
std::string serializeString16 (std::string_view plain)
 
std::string deSerializeString16 (std::istream &is)
 
std::string serializeString32 (std::string_view plain)
 
std::string deSerializeString32 (std::istream &is)
 
std::string serializeJsonString (std::string_view plain)
 
std::string deSerializeJsonString (std::istream &is)
 
std::string serializeJsonStringIfNeeded (std::string_view s)
 
std::string deSerializeJsonStringIfNeeded (std::istream &is)
 

Variables

FloatType g_serialize_f32_type
 

Macro Definition Documentation

◆ BIG_ENDIAN

#define BIG_ENDIAN   4321

◆ F1000_MAX

#define F1000_MAX   ((float)(s32)((float)(0x7FFFFFFF) / FIXEDPOINT_FACTOR))

◆ F1000_MIN

#define F1000_MIN   ((float)(s32)((float)(-0x7FFFFFFF - 1) / FIXEDPOINT_FACTOR))

◆ FIXEDPOINT_FACTOR

#define FIXEDPOINT_FACTOR   1000.0f

Referenced by readF1000(), and writeF1000().

◆ LITTLE_ENDIAN

#define LITTLE_ENDIAN   1234

◆ LONG_STRING_MAX_LEN

#define LONG_STRING_MAX_LEN   (64 * 1024 * 1024)

◆ MAKE_STREAM_READ_FXN

#define MAKE_STREAM_READ_FXN ( T,
N,
S )
Value:
inline T read ## N(std::istream &is) \
{ \
char buf[S] = {0}; \
is.read(buf, sizeof(buf)); \
return read ## N((u8 *)buf); \
}

◆ MAKE_STREAM_WRITE_FXN

#define MAKE_STREAM_WRITE_FXN ( T,
N,
S )
Value:
inline void write ## N(std::ostream &os, T val) \
{ \
char buf[S]; \
write ## N((u8 *)buf, val); \
os.write(buf, sizeof(buf)); \
}

◆ STRING_MAX_LEN

◆ WIDE_STRING_MAX_LEN

#define WIDE_STRING_MAX_LEN   0xFFFF

Function Documentation

◆ clampToF1000() [1/2]

float clampToF1000 ( float v)
inline

References F1000_MAX, and F1000_MIN.

Referenced by clampToF1000(), LuaEntitySAO::getStaticData(), and StaticObject::serialize().

+ Here is the caller graph for this function:

◆ clampToF1000() [2/2]

v3f clampToF1000 ( v3f v)
inline

References clampToF1000().

+ Here is the call graph for this function:

◆ deSerializeJsonString()

std::string deSerializeJsonString ( std::istream & is)

References deSerializeJsonString().

+ Here is the call graph for this function:

◆ deSerializeJsonStringIfNeeded()

std::string deSerializeJsonStringIfNeeded ( std::istream & is)

References deSerializeJsonString().

Referenced by ItemStack::deSerialize(), ItemStackMetadata::deSerialize(), and TestSerialization::testSerializeJsonString().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deSerializeString16()

◆ deSerializeString32()

std::string deSerializeString32 ( std::istream & is)

References itos(), LONG_STRING_MAX_LEN, and readU32().

Referenced by LuaEntitySAO::LuaEntitySAO(), content_nodemeta_deserialize_legacy_body(), NodeDefManager::deSerialize(), NodeMetadata::deSerialize(), ParticleParameters::deSerialize(), ServerParticleTexture::deSerialize(), Client::handleCommand_AddParticleSpawner(), PlayerDatabaseLevelDB::loadPlayer(), GenericCAO::processInitData(), TestSerialization::testDeSerializeLongString(), and TestSerialization::testStreamRead().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MAKE_STREAM_READ_FXN() [1/18]

MAKE_STREAM_READ_FXN ( f32 ,
F1000 ,
4  )

◆ MAKE_STREAM_READ_FXN() [2/18]

MAKE_STREAM_READ_FXN ( f32 ,
F32 ,
4  )

◆ MAKE_STREAM_READ_FXN() [3/18]

MAKE_STREAM_READ_FXN ( s16 ,
S16 ,
2  )

◆ MAKE_STREAM_READ_FXN() [4/18]

MAKE_STREAM_READ_FXN ( s32 ,
S32 ,
4  )

◆ MAKE_STREAM_READ_FXN() [5/18]

MAKE_STREAM_READ_FXN ( s64 ,
S64 ,
8  )

◆ MAKE_STREAM_READ_FXN() [6/18]

MAKE_STREAM_READ_FXN ( s8 ,
S8 ,
1  )

◆ MAKE_STREAM_READ_FXN() [7/18]

MAKE_STREAM_READ_FXN ( u16 ,
U16 ,
2  )

◆ MAKE_STREAM_READ_FXN() [8/18]

MAKE_STREAM_READ_FXN ( u32 ,
U32 ,
4  )

◆ MAKE_STREAM_READ_FXN() [9/18]

MAKE_STREAM_READ_FXN ( u64 ,
U64 ,
8  )

◆ MAKE_STREAM_READ_FXN() [10/18]

MAKE_STREAM_READ_FXN ( u8 ,
U8 ,
1  )

◆ MAKE_STREAM_READ_FXN() [11/18]

MAKE_STREAM_READ_FXN ( v2f ,
V2F32 ,
8  )

◆ MAKE_STREAM_READ_FXN() [12/18]

MAKE_STREAM_READ_FXN ( v2s16 ,
V2S16 ,
4  )

◆ MAKE_STREAM_READ_FXN() [13/18]

MAKE_STREAM_READ_FXN ( v2s32 ,
V2S32 ,
8  )

◆ MAKE_STREAM_READ_FXN() [14/18]

MAKE_STREAM_READ_FXN ( v3f ,
V3F1000 ,
12  )

◆ MAKE_STREAM_READ_FXN() [15/18]

MAKE_STREAM_READ_FXN ( v3f ,
V3F32 ,
12  )

◆ MAKE_STREAM_READ_FXN() [16/18]

MAKE_STREAM_READ_FXN ( v3s16 ,
V3S16 ,
6  )

◆ MAKE_STREAM_READ_FXN() [17/18]

MAKE_STREAM_READ_FXN ( v3s32 ,
V3S32 ,
12  )

◆ MAKE_STREAM_READ_FXN() [18/18]

MAKE_STREAM_READ_FXN ( video::SColor ,
ARGB8 ,
4  )

◆ MAKE_STREAM_WRITE_FXN() [1/18]

MAKE_STREAM_WRITE_FXN ( f32 ,
F1000 ,
4  )

◆ MAKE_STREAM_WRITE_FXN() [2/18]

MAKE_STREAM_WRITE_FXN ( f32 ,
F32 ,
4  )

◆ MAKE_STREAM_WRITE_FXN() [3/18]

MAKE_STREAM_WRITE_FXN ( s16 ,
S16 ,
2  )

◆ MAKE_STREAM_WRITE_FXN() [4/18]

MAKE_STREAM_WRITE_FXN ( s32 ,
S32 ,
4  )

◆ MAKE_STREAM_WRITE_FXN() [5/18]

MAKE_STREAM_WRITE_FXN ( s64 ,
S64 ,
8  )

◆ MAKE_STREAM_WRITE_FXN() [6/18]

MAKE_STREAM_WRITE_FXN ( s8 ,
S8 ,
1  )

◆ MAKE_STREAM_WRITE_FXN() [7/18]

MAKE_STREAM_WRITE_FXN ( u16 ,
U16 ,
2  )

◆ MAKE_STREAM_WRITE_FXN() [8/18]

MAKE_STREAM_WRITE_FXN ( u32 ,
U32 ,
4  )

◆ MAKE_STREAM_WRITE_FXN() [9/18]

MAKE_STREAM_WRITE_FXN ( u64 ,
U64 ,
8  )

◆ MAKE_STREAM_WRITE_FXN() [10/18]

MAKE_STREAM_WRITE_FXN ( u8 ,
U8 ,
1  )

◆ MAKE_STREAM_WRITE_FXN() [11/18]

MAKE_STREAM_WRITE_FXN ( v2f ,
V2F32 ,
8  )

◆ MAKE_STREAM_WRITE_FXN() [12/18]

MAKE_STREAM_WRITE_FXN ( v2s16 ,
V2S16 ,
4  )

◆ MAKE_STREAM_WRITE_FXN() [13/18]

MAKE_STREAM_WRITE_FXN ( v2s32 ,
V2S32 ,
8  )

◆ MAKE_STREAM_WRITE_FXN() [14/18]

MAKE_STREAM_WRITE_FXN ( v3f ,
V3F1000 ,
12  )

◆ MAKE_STREAM_WRITE_FXN() [15/18]

MAKE_STREAM_WRITE_FXN ( v3f ,
V3F32 ,
12  )

◆ MAKE_STREAM_WRITE_FXN() [16/18]

MAKE_STREAM_WRITE_FXN ( v3s16 ,
V3S16 ,
6  )

◆ MAKE_STREAM_WRITE_FXN() [17/18]

MAKE_STREAM_WRITE_FXN ( v3s32 ,
V3S32 ,
12  )

◆ MAKE_STREAM_WRITE_FXN() [18/18]

MAKE_STREAM_WRITE_FXN ( video::SColor ,
ARGB8 ,
4  )

◆ readARGB8()

video::SColor readARGB8 ( const u8 * data)
inline

References p(), and readU32().

Referenced by ContentFeatures::deSerialize(), ItemDefinition::deSerialize(), ObjectProperties::deSerialize(), WearBarParams::deserialize(), Client::handleCommand_HudSetSky(), NetworkPacket::operator>>(), and TestSerialization::testStreamRead().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readF1000()

f32 readF1000 ( const u8 * data)
inline

References FIXEDPOINT_FACTOR, and readS32().

Referenced by LuaEntitySAO::LuaEntitySAO(), NodeTimer::deSerialize(), readV3F1000(), and TestSerialization::testStreamRead().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readF32()

◆ readS16()

s16 readS16 ( const u8 * data)
inline

References readU16().

Referenced by content_nodemeta_deserialize_legacy_meta(), ContentFeatures::deSerialize(), ItemDefinition::deSerialize(), NodeMetadataList::deSerialize(), ToolCapabilities::deSerialize(), NetworkPacket::operator>>(), GenericCAO::processMessage(), readV2S16(), readV3S16(), and TestSerialization::testStreamRead().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readS32()

s32 readS32 ( const u8 * data)
inline

References readU32().

Referenced by Client::handleCommand_HudSetParam(), NetworkPacket::operator>>(), readF1000(), readV2S32(), readV3S32(), and TestSerialization::testStreamRead().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readS64()

s64 readS64 ( const u8 * data)
inline

References readU64().

Referenced by AuthDatabaseLevelDB::getAuth(), and TestSerialization::testStreamRead().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readS8()

s8 readS8 ( const u8 * data)
inline

References readU8().

Referenced by ObjectProperties::deSerialize(), and TestSerialization::testStreamRead().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readU16()

u16 readU16 ( const u8 * data)
inline

Referenced by LuaEntitySAO::LuaEntitySAO(), content_nodemeta_deserialize_legacy(), CItemDefManager::deSerialize(), ContentFeatures::deSerialize(), ItemDefinition::deSerialize(), MapBlock::deSerialize(), MapNode::deSerialize(), NameIdMapping::deSerialize(), NodeBox::deSerialize(), NodeDefManager::deSerialize(), NodeMetadataList::deSerialize(), NodeTimerList::deSerialize(), ObjectProperties::deSerialize(), ParticleParamTypes::TweenedParameter< T >::deSerialize(), PointedThing::deSerialize(), StaticObjectList::deSerialize(), TileAnimationParams::deSerialize(), TileDef::deSerialize(), ToolCapabilities::deSerialize(), AreaStore::deserialize(), WearBarParams::deserialize(), MapBlock::deSerialize_pre22(), MapNode::deSerializeBulk(), Schematic::deserializeFromMts(), ClientMediaDownloader::deSerializeHashSet(), deSerializeString16(), AuthDatabaseLevelDB::getAuth(), con::BufferedPacket::getSeqnum(), NetworkPacket::getU16(), Client::handleCommand_ActiveObjectMessages(), Client::handleCommand_AddParticleSpawner(), Client::handleCommand_HudSetSky(), con::ConnectionReceiveThread::handlePacketType_Control(), con::ConnectionReceiveThread::handlePacketType_Reliable(), con::IncomingSplitBuffer::insert(), PlayerDatabaseLevelDB::loadPlayer(), NetworkPacket::operator>>(), NetworkPacket::operator>>(), NetworkPacket::operator>>(), GenericCAO::processInitData(), GenericCAO::processMessage(), NetworkPacket::putRawPacket(), con::readPeerId(), readS16(), TestConnection::testHelpers(), TestMapBlock::testSave29(), and TestSerialization::testStreamRead().

+ Here is the caller graph for this function:

◆ readU32()

◆ readU64()

u64 readU64 ( const u8 * data)
inline

Referenced by NetworkPacket::operator>>(), readS64(), and TestSerialization::testStreamRead().

+ Here is the caller graph for this function:

◆ readU8()

u8 readU8 ( const u8 * data)
inline

Referenced by LuaEntitySAO::LuaEntitySAO(), content_nodemeta_deserialize_legacy_body(), CItemDefManager::deSerialize(), ContentFeatures::deSerialize(), ItemDefinition::deSerialize(), MapBlock::deSerialize(), MapNode::deSerialize(), NameIdMapping::deSerialize(), NodeBox::deSerialize(), NodeDefManager::deSerialize(), NodeMetadata::deSerialize(), NodeMetadataList::deSerialize(), NodeTimerList::deSerialize(), ObjectProperties::deSerialize(), ParticleParameters::deSerialize(), ParticleParamTypes::TweenedParameter< T >::deSerialize(), Pointabilities::deSerialize(), PointedThing::deSerialize(), StaticObject::deSerialize(), StaticObjectList::deSerialize(), TileAnimationParams::deSerialize(), TileDef::deSerialize(), ToolCapabilities::deSerialize(), TouchInteraction::deSerialize(), AreaStore::deserialize(), WearBarParams::deserialize(), ServerMap::deSerializeBlock(), MapNode::deSerializeBulk(), Schematic::deserializeFromMts(), MapBlock::deSerializeNetworkSpecific(), Pointabilities::deSerializePointabilityType(), AuthDatabaseLevelDB::getAuth(), NetworkPacket::getU8(), Client::handleCommand_AddParticleSpawner(), Client::handleCommand_HudSetSky(), con::ConnectionReceiveThread::handlePacketType_Control(), con::IncomingSplitBuffer::insert(), con::ReliablePacketBuffer::insert(), PlayerDatabaseLevelDB::loadPlayer(), NetworkPacket::operator>>(), NetworkPacket::operator>>(), NetworkPacket::operator>>(), GenericCAO::processInitData(), GenericCAO::processMessage(), con::ConnectionReceiveThread::processPacket(), con::readChannel(), readS8(), TestConnection::testHelpers(), TestMapBlock::testLoad20(), TestMapBlock::testLoad29(), TestMapBlock::testLoadNonStd(), TestMapBlock::testSave29(), and TestSerialization::testStreamRead().

◆ readV2F32()

v2f readV2F32 ( const u8 * data)
inline

References p(), and readF32().

Referenced by NetworkPacket::operator>>(), and GenericCAO::processMessage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readV2S16()

v2s16 readV2S16 ( const u8 * data)
inline

References p(), and readS16().

Referenced by ObjectProperties::deSerialize(), GenericCAO::processMessage(), and TestSerialization::testStreamRead().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readV2S32()

v2s32 readV2S32 ( const u8 * data)
inline

References p(), and readS32().

Referenced by NetworkPacket::operator>>(), and TestSerialization::testStreamRead().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readV3F1000()

v3f readV3F1000 ( const u8 * data)
inline

References p(), and readF1000().

Referenced by LuaEntitySAO::LuaEntitySAO(), StaticObject::deSerialize(), and TestSerialization::testStreamRead().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readV3F32()

v3f readV3F32 ( const u8 * data)
inline

References p(), and readF32().

Referenced by ItemDefinition::deSerialize(), NodeBox::deSerialize(), ObjectProperties::deSerialize(), ParticleParameters::deSerialize(), PlayerDatabaseLevelDB::loadPlayer(), NetworkPacket::operator>>(), GenericCAO::processInitData(), and GenericCAO::processMessage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readV3S16()

v3s16 readV3S16 ( const u8 * data)
inline

References p(), and readS16().

Referenced by PointedThing::deSerialize(), AreaStore::deserialize(), Schematic::deserializeFromMts(), NetworkPacket::operator>>(), and TestSerialization::testStreamRead().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readV3S32()

v3s32 readV3S32 ( const u8 * data)
inline

References p(), and readS32().

Referenced by NetworkPacket::operator>>(), and TestSerialization::testStreamRead().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ serializeJsonString()

std::string serializeJsonString ( std::string_view plain)

References hex_chars.

Referenced by ClientEnvironment::addActiveObject(), serializeJsonStringIfNeeded(), TestSerialization::testSerializeJsonString(), and RollbackAction::toString().

+ Here is the caller graph for this function:

◆ serializeJsonStringIfNeeded()

std::string serializeJsonStringIfNeeded ( std::string_view s)

References serializeJsonString().

Referenced by ItemStack::serialize(), ItemStackMetadata::serialize(), and TestSerialization::testSerializeJsonString().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ serializeString16()

◆ serializeString32()

std::string serializeString32 ( std::string_view plain)

References LONG_STRING_MAX_LEN, and writeU32().

Referenced by ServerActiveObject::generateUpdateInfantCommand(), LuaEntitySAO::getClientInitializationData(), PlayerSAO::getClientInitializationData(), LuaEntitySAO::getStaticData(), PlayerDatabaseLevelDB::savePlayer(), NodeDefManager::serialize(), NodeMetadata::serialize(), ParticleParameters::serialize(), ServerParticleTexture::serialize(), TestSerialization::testDeSerializeLongString(), TestSerialization::testSerializeLongString(), and TestSerialization::testStreamWrite().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writeARGB8()

void writeARGB8 ( u8 * data,
video::SColor p )
inline

References p(), and writeU32().

Referenced by ContentFeatures::serialize(), ItemDefinition::serialize(), ObjectProperties::serialize(), WearBarParams::serialize(), and TestSerialization::testStreamWrite().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writeF1000()

void writeF1000 ( u8 * data,
f32 i )
inline

References F1000_MAX, F1000_MIN, FIXEDPOINT_FACTOR, and writeS32().

Referenced by LuaEntitySAO::getStaticData(), NodeTimer::serialize(), TestSerialization::testStreamWrite(), and writeV3F1000().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writeF32()

◆ writeS16()

void writeS16 ( u8 * data,
s16 i )
inline

References writeU16().

Referenced by UnitSAO::generateUpdateArmorGroupsCommand(), UnitSAO::generateUpdateAttachmentCommand(), PlayerSAO::getClientInitializationData(), ContentFeatures::serialize(), ItemDefinition::serialize(), NodeMetadataList::serialize(), ToolCapabilities::serialize(), TestSerialization::testStreamWrite(), writeV2S16(), and writeV3S16().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writeS32()

void writeS32 ( u8 * data,
s32 i )
inline

References writeU32().

Referenced by Server::hudSetHotbarItemcount(), TestSerialization::testStreamWrite(), writeF1000(), writeV2S32(), and writeV3S32().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writeS64()

void writeS64 ( u8 * data,
s64 i )
inline

References writeU64().

Referenced by AuthDatabaseLevelDB::saveAuth(), and TestSerialization::testStreamWrite().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writeS8()

void writeS8 ( u8 * data,
s8 i )
inline

References writeU8().

Referenced by ObjectProperties::serialize(), and TestSerialization::testStreamWrite().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writeU16()

void writeU16 ( u8 * data,
u16 i )
inline

Referenced by Server::AsyncRunStep(), con::Connection::createPeer(), UnitSAO::generatePunchCommand(), LuaEntitySAO::generateSetSpriteCommand(), UnitSAO::generateUpdateArmorGroupsCommand(), ServerActiveObject::generateUpdateInfantCommand(), LuaEntitySAO::getClientInitializationData(), PlayerSAO::getClientInitializationData(), LuaEntitySAO::getStaticData(), con::makePacket(), con::makeReliablePacket(), con::makeSplitPacket(), NetworkPacket::oldForgePacket(), NetworkPacket::operator<<(), NetworkPacket::operator<<(), Client::request_media(), AuthDatabaseLevelDB::saveAuth(), PlayerDatabaseLevelDB::savePlayer(), con::Connection::sendAck(), Server::SendAddParticleSpawner(), AreaStore::serialize(), CItemDefManager::serialize(), ContentFeatures::serialize(), ItemDefinition::serialize(), MapBlock::serialize(), MapNode::serialize(), NameIdMapping::serialize(), NodeBox::serialize(), NodeDefManager::serialize(), NodeMetadataList::serialize(), NodeTimerList::serialize(), ObjectProperties::serialize(), ParticleParameters::serialize(), ParticleParamTypes::TweenedParameter< T >::serialize(), PointedThing::serialize(), StaticObjectList::serialize(), TileAnimationParams::serialize(), TileDef::serialize(), ToolCapabilities::serialize(), WearBarParams::serialize(), MapNode::serializeBulk(), ClientMediaDownloader::serializeRequiredHashSet(), serializeString16(), Schematic::serializeToMts(), TestSerialization::testStreamWrite(), and writeS16().

+ Here is the caller graph for this function:

◆ writeU32()

◆ writeU64()

void writeU64 ( u8 * data,
u64 i )
inline

Referenced by NetworkPacket::operator<<(), TestSerialization::testStreamWrite(), and writeS64().

+ Here is the caller graph for this function:

◆ writeU8()

void writeU8 ( u8 * data,
u8 i )
inline

Referenced by con::Connection::createPeer(), con::ConnectionSendThread::disconnect(), con::ConnectionSendThread::disconnect_peer(), encodePNG(), UnitSAO::generatePunchCommand(), UnitSAO::generateSetPropertiesCommand(), LuaEntitySAO::generateSetSpriteCommand(), LuaEntitySAO::generateSetTextureModCommand(), UnitSAO::generateUpdateAnimationCommand(), UnitSAO::generateUpdateAnimationSpeedCommand(), UnitSAO::generateUpdateArmorGroupsCommand(), UnitSAO::generateUpdateAttachmentCommand(), UnitSAO::generateUpdateBoneOverrideCommand(), ServerActiveObject::generateUpdateInfantCommand(), PlayerSAO::generateUpdatePhysicsOverrideCommand(), UnitSAO::generateUpdatePositionCommand(), LuaEntitySAO::getClientInitializationData(), PlayerSAO::getClientInitializationData(), LuaEntitySAO::getStaticData(), con::makeOriginalPacket(), con::makePacket(), con::makeReliablePacket(), con::makeSplitPacket(), NetworkPacket::operator<<(), NetworkPacket::operator<<(), NetworkPacket::operator<<(), con::UDPPeer::Ping(), recompress_map_database(), AuthDatabaseLevelDB::saveAuth(), PlayerDatabaseLevelDB::savePlayer(), con::Connection::sendAck(), Server::SendAddParticleSpawner(), AreaStore::serialize(), CItemDefManager::serialize(), ContentFeatures::serialize(), ItemDefinition::serialize(), MapBlock::serialize(), MapNode::serialize(), NameIdMapping::serialize(), NodeBox::serialize(), NodeDefManager::serialize(), NodeMetadata::serialize(), NodeMetadataList::serialize(), NodeTimerList::serialize(), ObjectProperties::serialize(), ParticleParameters::serialize(), ParticleParamTypes::TweenedParameter< T >::serialize(), Pointabilities::serialize(), PointedThing::serialize(), StaticObject::serialize(), StaticObjectList::serialize(), TileAnimationParams::serialize(), TileDef::serialize(), ToolCapabilities::serialize(), TouchInteraction::serialize(), WearBarParams::serialize(), MapNode::serializeBulk(), MapBlock::serializeNetworkSpecific(), Pointabilities::serializePointabilityType(), Schematic::serializeToMts(), Pointabilities::serializeTypeMap(), TestSerialization::testStreamWrite(), and writeS8().

◆ writeV2F32()

void writeV2F32 ( u8 * data,
v2f p )
inline

References p(), and writeF32().

Referenced by UnitSAO::generateUpdateAnimationCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writeV2S16()

void writeV2S16 ( u8 * data,
v2s16 p )
inline

References p(), and writeS16().

Referenced by LuaEntitySAO::generateSetSpriteCommand(), ObjectProperties::serialize(), and TestSerialization::testStreamWrite().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writeV2S32()

void writeV2S32 ( u8 * data,
v2s32 p )
inline

References p(), and writeS32().

Referenced by TestSerialization::testStreamWrite().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writeV3F1000()

void writeV3F1000 ( u8 * data,
v3f p )
inline

References p(), and writeF1000().

Referenced by LuaEntitySAO::getStaticData(), StaticObject::serialize(), and TestSerialization::testStreamWrite().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writeV3F32()

void writeV3F32 ( u8 * data,
v3f p )
inline

References p(), and writeF32().

Referenced by UnitSAO::generateUpdateAttachmentCommand(), UnitSAO::generateUpdateBoneOverrideCommand(), UnitSAO::generateUpdatePositionCommand(), LuaEntitySAO::getClientInitializationData(), PlayerSAO::getClientInitializationData(), PlayerDatabaseLevelDB::savePlayer(), ItemDefinition::serialize(), NodeBox::serialize(), ObjectProperties::serialize(), and ParticleParameters::serialize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writeV3S16()

void writeV3S16 ( u8 * data,
v3s16 p )
inline

References p(), and writeS16().

Referenced by AreaStore::serialize(), PointedThing::serialize(), Schematic::serializeToMts(), and TestSerialization::testStreamWrite().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writeV3S32()

void writeV3S32 ( u8 * data,
v3s32 p )
inline

References p(), and writeS32().

Referenced by TestSerialization::testStreamWrite().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ g_serialize_f32_type

FloatType g_serialize_f32_type
extern

Referenced by readF32(), and writeF32().