summaryrefslogtreecommitdiffstats
path: root/ue2/imgsynth2
diff options
context:
space:
mode:
authormanuel <manuel@clan-server.at>2009-04-29 16:15:00 +0200
committermanuel <manuel@clan-server.at>2009-04-29 16:15:00 +0200
commitcfd4f77988cf12106e22e52fba6c1b5672a06162 (patch)
treeadeca546331f12c9237b6e9fa3a4f659106dc5c6 /ue2/imgsynth2
parente1ad46101085cc7f8fd766936552b31d67188a15 (diff)
downloadooprog-cfd4f77988cf12106e22e52fba6c1b5672a06162.tar.gz
ooprog-cfd4f77988cf12106e22e52fba6c1b5672a06162.tar.bz2
ooprog-cfd4f77988cf12106e22e52fba6c1b5672a06162.zip
adding filename param to write(...)
Diffstat (limited to 'ue2/imgsynth2')
-rw-r--r--ue2/imgsynth2/cbitmap.h2
-rw-r--r--ue2/imgsynth2/cfile.h5
-rw-r--r--ue2/imgsynth2/cscriptparser.cpp2
-rw-r--r--ue2/imgsynth2/cwindowsbitmap.cpp2
-rw-r--r--ue2/imgsynth2/cwindowsbitmap.h5
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 ea9b242..46a7c42 100644
--- a/ue2/imgsynth2/cscriptparser.cpp
+++ b/ue2/imgsynth2/cscriptparser.cpp
@@ -192,7 +192,7 @@ void CScriptparser::write(std::list<std::string> funcparams)
192 /* let handlers write() parse the file */ 192 /* let handlers write() parse the file */
193 try 193 try
194 { 194 {
195 m_handler->write(file); 195 m_handler->write(file, filename);
196 if (!file.good()) 196 if (!file.good())
197 throw ParserError("Error while writing image file.", m_curline); 197 throw ParserError("Error while writing image file.", m_curline);
198 file.close(); 198 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
81void CWindowsBitmap::write(std::ofstream& out) 81void 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 /**