2015-05-06 01:27:59 -04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <memory>
|
2019-10-17 18:15:16 -04:00
|
|
|
#include <vector>
|
2019-10-16 20:51:11 -04:00
|
|
|
#include "filesystem_def.h"
|
2018-01-03 08:21:44 -05:00
|
|
|
#include "Save.h"
|
2015-05-06 01:27:59 -04:00
|
|
|
|
|
|
|
class CMemoryCard
|
|
|
|
{
|
|
|
|
public:
|
2018-04-30 21:01:23 +01:00
|
|
|
typedef std::shared_ptr<CSave> SavePtr;
|
|
|
|
typedef std::vector<SavePtr> SaveList;
|
2015-05-06 01:27:59 -04:00
|
|
|
|
2019-10-16 20:51:11 -04:00
|
|
|
CMemoryCard(const fs::path&);
|
2018-04-30 21:01:23 +01:00
|
|
|
virtual ~CMemoryCard() = default;
|
2015-05-06 01:27:59 -04:00
|
|
|
|
2018-04-30 21:01:23 +01:00
|
|
|
size_t GetSaveCount() const;
|
|
|
|
const CSave* GetSaveByIndex(size_t) const;
|
2015-05-06 01:27:59 -04:00
|
|
|
|
2019-10-16 20:51:11 -04:00
|
|
|
fs::path GetBasePath() const;
|
2018-04-30 21:01:23 +01:00
|
|
|
void RefreshContents();
|
2015-05-06 01:27:59 -04:00
|
|
|
|
|
|
|
private:
|
2018-04-30 21:01:23 +01:00
|
|
|
void ScanSaves();
|
2015-05-06 01:27:59 -04:00
|
|
|
|
2018-04-30 21:01:23 +01:00
|
|
|
SaveList m_saves;
|
2019-10-16 20:51:11 -04:00
|
|
|
fs::path m_basePath;
|
2015-05-06 01:27:59 -04:00
|
|
|
};
|