Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

TSE3::TSE3MDL Class Reference

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

#include <TSE3MDL.h>

Collaboration diagram for TSE3::TSE3MDL:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TSE3MDL (const std::string &appname="", int verbose=0, std::ostream &diag=std::cout)
void save (const std::string &filename, const Song *song)
void save (std::ostream &out, const Song *song)
Songload (const std::string &filename, Progress *progress=0)

Static Public Attributes

const int MajorVersion = 100
const int MinorVersion = 100

Detailed Description

Object used to load/save TSE3MDL song files.

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.

Author:
Pete Goodliffe
Version:
1.00
See also:
Serializable


Constructor & Destructor Documentation

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

Create a TSE3MDL file operations object.

Parameters:
appname Name of the application using TSE3. This is saved into the TSE3MDL file header
verbose Diagnostic level, normally you want to ignore this and accept the default value
diag Where to send any diagnostic output


Member Function Documentation

void TSE3::TSE3MDL::save const std::string &  filename,
const Song song
 

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:
filename Filename to save to
song Song object to save
Exceptions:
SerializableError 

void TSE3::TSE3MDL::save std::ostream &  out,
const Song song
 

As save above, but you specify the ostream.

Song* TSE3::TSE3MDL::load const std::string &  filename,
Progress progress = 0
 

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:
filename Filename to save to
progress The progress callback to keep informed of progress, or zero for no callback
Returns:
The loaded Song - you must delete it
Exceptions:
SerializableError 


Member Data Documentation

const int TSE3::TSE3MDL::MajorVersion = 100 [static]
 

const int TSE3::TSE3MDL::MinorVersion = 100 [static]
 


The documentation for this class was generated from the following file:
Generated on Wed May 25 14:47:10 2005 for TSE3 by doxygen 1.3.2