diff options
| author | Günther Neuwirth <e0626638@student.tuwien.ac.at> | 2009-04-29 23:03:22 +0200 |
|---|---|---|
| committer | Günther Neuwirth <e0626638@student.tuwien.ac.at> | 2009-04-29 23:03:22 +0200 |
| commit | 6b89034cd15a2ca270591aec89b8b13c868b86fc (patch) | |
| tree | a455239cecd65a97bd5f5b11ea66819ac4d4ab3a | |
| parent | b03b7611a300d3004b445be45e07c40ae0d13032 (diff) | |
| parent | cfd4f77988cf12106e22e52fba6c1b5672a06162 (diff) | |
| download | ooprog-6b89034cd15a2ca270591aec89b8b13c868b86fc.tar.gz ooprog-6b89034cd15a2ca270591aec89b8b13c868b86fc.tar.bz2 ooprog-6b89034cd15a2ca270591aec89b8b13c868b86fc.zip | |
update
| -rw-r--r-- | ue2/imgsynth2/cbitmap.h | 2 | ||||
| -rw-r--r-- | ue2/imgsynth2/cfile.h | 5 | ||||
| -rw-r--r-- | ue2/imgsynth2/cscriptparser.cpp | 2 | ||||
| -rw-r--r-- | ue2/imgsynth2/cwindowsbitmap.cpp | 2 | ||||
| -rw-r--r-- | ue2/imgsynth2/cwindowsbitmap.h | 5 |
5 files changed, 9 insertions, 7 deletions
diff --git a/ue2/imgsynth2/cbitmap.h b/ue2/imgsynth2/cbitmap.h index c8a7f0d..f8f8850 100644 --- a/ue2/imgsynth2/cbitmap.h +++ b/ue2/imgsynth2/cbitmap.h | |||
| @@ -60,7 +60,7 @@ class CBitmap : public CFile | |||
| 60 | /** | 60 | /** |
| 61 | * TODO | 61 | * TODO |
| 62 | */ | 62 | */ |
| 63 | virtual void write(std::ofstream& out) = 0; | 63 | virtual void write(std::ofstream& out, std::string& filename) = 0; |
| 64 | 64 | ||
| 65 | /** | 65 | /** |
| 66 | * @method getPixelData | 66 | * @method getPixelData |
diff --git a/ue2/imgsynth2/cfile.h b/ue2/imgsynth2/cfile.h index a5c4d2a..9513a2c 100644 --- a/ue2/imgsynth2/cfile.h +++ b/ue2/imgsynth2/cfile.h | |||
| @@ -75,13 +75,14 @@ class CFile | |||
| 75 | /** | 75 | /** |
| 76 | * @method write | 76 | * @method write |
| 77 | * @brief Pure virtual method (interface). Should write data to filestream. | 77 | * @brief Pure virtual method (interface). Should write data to filestream. |
| 78 | * @param out filestream to write data to | 78 | * @param out filestream to write data to |
| 79 | * @param filename filename (maybe useful for some handlers) | ||
| 79 | * @return - | 80 | * @return - |
| 80 | * @globalvars none | 81 | * @globalvars none |
| 81 | * @exception FileError | 82 | * @exception FileError |
| 82 | * @conditions none | 83 | * @conditions none |
| 83 | */ | 84 | */ |
| 84 | virtual void write(std::ofstream& out) = 0; | 85 | virtual void write(std::ofstream& out, std::string& filename) = 0; |
| 85 | 86 | ||
| 86 | /** | 87 | /** |
| 87 | * @method callFunc | 88 | * @method callFunc |
diff --git a/ue2/imgsynth2/cscriptparser.cpp b/ue2/imgsynth2/cscriptparser.cpp index 033661f..e6bc9ae 100644 --- a/ue2/imgsynth2/cscriptparser.cpp +++ b/ue2/imgsynth2/cscriptparser.cpp | |||
| @@ -194,7 +194,7 @@ void CScriptparser::write(std::list<std::string> funcparams) | |||
| 194 | /* let handlers write() parse the file */ | 194 | /* let handlers write() parse the file */ |
| 195 | try | 195 | try |
| 196 | { | 196 | { |
| 197 | m_handler->write(file); | 197 | m_handler->write(file, filename); |
| 198 | if (!file.good()) | 198 | if (!file.good()) |
| 199 | throw ParserError("Error while writing image file.", m_curline); | 199 | throw ParserError("Error while writing image file.", m_curline); |
| 200 | file.close(); | 200 | file.close(); |
diff --git a/ue2/imgsynth2/cwindowsbitmap.cpp b/ue2/imgsynth2/cwindowsbitmap.cpp index ebbdd4c..ca927dd 100644 --- a/ue2/imgsynth2/cwindowsbitmap.cpp +++ b/ue2/imgsynth2/cwindowsbitmap.cpp | |||
| @@ -78,7 +78,7 @@ void CWindowsBitmap::read(std::ifstream& in) | |||
| 78 | 78 | ||
| 79 | /*----------------------------------------------------------------------------*/ | 79 | /*----------------------------------------------------------------------------*/ |
| 80 | 80 | ||
| 81 | void CWindowsBitmap::write(std::ofstream& out) | 81 | void CWindowsBitmap::write(std::ofstream& out, std::string& filename) |
| 82 | { | 82 | { |
| 83 | /* set header values */ | 83 | /* set header values */ |
| 84 | m_fileheader.bfSize = m_infoheader.biSizeImage + sizeof(m_infoheader) + sizeof(m_fileheader); | 84 | m_fileheader.bfSize = m_infoheader.biSizeImage + sizeof(m_infoheader) + sizeof(m_fileheader); |
diff --git a/ue2/imgsynth2/cwindowsbitmap.h b/ue2/imgsynth2/cwindowsbitmap.h index 3367952..28ad010 100644 --- a/ue2/imgsynth2/cwindowsbitmap.h +++ b/ue2/imgsynth2/cwindowsbitmap.h | |||
| @@ -59,14 +59,15 @@ class CWindowsBitmap : public CBitmap | |||
| 59 | /** | 59 | /** |
| 60 | * @method write | 60 | * @method write |
| 61 | * @brief Writes Windows Bitmap to filestream. | 61 | * @brief Writes Windows Bitmap to filestream. |
| 62 | * @param out filestream to read data from | 62 | * @param out filestream to read data from |
| 63 | * @param filename filename (maybe useful for some handlers) | ||
| 63 | * @return - | 64 | * @return - |
| 64 | * @globalvars none | 65 | * @globalvars none |
| 65 | * @exception FileError | 66 | * @exception FileError |
| 66 | * @exception bad_alloc | 67 | * @exception bad_alloc |
| 67 | * @conditions none | 68 | * @conditions none |
| 68 | */ | 69 | */ |
| 69 | void write(std::ofstream& out); | 70 | void write(std::ofstream& out, std::string& filename); |
| 70 | 71 | ||
| 71 | #ifdef DEBUG | 72 | #ifdef DEBUG |
| 72 | /** | 73 | /** |
