2006-07-18 12:08:40 +00:00
|
|
|
#ifndef _MEMORYCARD_H_
|
|
|
|
#define _MEMORYCARD_H_
|
|
|
|
|
|
|
|
#include <boost/filesystem/path.hpp>
|
2006-07-19 19:56:16 +00:00
|
|
|
#include <boost/ptr_container/ptr_vector.hpp>
|
2006-07-18 12:08:40 +00:00
|
|
|
#include "../saves/Save.h"
|
|
|
|
|
|
|
|
class CMemoryCard
|
|
|
|
{
|
|
|
|
public:
|
2006-07-19 19:56:16 +00:00
|
|
|
typedef boost::ptr_vector<CSave> SaveList;
|
|
|
|
typedef SaveList::iterator SaveIterator;
|
2006-07-18 12:08:40 +00:00
|
|
|
|
|
|
|
CMemoryCard(boost::filesystem::path&);
|
|
|
|
~CMemoryCard();
|
|
|
|
|
2006-07-19 19:56:16 +00:00
|
|
|
size_t GetSaveCount() const;
|
|
|
|
const CSave* GetSaveByIndex(size_t) const;
|
|
|
|
|
2006-07-18 12:08:40 +00:00
|
|
|
const char* GetBasePath();
|
|
|
|
void RefreshContents();
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
void ScanSaves();
|
|
|
|
|
|
|
|
SaveList m_Saves;
|
|
|
|
boost::filesystem::path m_BasePath;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|