class TSE3MDL

Object used to load/save TSE3MDL song files. More...

Full nameTSE3::TSE3MDL
Definition#include <TSE3MDL.h>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Public Members


Detailed Description

The TSE3MDL object provides file operations for the TSE3 library, being the main entry point for saving/loading in the TSE3MDL file format.

It uses the Serializable interface implemented by the various TSE3 classes.

See also: Serializable

 TSE3MDL (const std::string &appname = "", int verbose = 0, std::ostream &diag = std::cout)

TSE3MDL

Create a TSE3MDL file operations object.

Parameters:
appnameName of the application using TSE3. This is saved into the TSE3MDL file header
verboseDiagnostic level, normally you want to ignore this and accept the default value
diagWhere to send any diagnostic output

void  save (const std::string &filename, const Song *song)

save

Save the given Song to the file specified. If the file already exists it will be overwritten.

This will save the appropriate fill header and then call the Song class's save method.

Parameters:
filenameFilename to save to
songSong object to save

Throws: SerializableError

void  save (std::ostream &out, const Song *song)

save

As save above, but you specify the ostream.

Song * load (const std::string &filename, Progress *progress = 0)

load

Load a Song from the file specified. The returned Song will have been newed from the free store, and so when you have finished with it it is your responsibility to delete it.

Parameters:
filenameFilename to save to
progressThe progress callback to keep informed of progress, or zero for no callback

Returns: The loaded Song - you must delete it

Throws: SerializableError

static const int MajorVersion

MajorVersion

static const int MinorVersion

MinorVersion