Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
serialize.cpp File Reference
#include "serialize.h"
#include "porting.h"
#include "util/string.h"
#include "util/hex.h"
#include "exceptions.h"
#include "irrlichttypes.h"
#include <iostream>
#include <cassert>
+ Include dependency graph for serialize.cpp:

Functions

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)
 
static void deSerializeJsonString (std::string &s)
 
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 = FLOATTYPE_UNKNOWN
 

Function Documentation

◆ deSerializeJsonString() [1/2]

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

References deSerializeJsonString().

+ Here is the call graph for this function:

◆ deSerializeJsonString() [2/2]

static void deSerializeJsonString ( std::string & s)
static

References hex_digit_decode().

Referenced by deSerializeJsonString(), deSerializeJsonStringIfNeeded(), and TestSerialization::testSerializeJsonString().

+ Here is the call graph for this function:
+ Here is the caller 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:

◆ 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:

Variable Documentation

◆ g_serialize_f32_type

FloatType g_serialize_f32_type = FLOATTYPE_UNKNOWN

Referenced by readF32(), and writeF32().