Added interface for streamable objects

This commit is contained in:
Serraniel 2018-04-06 17:33:41 +02:00
parent 84e67b1e5c
commit d393bd184d

View file

@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
namespace SweetLib.IO.Classes.Streaming
{
/// <summary>
/// Streamable objects
/// </summary>
public interface IStreamable
{
/// <summary>
/// Saves the current object into a stream.
/// </summary>
/// <param name="stream">Stream in which the current object should be saved.</param>
void SaveToStream(Stream stream);
/// <summary>
/// Loads the object from a given stream.
/// </summary>
/// <param name="stream">Stream from which the object is loaded.</param>
void LoadFromStream(Stream stream);
}
}