summaryrefslogtreecommitdiffstats
path: root/ue2/doxygen/classCFile.html
blob: ce2ea96b4b97eb816d7c9e2f97e9cd7906fa3210 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>imgsynth2: CFile Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.3 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
    <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
  </ul>
</div>
<div class="tabs">
  <ul>
    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
  </ul>
</div>
<h1>CFile Class Reference</h1><!-- doxytag: class="CFile" -->Abstract class for handling files. Needed for generic use in <a class="el" href="classCScriptparser.html" title="class for parsing simple scriptfiles">CScriptparser</a>.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="cfile_8h-source.html">cfile.h</a>&gt;</code>
<p>
<div class="dynheader">
Inheritance diagram for CFile:</div>
<div class="dynsection">

<p><center><img src="classCFile.png" usemap="#CFile_map" border="0" alt=""></center>
<map name="CFile_map">
<area href="classCBitmap.html" alt="CBitmap" shape="rect" coords="59,56,167,80">
<area href="classCPixmap.html" alt="CPixmap" shape="rect" coords="0,112,108,136">
<area href="classCWindowsBitmap.html" alt="CWindowsBitmap" shape="rect" coords="118,112,226,136">
</map>
</div>

<p>
<a href="classCFile-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCFile.html#ebb1693f8c740d139f553b58874f82c1">~CFile</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default dtor (virtual).  <a href="#ebb1693f8c740d139f553b58874f82c1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCFile.html#fa8780b6d34045102aff06fceccaf075">read</a> (std::ifstream &amp;in)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Pure virtual method (interface). Should read data from filestream.  <a href="#fa8780b6d34045102aff06fceccaf075"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCFile.html#a77cd4604afac7b3b1384ca15ef4750e">write</a> (std::ofstream &amp;out)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Pure virtual method (interface). Should write data to filestream.  <a href="#a77cd4604afac7b3b1384ca15ef4750e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCFile.html#3991c5f43fab6365cc82ba80afccd791">callFunc</a> (const std::string &amp;func, const std::list&lt; std::string &gt; &amp;params)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Pure virtual method (interface). Should delegate the function and its parameters to the correct internal method.  <a href="#3991c5f43fab6365cc82ba80afccd791"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCFile.html#7a3148cb5797198cd856587bf001445f">supportsType</a> (const std::string &amp;type)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Check if filetype is supported by this implementation.  <a href="#7a3148cb5797198cd856587bf001445f"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">std::set&lt; std::string &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCFile.html#63719f47953108756b34b6c7e701f536">m_types</a></td></tr>

<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCFile_1_1FileError.html">FileError</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Exception thrown by implemententations of <a class="el" href="classCFile.html" title="Abstract class for handling files. Needed for generic use in CScriptparser.">CFile</a>.  <a href="classCFile_1_1FileError.html#_details">More...</a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Abstract class for handling files. Needed for generic use in <a class="el" href="classCScriptparser.html" title="class for parsing simple scriptfiles">CScriptparser</a>. 
<p>
<dl class="user" compact><dt><b>Modulname:</b></dt><dd>cfile </dd></dl>
<dl class="author" compact><dt><b>Author:</b></dt><dd>Guenther Neuwirth (0626638), Manuel Mausz (0728348) </dd></dl>
<dl class="date" compact><dt><b>Date:</b></dt><dd>17.04.2009</dd></dl>
Abstract class for handling files. Needed for generic use in <a class="el" href="classCScriptparser.html" title="class for parsing simple scriptfiles">CScriptparser</a>.<p>
In order for <a class="el" href="classCScriptparser.html" title="class for parsing simple scriptfiles">CScriptparser</a> to determine which instance of <a class="el" href="classCFile.html" title="Abstract class for handling files. Needed for generic use in CScriptparser.">CFile</a> supports which filetype, every implemententation need to insert their filetypes to the member m_types in their constructor.<p>
On error throw <a class="el" href="classCFile_1_1FileError.html" title="Exception thrown by implemententations of CFile.">FileError</a>. <hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="ebb1693f8c740d139f553b58874f82c1"></a><!-- doxytag: member="CFile::~CFile" ref="ebb1693f8c740d139f553b58874f82c1" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual CFile::~CFile           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Default dtor (virtual). 
<p>
<dl class="user" compact><dt><b>Methodname:</b></dt><dd>~CFile </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>-</em>&nbsp;</td><td></td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>- </dd></dl>
<dl class="user" compact><dt><b>Global variables used:</b></dt><dd>none </dd></dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>none</em>&nbsp;</td><td></td></tr>
  </table>
</dl>
<dl class="user" compact><dt><b>Conditions:</b></dt><dd>none </dd></dl>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="fa8780b6d34045102aff06fceccaf075"></a><!-- doxytag: member="CFile::read" ref="fa8780b6d34045102aff06fceccaf075" args="(std::ifstream &amp;in)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void CFile::read           </td>
          <td>(</td>
          <td class="paramtype">std::ifstream &amp;&nbsp;</td>
          <td class="paramname"> <em>in</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Pure virtual method (interface). Should read data from filestream. 
<p>
<dl class="user" compact><dt><b>Methodname:</b></dt><dd>read </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>in</em>&nbsp;</td><td>filestream to read data from </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>- </dd></dl>
<dl class="user" compact><dt><b>Global variables used:</b></dt><dd>none </dd></dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classCFile_1_1FileError.html" title="Exception thrown by implemententations of CFile.">FileError</a></em>&nbsp;</td><td></td></tr>
  </table>
</dl>
<dl class="user" compact><dt><b>Conditions:</b></dt><dd>none </dd></dl>

<p>Implemented in <a class="el" href="classCBitmap.html#beaf444a418973a1bf8373f236d54421">CBitmap</a>, <a class="el" href="classCPixmap.html#ef3b715729ca384e6817a3fcdddfa261">CPixmap</a>, and <a class="el" href="classCWindowsBitmap.html#cab005df5352370dd2fcb8a52738f81d">CWindowsBitmap</a>.</p>

</div>
</div><p>
<a class="anchor" name="a77cd4604afac7b3b1384ca15ef4750e"></a><!-- doxytag: member="CFile::write" ref="a77cd4604afac7b3b1384ca15ef4750e" args="(std::ofstream &amp;out)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void CFile::write           </td>
          <td>(</td>
          <td class="paramtype">std::ofstream &amp;&nbsp;</td>
          <td class="paramname"> <em>out</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Pure virtual method (interface). Should write data to filestream. 
<p>
<dl class="user" compact><dt><b>Methodname:</b></dt><dd>write </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>out</em>&nbsp;</td><td>filestream to write data to </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>- </dd></dl>
<dl class="user" compact><dt><b>Global variables used:</b></dt><dd>none </dd></dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classCFile_1_1FileError.html" title="Exception thrown by implemententations of CFile.">FileError</a></em>&nbsp;</td><td></td></tr>
  </table>
</dl>
<dl class="user" compact><dt><b>Conditions:</b></dt><dd>none </dd></dl>

<p>Implemented in <a class="el" href="classCBitmap.html#bfa214932af1cc21817dde3dbe3c61c6">CBitmap</a>, <a class="el" href="classCPixmap.html#507d5a88f8af0e41e418108e01572f13">CPixmap</a>, and <a class="el" href="classCWindowsBitmap.html#95c314ad2c9b14dbe5189799bc7e4f71">CWindowsBitmap</a>.</p>

</div>
</div><p>
<a class="anchor" name="3991c5f43fab6365cc82ba80afccd791"></a><!-- doxytag: member="CFile::callFunc" ref="3991c5f43fab6365cc82ba80afccd791" args="(const std::string &amp;func, const std::list&lt; std::string &gt; &amp;params)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void CFile::callFunc           </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::list&lt; std::string &gt; &amp;&nbsp;</td>
          <td class="paramname"> <em>params</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Pure virtual method (interface). Should delegate the function and its parameters to the correct internal method. 
<p>
<dl class="user" compact><dt><b>Methodname:</b></dt><dd>callFunc </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>func</em>&nbsp;</td><td>function name </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>params</em>&nbsp;</td><td>function parameters as list </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>- </dd></dl>
<dl class="user" compact><dt><b>Global variables used:</b></dt><dd>none </dd></dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classCFile_1_1FileError.html" title="Exception thrown by implemententations of CFile.">FileError</a></em>&nbsp;</td><td></td></tr>
  </table>
</dl>
<dl class="user" compact><dt><b>Conditions:</b></dt><dd>none </dd></dl>

<p>Implemented in <a class="el" href="classCBitmap.html#9227003c492ed640ed0ea661d7d052c2">CBitmap</a>.</p>

</div>
</div><p>
<a class="anchor" name="7a3148cb5797198cd856587bf001445f"></a><!-- doxytag: member="CFile::supportsType" ref="7a3148cb5797198cd856587bf001445f" args="(const std::string &amp;type)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool CFile::supportsType           </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>type</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Check if filetype is supported by this implementation. 
<p>
<dl class="user" compact><dt><b>Methodname:</b></dt><dd>supportsType </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>type</em>&nbsp;</td><td>filetype </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>true if filetype is supported. false otherwise </dd></dl>
<dl class="user" compact><dt><b>Global variables used:</b></dt><dd>none </dd></dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>none</em>&nbsp;</td><td></td></tr>
  </table>
</dl>
<dl class="user" compact><dt><b>Conditions:</b></dt><dd>none </dd></dl>

</div>
</div><p>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="63719f47953108756b34b6c7e701f536"></a><!-- doxytag: member="CFile::m_types" ref="63719f47953108756b34b6c7e701f536" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::set&lt;std::string&gt; <a class="el" href="classCFile.html#63719f47953108756b34b6c7e701f536">CFile::m_types</a><code> [protected]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
set of filetypes suppported by this implementation 
</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li>imgsynth2/<a class="el" href="cfile_8h-source.html">cfile.h</a></ul>
<hr size="1"><address style="text-align: right;"><small>Generated on Sun May 3 19:16:26 2009 for imgsynth2 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address>
</body>
</html>