54 bool ReadFile(
const std::string& sFilePath,
bool bUnescape);
81 return values[val].params.size();
99 std::string
GetParam(
unsigned val,
unsigned par)
const;
108 void ReadBuf(
const char* buf,
int len,
bool bUnescape);
114 void AddParam(
const char* buf,
int len);
121 std::vector<value_t> values;
The class that reads the various .SSC, .SM, .SMA, .DWI, and .MSD files.
Definition MsdFile.h:10
unsigned GetNumValues() const
Retrieve the number of values for each tag.
Definition MsdFile.h:71
std::string GetParam(unsigned val, unsigned par) const
Retrieve the specified parameter.
Definition MsdFile.cpp:187
unsigned GetNumParams(unsigned val) const
Get the number of parameters for the current index.
Definition MsdFile.h:77
virtual ~MsdFile()=default
Remove the MSDFile.
std::string GetError() const
Should an error take place, have an easy place to get it.
Definition MsdFile.h:66
void ReadFromString(const std::string &sString, bool bUnescape)
Attempt to read an MSD file.
Definition MsdFile.cpp:181
const value_t & GetValue(unsigned val) const
Get the specified value.
Definition MsdFile.h:88
bool ReadFile(const std::string &sFilePath, bool bUnescape)
Attempt to read an MSD file.
Definition MsdFile.cpp:154
The list of params found in the files.
Definition MsdFile.h:17
std::vector< std::string > params
The list of parameters.
Definition MsdFile.h:19
std::string operator[](unsigned i) const
Access the proper parameter.
Definition MsdFile.h:31
value_t()
Set up the parameters with default values.
Definition MsdFile.h:21