usbloadergx/source/usbloader/WDMFile.hpp
dimok321 973d8b2005 *Fixed compile error
*Converted every 4 spaces to a tab to make the source consistent on those
2011-07-25 22:28:22 +00:00

31 lines
833 B
C++

#ifndef WDMFILE_HPP_
#define WDMFILE_HPP_
#include <stdio.h>
#include <gctypes.h>
#include <string>
#include <vector>
using namespace std;
class WDMFile
{
public:
WDMFile(const char * filepath);
const char * GetDolName(int pos) const { if(pos >= 0 && pos < (int) WDMEntries.size()) return WDMEntries[pos].DolName.c_str(); else return NULL; };
const char * GetReplaceName(int pos) const { if(pos >= 0 && pos < (int) WDMEntries.size()) return WDMEntries[pos].ReplaceName.c_str(); else return NULL; };
int GetParameter(int pos) const { if(pos >= 0 && pos < (int) WDMEntries.size()) return WDMEntries[pos].Parameter; else return 0; };
int size() const { return WDMEntries.size(); };
private:
struct WDMEntry
{
string DolName;
string ReplaceName;
int Parameter;
};
vector<WDMEntry> WDMEntries;
};
#endif