using System; using System.IO; namespace ClassicalSharp { /// Exports and/or imports a map and metadata associated /// with to and/or from a particular file format. public abstract class IMapFileFormat { /// Whether a map can be exported to a file in this format. public virtual bool SupportsLoading { get { return false; } } /// Whether a map can be imported from a file in this format. public virtual bool SupportsSaving { get { return false; } } /// Replaces the current map from a stream that contains a map in this format. public virtual byte[] Load( Stream stream, Game game, out int width, out int height, out int length ) { width = 0; height = 0; length = 0; return null; } /// Exports the current map to a file in this format. public virtual void Save( Stream stream, Game game ) { } } }