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/cmd/Song.h

Go to the documentation of this file.
00001 /*
00002  * @(#)cmd/Song.h 3.00 10 June 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_CMD_SONG_H
00018 #define TSE3_CMD_SONG_H
00019 
00020 #include "tse3/cmd/Command.h"
00021 #include "tse3/Song.h"
00022 
00023 #include <string>
00024 #include <vector>
00025 #include <cstddef>
00026 
00027 namespace TSE3
00028 {
00029     class Part;
00030     class Phrase;
00031 
00032     namespace Cmd
00033     {
00043         class Song_SetInfo : public Command
00044         {
00045             public:
00046 
00051                 Song_SetInfo(TSE3::Song        *s,
00052                              const std::string &title,
00053                              const std::string &author,
00054                              const std::string &copyright,
00055                              const std::string &date);
00056 
00057             protected:
00058 
00062                 virtual void executeImpl();
00063 
00067                 virtual void undoImpl();
00068 
00069             private:
00070 
00071                 TSE3::Song  *song;
00072                 std::string  newTitle,     oldTitle;
00073                 std::string  newAuthor,    oldAuthor;
00074                 std::string  newCopyright, oldCopyright;
00075                 std::string  newDate,      oldDate;
00076         };
00077 
00086         class Song_SetTitle
00087         : public VariableSetCommand<TSE3::Song, std::string,
00088                                     const std::string &,
00089                                     &TSE3::Song::title, &TSE3::Song::setTitle>
00090         {
00091             public:
00096                 Song_SetTitle(TSE3::Song *s, const std::string &str)
00097                 : VariableSetCommand<TSE3::Song, std::string,
00098                                      const std::string &,
00099                                      &TSE3::Song::title, &TSE3::Song::setTitle>
00100                                          (s, str, "song title") {}
00101         };
00102 
00111         class Song_SetAuthor
00112         : public VariableSetCommand<TSE3::Song, std::string,
00113                                     const std::string &,
00114                                     &TSE3::Song::author, &TSE3::Song::setAuthor>
00115         {
00116             public:
00121                 Song_SetAuthor(TSE3::Song *s, const std::string &str)
00122                 : VariableSetCommand<TSE3::Song, std::string,
00123                                      const std::string &,
00124                                     &TSE3::Song::author, &TSE3::Song::setAuthor>
00125                                          (s, str, "author") {}
00126         };
00127 
00136         class Song_SetCopyright
00137         : public VariableSetCommand<TSE3::Song, std::string,
00138                                     const std::string &,
00139                                     &TSE3::Song::copyright,
00140                                     &TSE3::Song::setCopyright>
00141         {
00142             public:
00147                 Song_SetCopyright(TSE3::Song *s, const std::string &str)
00148                 : VariableSetCommand<TSE3::Song, std::string,
00149                                      const std::string &,
00150                                      &TSE3::Song::copyright,
00151                                      &TSE3::Song::setCopyright>
00152                                         (s, str, "copyright") {}
00153         };
00154 
00163         class Song_SetDate
00164         : public VariableSetCommand<TSE3::Song, std::string,
00165                                     const std::string &,
00166                                     &TSE3::Song::date, &TSE3::Song::setDate>
00167         {
00168             public:
00173                 Song_SetDate(TSE3::Song *s, const std::string &str)
00174                 : VariableSetCommand<TSE3::Song, std::string,
00175                                      const std::string &,
00176                                      &TSE3::Song::date, &TSE3::Song::setDate>
00177                                          (s, str, "song date") {}
00178         };
00179 
00188         class Song_InsertTrack : public Command
00189         {
00190             public:
00191 
00199                 Song_InsertTrack(TSE3::Song *song, size_t track);
00200 
00201             protected:
00202 
00206                 virtual void executeImpl();
00207 
00211                 virtual void undoImpl();
00212 
00213             private:
00214 
00215                 TSE3::Song *song;
00216                 int         track;
00217         };
00218 
00227         class Song_RemoveTrack : public Command
00228         {
00229             public:
00230 
00237                 Song_RemoveTrack(TSE3::Track *track);
00238 
00246                 Song_RemoveTrack(TSE3::Song *song, size_t track);
00247 
00255                 Song_RemoveTrack(TSE3::Song *song, Track *track);
00256 
00257                 virtual ~Song_RemoveTrack();
00258 
00259             protected:
00260 
00264                 virtual void executeImpl();
00265 
00269                 virtual void undoImpl();
00270 
00271             private:
00272 
00273                 TSE3::Song  *song;
00274                 TSE3::Track *track;
00275                 int          trackno;
00276         };
00277 
00286         class Song_SoloTrack : public Command
00287         {
00288             public:
00289 
00290                 Song_SoloTrack(TSE3::Song *song, int track);
00291 
00292             protected:
00293 
00297                 virtual void executeImpl();
00298 
00302                 virtual void undoImpl();
00303 
00304             private:
00305 
00306                 TSE3::Song *song;
00307                 int         track;
00308                 int         old;
00309         };
00310     }
00311 }
00312 
00313 #endif

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