#include "serialize.h"
#include "porting.h"
#include "util/string.h"
#include "util/hex.h"
#include "exceptions.h"
#include "irrlichttypes.h"
#include <iostream>
#include <cassert>
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 |
std::string deSerializeJsonString | ( | std::istream & | is | ) |
|
static |
References hex_digit_decode().
Referenced by deSerializeJsonString(), deSerializeJsonStringIfNeeded(), and TestSerialization::testSerializeJsonString().
std::string deSerializeJsonStringIfNeeded | ( | std::istream & | is | ) |
References deSerializeJsonString().
Referenced by ItemStack::deSerialize(), ItemStackMetadata::deSerialize(), and TestSerialization::testSerializeJsonString().
std::string deSerializeString16 | ( | std::istream & | is | ) |
References readU16().
Referenced by LuaEntitySAO::LuaEntitySAO(), content_nodemeta_deserialize_legacy_body(), content_nodemeta_deserialize_legacy_meta(), CItemDefManager::deSerialize(), ContentFeatures::deSerialize(), ItemDefinition::deSerialize(), NameIdMapping::deSerialize(), NodeDefManager::deSerialize(), NodeMetadata::deSerialize(), ObjectProperties::deSerialize(), StaticObject::deSerialize(), TileDef::deSerialize(), ToolCapabilities::deSerialize(), MapBlock::deSerialize_pre22(), Schematic::deserializeFromMts(), SoundSpec::deSerializeSimple(), Pointabilities::deSerializeTypeMap(), AuthDatabaseLevelDB::getAuth(), Client::handleCommand_ActiveObjectMessages(), Client::handleCommand_HudSetSky(), PlayerDatabaseLevelDB::loadPlayer(), GenericCAO::processInitData(), GenericCAO::processMessage(), TestSerialization::testDeSerializeString(), TestMapBlock::testSave29(), and TestSerialization::testStreamRead().
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().
std::string serializeJsonString | ( | std::string_view | plain | ) |
References hex_chars.
Referenced by ClientEnvironment::addActiveObject(), serializeJsonStringIfNeeded(), TestSerialization::testSerializeJsonString(), and RollbackAction::toString().
std::string serializeJsonStringIfNeeded | ( | std::string_view | s | ) |
References serializeJsonString().
Referenced by ItemStack::serialize(), ItemStackMetadata::serialize(), and TestSerialization::testSerializeJsonString().
std::string serializeString16 | ( | std::string_view | plain | ) |
References STRING_MAX_LEN, and writeU16().
Referenced by Server::AsyncRunStep(), LuaEntitySAO::generateSetTextureModCommand(), UnitSAO::generateUpdateArmorGroupsCommand(), UnitSAO::generateUpdateAttachmentCommand(), UnitSAO::generateUpdateBoneOverrideCommand(), LuaEntitySAO::getClientInitializationData(), PlayerSAO::getClientInitializationData(), LuaEntitySAO::getStaticData(), AuthDatabaseLevelDB::saveAuth(), PlayerDatabaseLevelDB::savePlayer(), CItemDefManager::serialize(), ContentFeatures::serialize(), ItemDefinition::serialize(), NameIdMapping::serialize(), NodeDefManager::serialize(), NodeMetadata::serialize(), ObjectProperties::serialize(), StaticObject::serialize(), TileDef::serialize(), ToolCapabilities::serialize(), SoundSpec::serializeSimple(), Schematic::serializeToMts(), Pointabilities::serializeTypeMap(), TestSerialization::testDeSerializeString(), TestSerialization::testSerializeString(), and TestSerialization::testStreamWrite().
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().
FloatType g_serialize_f32_type = FLOATTYPE_UNKNOWN |
Referenced by readF32(), and writeF32().