Changeset 524
- Timestamp:
- 05/13/09 14:06:58 (3 years ago)
- Files:
-
- trunk/src/benchmarksDialog.cpp (modified) (1 diff)
- trunk/src/clientDialog.cpp (modified) (1 diff)
- trunk/src/core.cpp (modified) (6 diffs)
- trunk/src/ftpConnection.cpp (modified) (4 diffs)
- trunk/src/httpDownloader.cpp (modified) (3 diffs)
- trunk/src/include/clientDialog.h (modified) (1 diff)
- trunk/src/include/core.h (modified) (6 diffs)
- trunk/src/include/ftpConnection.h (modified) (4 diffs)
- trunk/src/include/httpDownloader.h (modified) (3 diffs)
- trunk/src/include/mainDialog.h (modified) (2 diffs)
- trunk/src/include/preference.h (modified) (5 diffs)
- trunk/src/include/queue.h (modified) (1 diff)
- trunk/src/include/tools.h (modified) (1 diff)
- trunk/src/mainDialog.cpp (modified) (2 diffs)
- trunk/src/preference.cpp (modified) (5 diffs)
- trunk/src/queue.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/benchmarksDialog.cpp
r451 r524 268 268 clientLocation.Replace(_T("/"), _T("\\")); 269 269 #endif 270 clientName = ClientsManager::GetInstance()->GetNameFromLocation(clientLocation );270 clientName = ClientsManager::GetInstance()->GetNameFromLocation(clientLocation.c_str()); 271 271 272 272 if(clientName.IsEmpty() == false) trunk/src/clientDialog.cpp
r484 r524 172 172 173 173 174 int ClientDialog::ShowModal(wxUint32 clientId, wxString filename)174 int ClientDialog::ShowModal(wxUint32 clientId, wxString const &filename) 175 175 { 176 176 const Client* clientToEdit; trunk/src/core.cpp
r482 r524 26 26 27 27 28 wxString Core::mCoreLongName[CORE_ID_COUNT] = {28 wxString const Core::mCoreLongName[CORE_ID_COUNT] = { 29 29 _T("Tinker"), 30 30 _T("Gromacs"), … … 49 49 _T("GPU2 NV MT") 50 50 }; 51 wxString Core::mCoreShortName[CORE_ID_COUNT] = {51 wxString const Core::mCoreShortName[CORE_ID_COUNT] = { 52 52 _T("tinker"), 53 53 _T("gromacs"), … … 74 74 75 75 76 CoreId Core::ShortNameToId(const wxString& name)76 CoreId const Core::ShortNameToId(const wxString& name) 77 77 { 78 78 CoreId identifier; … … 90 90 91 91 92 wxString Core::IdToShortName(CoreId identifier)92 wxString const Core::IdToShortName(CoreId identifier) 93 93 { 94 94 if(identifier >= CORE_ID_COUNT) … … 101 101 102 102 103 wxString Core::IdToLongName(CoreId identifier)103 wxString const Core::IdToLongName(CoreId identifier) 104 104 { 105 105 if(identifier >= CORE_ID_COUNT) … … 112 112 113 113 114 wxString Core::IdToClientType(CoreId identifier)114 wxString const Core::IdToClientType(CoreId identifier) 115 115 { 116 116 wxString clientType; trunk/src/ftpConnection.cpp
r505 r524 33 33 34 34 35 bool FTPConnection::GetFTPFile(wxString url, wxStringtempFile)35 bool FTPConnection::GetFTPFile(wxString const &url, wxString const &tempFile) 36 36 { 37 37 bool isUsingProxy; … … 87 87 88 88 89 long FTPConnection::GetFTPResponseCode(wxString url)89 long FTPConnection::GetFTPResponseCode(wxString const &url) 90 90 { 91 91 bool isUsingProxy; … … 120 120 121 121 122 wxDateTime FTPConnection::GetFTPFileModificationTime(wxString url)122 wxDateTime FTPConnection::GetFTPFileModificationTime(wxString const &url) 123 123 { 124 124 bool isUsingProxy; … … 152 152 153 153 154 bool FTPConnection::PutFTPFile(wxString url, wxStringtempFile)154 bool FTPConnection::PutFTPFile(wxString const &url, wxString const &tempFile) 155 155 { 156 156 bool isUsingProxy; trunk/src/httpDownloader.cpp
r453 r524 33 33 34 34 35 bool HTTPDownloader::GetHTTPFile(wxString url, wxStringtempFile)35 bool HTTPDownloader::GetHTTPFile(wxString const &url, wxString const &tempFile) 36 36 { 37 37 bool isUsingProxy; … … 73 73 74 74 75 long HTTPDownloader::GetHTTPResponseCode(wxString url)75 long HTTPDownloader::GetHTTPResponseCode(wxString const &url) 76 76 { 77 77 bool isUsingProxy; … … 105 105 106 106 107 wxString HTTPDownloader::GetHTTPHeader(wxString url, wxStringheader)107 wxString HTTPDownloader::GetHTTPHeader(wxString const &url, wxString const &header) 108 108 { 109 109 bool isUsingProxy; trunk/src/include/clientDialog.h
r371 r524 94 94 * @param filename The location of the client to add. 95 95 **/ 96 int ShowModal(wxUint32 clientId, wxString filename);96 int ShowModal(wxUint32 clientId, wxString const &filename); 97 97 98 98 trunk/src/include/core.h
r464 r524 76 76 * @return Indentifier for core 77 77 **/ 78 static CoreId ShortNameToId(wxString const &name);78 static const CoreId ShortNameToId(wxString const &name); 79 79 80 80 /** … … 83 83 * @return String containing short core name. 84 84 **/ 85 static wxString IdToShortName(CoreId identifier);85 static const wxString IdToShortName(CoreId identifier); 86 86 87 87 /** … … 90 90 * @return String containing the full core name. 91 91 **/ 92 static wxString IdToLongName(CoreId identifier);92 static const wxString IdToLongName(CoreId identifier); 93 93 94 94 /** … … 97 97 * @return String containing the client type. 98 98 **/ 99 static wxString IdToClientType(CoreId identifier);99 static const wxString IdToClientType(CoreId identifier); 100 100 101 101 … … 105 105 * The elements are case insensitive and need to match the order in _CORE_ID 106 106 **/ 107 static wxString mCoreShortName[CORE_ID_COUNT];107 static const wxString mCoreShortName[CORE_ID_COUNT]; 108 108 109 109 /** … … 111 111 * The elements need to match the order in _CORE_ID but are descriptions not identifiers. 112 112 **/ 113 static wxString mCoreLongName[CORE_ID_COUNT];113 static const wxString mCoreLongName[CORE_ID_COUNT]; 114 114 }; 115 115 trunk/src/include/ftpConnection.h
r480 r524 61 61 * @return Success of operation. 62 62 **/ 63 static bool GetFTPFile(wxString url, wxStringtempFile);63 static bool GetFTPFile(wxString const &url, wxString const &tempFile); 64 64 65 65 /** … … 68 68 * @return The FTP response code 69 69 **/ 70 static long GetFTPResponseCode(wxString url);70 static long GetFTPResponseCode(wxString const &url); 71 71 72 72 /** … … 77 77 * @return Time last modified 78 78 **/ 79 static wxDateTime GetFTPFileModificationTime(wxString url);79 static wxDateTime GetFTPFileModificationTime(wxString const &url); 80 80 81 81 /** … … 85 85 * @return Success 86 86 **/ 87 static bool PutFTPFile(wxString url, wxStringtempFile);87 static bool PutFTPFile(wxString const &url, wxString const &tempFile); 88 88 }; 89 89 trunk/src/include/httpDownloader.h
r480 r524 73 73 * @return Success of operation. 74 74 **/ 75 static bool GetHTTPFile(wxString url, wxStringtempFile);75 static bool GetHTTPFile(wxString const &url, wxString const &tempFile); 76 76 77 77 /** … … 80 80 * @return The HTTP response code 81 81 **/ 82 static long GetHTTPResponseCode(wxString url);82 static long GetHTTPResponseCode(wxString const &url); 83 83 84 84 /** … … 88 88 * @return Resulting header value if any. 89 89 **/ 90 static wxString GetHTTPHeader(wxString url, wxStringheader);90 static wxString GetHTTPHeader(wxString const &url, wxString const &header); 91 91 }; 92 92 trunk/src/include/mainDialog.h
r502 r524 169 169 static wxMutex mMutexUpdateCheck; /**< Locks access to the update method */ 170 170 static wxMutex mMutexArrayBlocker; /**< Locks access to the s_clientThreadsArray */ 171 static wxMutex mMutexClientInformation; /**< Locks access to updating client information in GUI */ 171 172 172 173 // Widgets used in the frame … … 408 409 * @param resource The location of the file to download 409 410 **/ 410 bool DownloadUpdateFile(wxString & fileName, ProgressManager& progressManager, wxString& errorMsg, wxStringresource);411 bool DownloadUpdateFile(wxString const &fileName, ProgressManager& progressManager, wxString& errorMsg, wxString const &resource); 411 412 412 413 /** trunk/src/include/preference.h
r389 r524 73 73 * @param value Boolean value 74 74 **/ 75 Preference(wxString name, bool value);75 Preference(wxString const &name, bool value); 76 76 77 77 /** … … 80 80 * @param value Double value 81 81 **/ 82 Preference(wxString name, double value);82 Preference(wxString const &name, double value); 83 83 84 84 /** … … 87 87 * @param value Int32 value 88 88 **/ 89 Preference(wxString name, wxInt32 value);89 Preference(wxString const &name, wxInt32 value); 90 90 91 91 /** … … 94 94 * @param value Uint32 value 95 95 **/ 96 Preference(wxString name, wxUint32 value);96 Preference(wxString const&name, wxUint32 value); 97 97 98 98 /** … … 102 102 * @param isHidden Hidden state 103 103 **/ 104 Preference(wxString name, wxString const &value, bool isHidden = false);104 Preference(wxString const &name, wxString const &value, bool isHidden = false); 105 105 106 106 /** trunk/src/include/queue.h
r485 r524 236 236 * @returns true/false depending on whether the queue could be read successfully. 237 237 **/ 238 bool LoadQueueFile(wxString const &filename, wxString c lientName, wxString& localname);238 bool LoadQueueFile(wxString const &filename, wxString const &clientName, wxString& localname); 239 239 240 240 ProjectId GetProjectId(void) const {return mProjectId;} /**< Returns the WU project number */ trunk/src/include/tools.h
r485 r524 82 82 * @param localname Reference to an object to store the local filename. 83 83 **/ 84 static bool LoadFile(wxString const &filename, wxString& fileContent, wxString& localname, wxUint32 length = 0, bool fromStart = true );84 static bool LoadFile(wxString const &filename, wxString& fileContent, wxString& localname, wxUint32 length = 0, bool fromStart = true ); 85 85 86 86 // Miscellaneous message boxes trunk/src/mainDialog.cpp
r508 r524 159 159 wxMutex MainDialog::mMutexUpdateCheck; 160 160 wxMutex MainDialog::mMutexArrayBlocker; 161 wxMutex MainDialog::mMutexClientInformation; 161 162 162 163 … … 356 357 void MainDialog::UpdateClientInformation(ClientId clientId) 357 358 { 359 wxMutexLocker lock(mMutexClientInformation); 358 360 bool autoUpdateProjects; 359 361 wxUint32 deadlineDays; trunk/src/preference.cpp
r406 r524 34 34 35 35 36 Preference::Preference(wxString name, bool value)36 Preference::Preference(wxString const &name, bool value) 37 37 { 38 38 mPrefType = PT_BOOL; … … 42 42 43 43 44 Preference::Preference(wxString name, wxUint32 value)44 Preference::Preference(wxString const &name, wxUint32 value) 45 45 { 46 46 mPrefType = PT_UINT; … … 50 50 51 51 52 Preference::Preference(wxString name, wxInt32 value)52 Preference::Preference(wxString const &name, wxInt32 value) 53 53 { 54 54 mPrefType = PT_INT; … … 58 58 59 59 60 Preference::Preference(wxString name, double value)60 Preference::Preference(wxString const &name, double value) 61 61 { 62 62 mPrefType = PT_DOUBLE; … … 66 66 67 67 68 Preference::Preference(wxString name, wxString const &value, bool isHidden)68 Preference::Preference(wxString const &name, wxString const &value, bool isHidden) 69 69 { 70 70 // Hidden strings are stored in the same way as 'normal' strings trunk/src/queue.cpp
r485 r524 47 47 } 48 48 49 bool Queue::LoadQueueFile(wxString const &filename, wxString c lientName, wxString& localname)49 bool Queue::LoadQueueFile(wxString const &filename, wxString const &clientName, wxString& localname) 50 50 { 51 51 queueformat queuebuffer, *bp;
