/JTacticalSim.API/Data/IDataHandler.cs
C# | 34 lines | 18 code | 4 blank | 12 comment | 0 complexity | 9e20513af317cdac7c555f9dffc3253f MD5 | raw file
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Xml.Linq;
- using JTacticalSim.API.Component;
-
- namespace JTacticalSim.API.Data
- {
- public interface IDataHandler
- {
- IResult<string> LoadSavedGameData(string fileDirectory, bool IsScenario);
- IResult<string> LoadData(string fileDirectory, bool IsScenario);
- IResult<IGameFileCopyable> SaveData(IGameFileCopyable currentGame);
-
- /// <summary>
- /// Creates a new game/scenario from a base context :
- /// Accepts either a scenario or current game to create from
- /// </summary>
- /// <param name="current"></param>
- /// <param name="newGame"></param>
- /// <returns></returns>
- IResult<IGameFileCopyable> SaveDataAs(IGameFileCopyable current, IGameFileCopyable newGame);
-
- /// <summary>
- /// Removes the files for a saved game
- /// </summary>
- /// <param name="delGame"></param>
- /// <returns></returns>
- IResult<IGameFileCopyable> RemoveSavedGameData(IGameFileCopyable delGame);
-
- void Reset();
- }
- }