Etterna 0.74.4
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
MsdFile Class Reference

The class that reads the various .SSC, .SM, .SMA, .DWI, and .MSD files. More...

#include <MsdFile.h>

Classes

struct  value_t
 The list of params found in the files. More...
 

Public Member Functions

virtual ~MsdFile ()=default
 Remove the MSDFile.
 
bool ReadFile (const std::string &sFilePath, bool bUnescape)
 Attempt to read an MSD file.
 
void ReadFromString (const std::string &sString, bool bUnescape)
 Attempt to read an MSD file.
 
std::string GetError () const
 Should an error take place, have an easy place to get it.
 
unsigned GetNumValues () const
 Retrieve the number of values for each tag.
 
unsigned GetNumParams (unsigned val) const
 Get the number of parameters for the current index.
 
const value_tGetValue (unsigned val) const
 Get the specified value.
 
std::string GetParam (unsigned val, unsigned par) const
 Retrieve the specified parameter.
 

Detailed Description

The class that reads the various .SSC, .SM, .SMA, .DWI, and .MSD files.

Member Function Documentation

◆ GetError()

std::string MsdFile::GetError ( ) const
inline

Should an error take place, have an easy place to get it.

Returns
the current error.

◆ GetNumParams()

unsigned MsdFile::GetNumParams ( unsigned  val) const
inline

Get the number of parameters for the current index.

Parameters
valthe current value index.
Returns
the number of params.

◆ GetNumValues()

unsigned MsdFile::GetNumValues ( ) const
inline

Retrieve the number of values for each tag.

Returns
the nmber of values.

◆ GetParam()

std::string MsdFile::GetParam ( unsigned  val,
unsigned  par 
) const

Retrieve the specified parameter.

Parameters
valthe current value index.
parthe current parameter index.
Returns
the parameter in question.

◆ GetValue()

const value_t & MsdFile::GetValue ( unsigned  val) const
inline

Get the specified value.

Parameters
valthe current value index.
Returns
The specified value.

◆ ReadFile()

bool MsdFile::ReadFile ( const std::string &  sFilePath,
bool  bUnescape 
)

Attempt to read an MSD file.

Parameters
sFilePaththe path to the file.
bUnescapea flag to see if we need to unescape values.
Returns
its success or failure.

◆ ReadFromString()

void MsdFile::ReadFromString ( const std::string &  sString,
bool  bUnescape 
)

Attempt to read an MSD file.

Parameters
sStringthe path to the file.
bUnescapea flag to see if we need to unescape values.
Returns
its success or failure.

The documentation for this class was generated from the following files: