athena/include/athena/WiiSave.hpp

86 lines
1.4 KiB
C++
Raw Normal View History

2015-03-01 12:42:39 -08:00
#ifndef WIISAVE_HPP
#define WIISAVE_HPP
2013-02-15 20:22:16 -08:00
#include <unordered_map>
#include <string>
2018-09-20 10:47:48 -07:00
#include <vector>
2016-03-04 15:00:12 -08:00
#include "athena/Global.hpp"
2013-02-15 20:22:16 -08:00
2016-03-04 15:00:12 -08:00
namespace athena
2013-07-20 20:57:20 -07:00
{
2013-02-15 20:22:16 -08:00
class WiiFile;
class WiiBanner;
class WiiImage;
class BinaryReader;
class BinaryWriter;
2013-07-20 20:57:20 -07:00
/*! \class WiiSave
* \brief Wii data.bin container class
*
* Contains all relevant data for a Wii data.bin file.
*/
2013-02-15 20:22:16 -08:00
class WiiSave
{
public:
2013-07-20 20:57:20 -07:00
/*!
* \brief FileIterator
*/
2013-02-15 20:22:16 -08:00
typedef std::unordered_map<std::string, WiiFile*>::const_iterator FileIterator;
2013-07-20 20:57:20 -07:00
/*!
* \brief WiiSave
*/
2013-02-15 20:22:16 -08:00
WiiSave();
2013-07-20 20:57:20 -07:00
/*!
* \brief ~WiiSave
*/
2013-02-15 20:22:16 -08:00
virtual ~WiiSave();
2013-07-20 20:57:20 -07:00
/*!
* \brief addFile
* \param filename
* \param file
*/
void addFile(WiiFile* file);
void setRoot(WiiFile* root);
2013-07-20 20:57:20 -07:00
/*!
* \brief file
* \param filename
* \return
*/
WiiFile* file(const std::string& filename);
atUint32 fileCount() const;
2013-07-20 20:57:20 -07:00
/*!
* \brief fileList
* \return
*/
WiiFile* root();
2013-02-15 20:22:16 -08:00
2013-07-20 20:57:20 -07:00
/*!
* \brief setBanner
* \param banner
*/
2013-02-15 20:22:16 -08:00
void setBanner(WiiBanner* banner);
2013-07-20 20:57:20 -07:00
/*!
* \brief banner
* \return
*/
2013-02-15 20:22:16 -08:00
WiiBanner* banner() const;
std::vector<WiiFile*> allFiles() const;
2013-02-15 20:22:16 -08:00
protected:
private:
WiiFile* m_root;
2013-02-15 20:22:16 -08:00
WiiBanner* m_banner;
};
2013-07-20 20:57:20 -07:00
} // zelda
2015-03-01 12:42:39 -08:00
#endif // WIISAVE_HPP