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

/home/pete/Work/TSE3.svn/tse3/src/tse3/TSE2MDL.h

Go to the documentation of this file.
00001 /*
00002  * @(#)TSE2MDL.h 3.00 28 May 1999
00003  *
00004  * Copyright (c) 2000 Pete Goodliffe (pete@cthree.org)
00005  *
00006  * This file is part of TSE3 - the Trax Sequencer Engine version 3.00.
00007  *
00008  * This library is modifiable/redistributable under the terms of the GNU
00009  * General Public License.
00010  *
00011  * You should have received a copy of the GNU General Public License along
00012  * with this program; see the file COPYING. If not, write to the Free Software
00013  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00014  *
00015  */
00016 
00017 #ifndef TSE3_FILEOPS2_H
00018 #define TSE3_FILEOPS2_H
00019 
00020 #include "tse3/Midi.h"
00021 
00022 #include <string>
00023 #include <iostream>
00024 #include <cstddef>
00025 
00026 namespace TSE3
00027 {
00028     class Song;
00029     class Track;
00030     class Part;
00031     class Progress;
00032 
00053     class TSE2MDL
00054     {
00055 
00056         public:
00057 
00068             TSE2MDL(const std::string &appname = "",
00069                     bool               verbose = false,
00070                     std::ostream      &out     = std::cout);
00071 
00082             Song *load(const std::string &filename, Progress *progress = 0);
00083 
00084         private:
00085 
00086             /*
00087              * Internal methods that load TSE2 chunks.
00088              */
00089             bool load_header(std::istream &in);
00090             bool load_songTitle(std::istream &in);
00091             bool load_songAuthor(std::istream &in);
00092             bool load_songCopyright(std::istream &in);
00093             bool load_songDate(std::istream &in);
00094             bool load_TempoTrack(std::istream &in, int len);
00095             bool load_TimeSigTrack(std::istream &in, int len);
00096             bool load_FlagTrack(std::istream &in, int len);
00097             bool load_Track(std::istream &in);
00098             bool load_ExtendedTrack(std::istream &in, int length);
00099             bool load_Phrase(std::istream &in, int len);
00100             bool load_Part(std::istream &in);
00101             bool load_ExtendedPart(std::istream &in, int len);
00102             bool load_Choices(std::istream &in, int len);
00103             bool skip(std::istream &in, int len);
00104 
00105             int freadInt(std::istream &in, int size);
00106             int freadPString(std::istream &in, char *buffer);
00107 
00108             std::string   appname;
00109             bool          verbose;
00110             std::ostream &out;
00111 
00112             Track     *prevTrack;
00113             Part      *prevPart;
00114             Clock      file_PPQN;
00115             size_t     file_noTracks;
00116             int        file_size;
00117             Song      *song;
00118     };
00119 }
00120 
00121 #endif

Generated on Wed May 25 14:45:09 2005 for TSE3 by doxygen 1.3.2