/JTacticalSim.API/Data/IDataHandler.cs

https://github.com/Queztionmark/JTacticalSim · C# · 34 lines · 18 code · 4 blank · 12 comment · 0 complexity · 9e20513af317cdac7c555f9dffc3253f MD5 · raw file

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Xml.Linq;
  6. using JTacticalSim.API.Component;
  7. namespace JTacticalSim.API.Data
  8. {
  9. public interface IDataHandler
  10. {
  11. IResult<string> LoadSavedGameData(string fileDirectory, bool IsScenario);
  12. IResult<string> LoadData(string fileDirectory, bool IsScenario);
  13. IResult<IGameFileCopyable> SaveData(IGameFileCopyable currentGame);
  14. /// <summary>
  15. /// Creates a new game/scenario from a base context :
  16. /// Accepts either a scenario or current game to create from
  17. /// </summary>
  18. /// <param name="current"></param>
  19. /// <param name="newGame"></param>
  20. /// <returns></returns>
  21. IResult<IGameFileCopyable> SaveDataAs(IGameFileCopyable current, IGameFileCopyable newGame);
  22. /// <summary>
  23. /// Removes the files for a saved game
  24. /// </summary>
  25. /// <param name="delGame"></param>
  26. /// <returns></returns>
  27. IResult<IGameFileCopyable> RemoveSavedGameData(IGameFileCopyable delGame);
  28. void Reset();
  29. }
  30. }