From: <pst...@us...> - 2008-03-30 12:45:11
|
Revision: 366 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=366&view=rev Author: pstieber Date: 2008-03-30 05:45:05 -0700 (Sun, 30 Mar 2008) Log Message: ----------- 1. Added some function comment headers. 2. Changed the Save argument from wxString to const wxString& to prevent the creation of a copy. 3. Recorded the song file name passed to Save as the startup song in the configuration file. Modified Paths: -------------- trunk/jazz/src/Project.cpp trunk/jazz/src/Project.h Modified: trunk/jazz/src/Project.cpp =================================================================== --- trunk/jazz/src/Project.cpp 2008-03-30 12:42:46 UTC (rev 365) +++ trunk/jazz/src/Project.cpp 2008-03-30 12:45:05 UTC (rev 366) @@ -497,26 +497,34 @@ //----------------------------------------------------------------------------- // Description: -// Open a midi file. Pass it a wxString containing the path to the file. +// Open a MIDI file. +// +// Inputs: +// const wxString& SongFileName: +// Song path and file name. //----------------------------------------------------------------------------- void JZProject::OpenSong(const wxString& SongFileName) { - tStdRead io; + tStdRead Io; Clear(); - Read(io, SongFileName); + Read(Io, SongFileName); mpConfig->Put(C_StartUpSong, SongFileName.c_str()); } -/** - * - * Save a midi file. Pass it a wxString containing the path to the file. - * Save will overwrite the file if it is already there! - * - */ -void JZProject::Save(wxString newsong) +//----------------------------------------------------------------------------- +// Description: +// Save a MIDI file. This function will overwrite the file if it already +// exists! +// +// Inputs: +// const wxString& SongFileName: +// Song path and file name. +//----------------------------------------------------------------------------- +void JZProject::Save(const wxString& SongFileName) { - tStdWrite io; - Write(io, newsong); + tStdWrite Io; + Write(Io, SongFileName); + mpConfig->Put(C_StartUpSong, SongFileName.c_str()); } //----------------------------------------------------------------------------- Modified: trunk/jazz/src/Project.h =================================================================== --- trunk/jazz/src/Project.h 2008-03-30 12:42:46 UTC (rev 365) +++ trunk/jazz/src/Project.h 2008-03-30 12:45:05 UTC (rev 366) @@ -95,11 +95,22 @@ // Set the pattern file name. void SetPattern(const wxString& PatternFileName); - // Open the Song + // Description: + // Open a MIDI file. + // + // Inputs: + // const wxString& SongFileName: + // Song path and file name. void OpenSong(const wxString& SongFileName); - // Save the song - void Save(wxString newsong); + // Description: + // Save a MIDI file. This function will overwrite the file if it + // already exists! + // + // Inputs: + // const wxString& SongFileName: + // Song path and file name. + void Save(const wxString& SongFileName); // Here is the new play interface. For now it just acts as a layer // between the Project and the GUI. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |