Athena IO Library
WiiSave.hpp
1 #ifndef ATHENA_NO_SAVES
2 // This file is part of libAthena.
3 //
4 // libAthena is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // libAthena is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with libAthena. If not, see <http://www.gnu.org/licenses/>
16 
17 #ifndef WIISAVE_HPP
18 #define WIISAVE_HPP
19 
20 #include <unordered_map>
21 #include <string>
22 #include "Athena/Global.hpp"
23 
24 namespace Athena
25 {
26 
27 class WiiFile;
28 class WiiBanner;
29 class WiiImage;
30 class BinaryReader;
31 class BinaryWriter;
32 
38 class WiiSave
39 {
40 public:
41 
45  typedef std::unordered_map<std::string, WiiFile*>::const_iterator FileIterator;
46 
50  WiiSave();
54  virtual ~WiiSave();
55 
61  void addFile(WiiFile* file);
62  void setRoot(WiiFile* root);
68  WiiFile* file(const std::string& filename);
69 
70  atUint32 fileCount() const;
75  WiiFile* root();
76 
81  void setBanner(WiiBanner* banner);
82 
87  WiiBanner* banner() const;
88 
89  std::vector<WiiFile*> allFiles() const;
90 
91 protected:
92 private:
93 
94  WiiFile* m_root;
95  WiiBanner* m_banner;
96 
97 };
98 
99 } // zelda
100 #endif // WIISAVE_HPP
101 #endif // ATHENA_NO_SAVES
102 
std::unordered_map< std::string, WiiFile * >::const_iterator FileIterator
FileIterator.
Definition: WiiSave.hpp:45
Wii banner container class.
Definition: WiiBanner.hpp:33
WiiSave()
WiiSave.
A Stream class for writing binary data.
WiiFile * file(const std::string &filename)
file
Wii file container class.
Definition: WiiFile.hpp:36
WiiFile * root()
fileList
A Stream class for reading binary data.
void addFile(WiiFile *file)
addFile
WiiBanner * banner() const
banner
void setBanner(WiiBanner *banner)
setBanner
Wii data.bin container class.
Definition: WiiSave.hpp:38
virtual ~WiiSave()
~WiiSave