Added interface for streamable objects
This commit is contained in:
parent
84e67b1e5c
commit
d393bd184d
25
SweetLib.IO/Classes/Streaming/IStreamable.cs
Normal file
25
SweetLib.IO/Classes/Streaming/IStreamable.cs
Normal 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);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue