namespace Svelto.ECS.Serialization
{
public interface IEntitySerialization
{
///
/// Fill the serializationData of the entitiesToSerialize of this descriptor
///
///
///
///
/// Size in bytes of the newly instantiated entity
void SerializeEntity(EGID egid, ISerializationData serializationData, SerializationType serializationType);
///
/// Deserialize a serializationData and copy directly onto the appropriate entities
///
///
///
///
void DeserializeEntity(ISerializationData serializationData, SerializationType serializationType);
///
/// Deserialize a serializationData and copy directly onto the appropriate entities with explicit EGID
///
///
///
///
///
void DeserializeEntity(EGID egid, ISerializationData serializationData, SerializationType serializationType);
///
/// Deserialize a serializationData and copy directly to an previously created EntityStructInitializer
///
///
///
///
///
void DeserializeEntityStructs(ISerializationData serializationData,
ISerializableEntityDescriptor entityDescriptor,
ref EntityStructInitializer initializer, SerializationType serializationType);
///
/// Contrary to the other Deserialize methods that assume that the entity exists, this method is used to deserialise
/// a new Entity
///
///
///
///
///
EntityStructInitializer DeserializeNewEntity(EGID egid, ISerializationData serializationData,
SerializationType serializationType);
///
/// Special Entity Swap method that works without knowing the EntityDescriptor to swap
///
///
///
void DeserializeEntityToSwap(EGID localEgid, EGID toEgid);
///
/// Special Entity delete method that works without knowing the EntityDescriptor to delete
///
///
void DeserializeEntityToDelete(EGID egid);
void RegisterSerializationFactory(IDeserializationFactory deserializationFactory)
where T : ISerializableEntityDescriptor, new();
}
}