<commit_before>#pragma once


#include "lumix.h"


namespace Lumix
{

class InputBlob;
class OutputBlob;
struct Quat;
struct Transform;
struct Vec3;
struct Vec4;


struct ISerializer
{
	virtual void write(const char* label, Entity entity) = 0;
	virtual void write(const char* label, ComponentHandle value) = 0;
	virtual void write(const char* label, const Transform& value) = 0;
	virtual void write(const char* label, const Vec4& value) = 0;
	virtual void write(const char* label, const Vec3& value) = 0;
	virtual void write(const char* label, const Quat& value) = 0;
	virtual void write(const char* label, float value) = 0;
	virtual void write(const char* label, bool value) = 0;
	virtual void write(const char* label, i64 value) = 0;
	virtual void write(const char* label, u64 value) = 0;
	virtual void write(const char* label, i32 value) = 0;
	virtual void write(const char* label, u32 value) = 0;
	virtual void write(const char* label, i8 value) = 0;
	virtual void write(const char* label, u8 value) = 0;
	virtual void write(const char* label, const char* value) = 0;
};


struct IDeserializer
{
	virtual void read(Entity* entity) = 0;
	virtual void read(ComponentHandle* value) = 0;
	virtual void read(Transform* value) = 0;
	virtual void read(Vec4* value) = 0;
	virtual void read(Vec3* value) = 0;
	virtual void read(Quat* value) = 0;
	virtual void read(float* value) = 0;
	virtual void read(bool* value) = 0;
	virtual void read(u64* value) = 0;
	virtual void read(i64* value) = 0;
	virtual void read(u32* value) = 0;
	virtual void read(i32* value) = 0;
	virtual void read(u8* value) = 0;
	virtual void read(i8* value) = 0;
	virtual void read(char* value, int max_size) = 0;
};


struct TextSerializer : public ISerializer
{
	TextSerializer(OutputBlob& _blob) : blob(_blob) {}

	virtual void write(const char* label, Entity entity)  override;
	virtual void write(const char* label, ComponentHandle value)  override;
	virtual void write(const char* label, const Transform& value)  override;
	virtual void write(const char* label, const Vec4& value)  override;
	virtual void write(const char* label, const Vec3& value)  override;
	virtual void write(const char* label, const Quat& value)  override;
	virtual void write(const char* label, float value)  override;
	virtual void write(const char* label, bool value)  override;
	virtual void write(const char* label, i64 value)  override;
	virtual void write(const char* label, u64 value)  override;
	virtual void write(const char* label, i32 value)  override;
	virtual void write(const char* label, u32 value)  override;
	virtual void write(const char* label, i8 value)  override;
	virtual void write(const char* label, u8 value)  override;
	virtual void write(const char* label, const char* value)  override;

	OutputBlob& blob;
};


struct TextDeserializer : public IDeserializer
{
	TextDeserializer(InputBlob& _blob)
		: blob(_blob)
	{
	}

	virtual void read(Entity* entity)  override;
	virtual void read(ComponentHandle* value)  override;
	virtual void read(Transform* value)  override;
	virtual void read(Vec4* value)  override;
	virtual void read(Vec3* value)  override;
	virtual void read(Quat* value)  override;
	virtual void read(float* value)  override;
	virtual void read(bool* value)  override;
	virtual void read(u64* value)  override;<commit_msg>fixed dll build<commit_after>#pragma once


#include "lumix.h"


namespace Lumix
{

class InputBlob;
class OutputBlob;
struct Quat;
struct Transform;
struct Vec3;
struct Vec4;


struct ISerializer
{
	virtual void write(const char* label, Entity entity) = 0;
	virtual void write(const char* label, ComponentHandle value) = 0;
	virtual void write(const char* label, const Transform& value) = 0;
	virtual void write(const char* label, const Vec4& value) = 0;
	virtual void write(const char* label, const Vec3& value) = 0;
	virtual void write(const char* label, const Quat& value) = 0;
	virtual void write(const char* label, float value) = 0;
	virtual void write(const char* label, bool value) = 0;
	virtual void write(const char* label, i64 value) = 0;
	virtual void write(const char* label, u64 value) = 0;
	virtual void write(const char* label, i32 value) = 0;
	virtual void write(const char* label, u32 value) = 0;
	virtual void write(const char* label, i8 value) = 0;
	virtual void write(const char* label, u8 value) = 0;
	virtual void write(const char* label, const char* value) = 0;
};


struct IDeserializer
{
	virtual void read(Entity* entity) = 0;
	virtual void read(ComponentHandle* value) = 0;
	virtual void read(Transform* value) = 0;
	virtual void read(Vec4* value) = 0;
	virtual void read(Vec3* value) = 0;
	virtual void read(Quat* value) = 0;
	virtual void read(float* value) = 0;
	virtual void read(bool* value) = 0;
	virtual void read(u64* value) = 0;
	virtual void read(i64* value) = 0;
	virtual void read(u32* value) = 0;
	virtual void read(i32* value) = 0;
	virtual void read(u8* value) = 0;
	virtual void read(i8* value) = 0;
	virtual void read(char* value, int max_size) = 0;
};


struct LUMIX_ENGINE_API TextSerializer : public ISerializer
{
	TextSerializer(OutputBlob& _blob) : blob(_blob) {}

	virtual void write(const char* label, Entity entity)  override;
	virtual void write(const char* label, ComponentHandle value)  override;
	virtual void write(const char* label, const Transform& value)  override;
	virtual void write(const char* label, const Vec4& value)  override;
	virtual void write(const char* label, const Vec3& value)  override;
	virtual void write(const char* label, const Quat& value)  override;
	virtual void write(const char* label, float value)  override;
	virtual void write(const char* label, bool value)  override;
	virtual void write(const char* label, i64 value)  override;
	virtual void write(const char* label, u64 value)  override;
	virtual void write(const char* label, i32 value)  override;
	virtual void write(const char* label, u32 value)  override;
	virtual void write(const char* label, i8 value)  override;
	virtual void write(const char* label, u8 value)  override;
	virtual void write(const char* label, const char* value)  override;

	OutputBlob& blob;
};


struct LUMIX_ENGINE_API TextDeserializer : public IDeserializer
{
	TextDeserializer(InputBlob& _blob)
		: blob(_blob)
	{
	}

	virtual void read(Entity* entity)  override;
	virtual void read(ComponentHandle* value)  override;
	virtual void read(Transform* value)  override;
	virtual void read(Vec4* value)  override;
	virtual void read(Vec3* value)  override;
	virtual void read(Quat* value)  override;
	virtual void read(float* value)  override;
	virtual void read(bool* value)  override;
	virtual void read(u64* value)  override;
{'fraction_non_alphanumeric': 0.09972964854310604, 'fraction_numerical': 0.021628116551516974, 'mean_word_length': 4.961504028648164, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2848064', 'n_tokens_mistral': 2214, 'n_tokens_neox': 2100, 'n_words': 823}