using System; using System.Collections.Generic; using System.IO; using UnityEngine; namespace NeoSaveGames.Serialization { public interface INeoSerializer { void BeginSerialization(); void EndSerialization(); bool WriteToStream(Stream stream); bool isSerializing { get; } int byteLength { get; } void PushContext(SerializationContext context, int id); void PopContext(SerializationContext context);// Use type for error checking void WriteValue(string key, bool value); void WriteValue(string key, byte value); void WriteValue(string key, sbyte value); void WriteValue(string key, char value); void WriteValue(string key, short value); void WriteValue(string key, ushort value); void WriteValue(string key, int value); void WriteValue(string key, uint value); void WriteValue(string key, long value); void WriteValue(string key, ulong value); void WriteValue(string key, float value); void WriteValue(string key, double value); void WriteValue(string key, string value); void WriteValue(string key, Vector2 value); void WriteValue(string key, Vector3 value); void WriteValue(string key, Vector4 value); void WriteValue(string key, Vector2Int value); void WriteValue(string key, Vector3Int value); void WriteValue(string key, Quaternion value); void WriteValue(string key, Color value); void WriteValue(string key, Color32 value); void WriteValue(string key, Guid value); void WriteValue(string key, DateTime value); void WriteValues(string key, ICollection value); void WriteValues(string key, ICollection value); void WriteValues(string key, ICollection value); void WriteValues(string key, ICollection value); void WriteValues(string key, ICollection value); void WriteValues(string key, ICollection value); void WriteValues(string key, ICollection value); void WriteValues(string key, ICollection value); void WriteValues(string key, ICollection value); void WriteValues(string key, ICollection value); void WriteValues(string key, ICollection value); void WriteValues(string key, ICollection value); void WriteValues(string key, ICollection value); void WriteValues(string key, ICollection value); void WriteValues(string key, ICollection value); void WriteValues(string key, ICollection value); void WriteValues(string key, ICollection value); void WriteValues(string key, ICollection value); void WriteValues(string key, ICollection value); void WriteValues(string key, ICollection value); void WriteValues(string key, ICollection value); void WriteValues(string key, ICollection value); void WriteSerializable(string key, T s); void WriteSerializables(string key, ICollection s); bool WriteComponentReference(string key, T value, NeoSerializedGameObject pathFrom) where T : class; bool WriteTransformReference(string key, Transform value, NeoSerializedGameObject pathFrom); bool WriteGameObjectReference(string key, GameObject value, NeoSerializedGameObject pathFrom); bool WriteNeoSerializedGameObjectReference(string key, NeoSerializedGameObject value, NeoSerializedGameObject pathFrom); void WriteValue(int hash, bool value); void WriteValue(int hash, byte value); void WriteValue(int hash, sbyte value); void WriteValue(int hash, char value); void WriteValue(int hash, short value); void WriteValue(int hash, ushort value); void WriteValue(int hash, int value); void WriteValue(int hash, uint value); void WriteValue(int hash, long value); void WriteValue(int hash, ulong value); void WriteValue(int hash, float value); void WriteValue(int hash, double value); void WriteValue(int hash, string value); void WriteValue(int hash, Vector2 value); void WriteValue(int hash, Vector3 value); void WriteValue(int hash, Vector4 value); void WriteValue(int hash, Vector2Int value); void WriteValue(int hash, Vector3Int value); void WriteValue(int hash, Quaternion value); void WriteValue(int hash, Color value); void WriteValue(int hash, Color32 value); void WriteValue(int hash, Guid value); void WriteValue(int hash, DateTime value); void WriteValues(int hash, ICollection value); void WriteValues(int hash, ICollection value); void WriteValues(int hash, ICollection value); void WriteValues(int hash, ICollection value); void WriteValues(int hash, ICollection value); void WriteValues(int hash, ICollection value); void WriteValues(int hash, ICollection value); void WriteValues(int hash, ICollection value); void WriteValues(int hash, ICollection value); void WriteValues(int hash, ICollection value); void WriteValues(int hash, ICollection value); void WriteValues(int hash, ICollection value); void WriteValues(int hash, ICollection value); void WriteValues(int hash, ICollection value); void WriteValues(int hash, ICollection value); void WriteValues(int hash, ICollection value); void WriteValues(int hash, ICollection value); void WriteValues(int hash, ICollection value); void WriteValues(int hash, ICollection value); void WriteValues(int hash, ICollection value); void WriteValues(int hash, ICollection value); void WriteValues(int hash, ICollection value); void WriteSerializable(int hash, T s); void WriteSerializables(int hash, ICollection s); bool WriteComponentReference(int hash, T value, NeoSerializedGameObject pathFrom) where T : class; bool WriteTransformReference(int hash, Transform value, NeoSerializedGameObject pathFrom); bool WriteGameObjectReference(int hash, GameObject value, NeoSerializedGameObject pathFrom); bool WriteNeoSerializedGameObjectReference(int hash, NeoSerializedGameObject value, NeoSerializedGameObject pathFrom); } }