File: classXMemory.html

package info (click to toggle)
xerces-c 3.1.1-3%2Bdeb7u2
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 39,584 kB
  • sloc: cpp: 166,988; xml: 12,028; sh: 10,236; ansic: 3,984; makefile: 1,290; perl: 500
file content (348 lines) | stat: -rw-r--r-- 17,875 bytes parent folder | download | duplicates (5)
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
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Xerces-C++: XMemory 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.6 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li class="current"><a href="classes.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="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
      <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>
</div>
<div class="contents">
<h1>XMemory Class Reference</h1><!-- doxytag: class="XMemory" -->This class makes it possible to override the C++ memory management by adding new/delete operators to this base class.  
<a href="#_details">More...</a>
<p>
<div class="dynheader">
Inheritance diagram for XMemory:</div>
<div class="dynsection">

<p><center><img src="classXMemory.png" usemap="#XMemory_map" border="0" alt=""></center>
<map name="XMemory_map">
<area href="classAbstractDOMParser.html" alt="AbstractDOMParser" shape="rect" coords="255,56,500,80">
<area href="classBinInputStream.html" alt="BinInputStream" shape="rect" coords="255,112,500,136">
<area href="classBinOutputStream.html" alt="BinOutputStream" shape="rect" coords="255,168,500,192">
<area href="classDefaultPanicHandler.html" alt="DefaultPanicHandler" shape="rect" coords="255,224,500,248">
<area href="classHash2KeysSetOf.html" alt="Hash2KeysSetOf< THasher >" shape="rect" coords="255,280,500,304">
<area href="classHash2KeysSetOfEnumerator.html" alt="Hash2KeysSetOfEnumerator< THasher >" shape="rect" coords="255,336,500,360">
<area href="classInputSource.html" alt="InputSource" shape="rect" coords="255,392,500,416">
<area href="classOutOfMemoryException.html" alt="OutOfMemoryException" shape="rect" coords="255,448,500,472">
<area href="classPSVIAttributeList.html" alt="PSVIAttributeList" shape="rect" coords="255,504,500,528">
<area href="classPSVIAttributeStorage.html" alt="PSVIAttributeStorage" shape="rect" coords="255,560,500,584">
<area href="classPSVIItem.html" alt="PSVIItem" shape="rect" coords="255,616,500,640">
<area href="classQName.html" alt="QName" shape="rect" coords="255,672,500,696">
<area href="classSAXException.html" alt="SAXException" shape="rect" coords="255,728,500,752">
<area href="classSAXParser.html" alt="SAXParser" shape="rect" coords="255,784,500,808">
<area href="classValidationContext.html" alt="ValidationContext" shape="rect" coords="255,840,500,864">
<area href="classXMLAttDef.html" alt="XMLAttDef" shape="rect" coords="255,896,500,920">
<area href="classXMLAttDefList.html" alt="XMLAttDefList" shape="rect" coords="255,952,500,976">
<area href="classXMLAttr.html" alt="XMLAttr" shape="rect" coords="255,1008,500,1032">
<area href="classXMLBigInteger.html" alt="XMLBigInteger" shape="rect" coords="255,1064,500,1088">
<area href="classXMLContentModel.html" alt="XMLContentModel" shape="rect" coords="255,1120,500,1144">
<area href="classXMLElementDecl.html" alt="XMLElementDecl" shape="rect" coords="255,1176,500,1200">
<area href="classXMLEntityDecl.html" alt="XMLEntityDecl" shape="rect" coords="255,1232,500,1256">
<area href="classXMLException.html" alt="XMLException" shape="rect" coords="255,1288,500,1312">
<area href="classXMLFileMgr.html" alt="XMLFileMgr" shape="rect" coords="255,1344,500,1368">
<area href="classXMLFormatTarget.html" alt="XMLFormatTarget" shape="rect" coords="255,1400,500,1424">
<area href="classXMLFormatter.html" alt="XMLFormatter" shape="rect" coords="255,1456,500,1480">
<area href="classXMLGrammarDescription.html" alt="XMLGrammarDescription" shape="rect" coords="255,1512,500,1536">
<area href="classXMLGrammarPool.html" alt="XMLGrammarPool" shape="rect" coords="255,1568,500,1592">
<area href="classXMLInteger.html" alt="XMLInteger" shape="rect" coords="255,1624,500,1648">
<area href="classXMLLCPTranscoder.html" alt="XMLLCPTranscoder" shape="rect" coords="255,1680,500,1704">
<area href="classXMLMutexMgr.html" alt="XMLMutexMgr" shape="rect" coords="255,1736,500,1760">
<area href="classXMLNetAccessor.html" alt="XMLNetAccessor" shape="rect" coords="255,1792,500,1816">
<area href="classXMLNotationDecl.html" alt="XMLNotationDecl" shape="rect" coords="255,1848,500,1872">
<area href="classXMLNumber.html" alt="XMLNumber" shape="rect" coords="255,1904,500,1928">
<area href="classXMLStringTokenizer.html" alt="XMLStringTokenizer" shape="rect" coords="255,1960,500,1984">
<area href="classXMLTranscoder.html" alt="XMLTranscoder" shape="rect" coords="255,2016,500,2040">
<area href="classXMLTransService.html" alt="XMLTransService" shape="rect" coords="255,2072,500,2096">
<area href="classXMLUri.html" alt="XMLUri" shape="rect" coords="255,2128,500,2152">
<area href="classXMLURL.html" alt="XMLURL" shape="rect" coords="255,2184,500,2208">
<area href="classXMLValidator.html" alt="XMLValidator" shape="rect" coords="255,2240,500,2264">
<area href="classXSModel.html" alt="XSModel" shape="rect" coords="255,2296,500,2320">
<area href="classXSNamedMap.html" alt="XSNamedMap< TVal >" shape="rect" coords="255,2352,500,2376">
<area href="classXSNamespaceItem.html" alt="XSNamespaceItem" shape="rect" coords="255,2408,500,2432">
<area href="classXSObject.html" alt="XSObject" shape="rect" coords="255,2464,500,2488">
<area href="classXSValue.html" alt="XSValue" shape="rect" coords="255,2520,500,2544">
</map>
</div>

<p>
<a href="classXMemory-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 colspan="2"><div class="groupHeader">The C++ memory management</div></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXMemory.html#717678d9deadc627a41fe0dddede9f7f">operator new</a> (size_t size)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method overrides operator new.  <a href="#717678d9deadc627a41fe0dddede9f7f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXMemory.html#c3022fcc968c684a31c1e6a9ede83c10">operator new</a> (size_t size, <a class="el" href="classMemoryManager.html">MemoryManager</a> *memMgr)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method defines a custom operator new, that will use the provided memory manager to perform the allocation.  <a href="#c3022fcc968c684a31c1e6a9ede83c10"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXMemory.html#eaad885b799ac2188ffd28f76182339c">operator new</a> (size_t size, void *ptr)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method overrides placement operator new.  <a href="#eaad885b799ac2188ffd28f76182339c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXMemory.html#9da30f1601ea458908cbf150fc2f8f8b">operator delete</a> (void *p)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method overrides operator delete.  <a href="#9da30f1601ea458908cbf150fc2f8f8b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXMemory.html#22efbc6459bdbe79f83b7791bba4d1f6">operator delete</a> (void *p, <a class="el" href="classMemoryManager.html">MemoryManager</a> *memMgr)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method provides a matching delete for the custom operator new.  <a href="#22efbc6459bdbe79f83b7791bba4d1f6"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXMemory.html#32ee38b70d412e12f669cfbd86adf623">operator delete</a> (void *p, void *ptr)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method provides a matching delete for the placement new.  <a href="#32ee38b70d412e12f669cfbd86adf623"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader">Constructor</div></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXMemory.html#e5b8adaa10d5d9276b42823f47e06858">XMemory</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Protected default constructor.  <a href="#e5b8adaa10d5d9276b42823f47e06858"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
This class makes it possible to override the C++ memory management by adding new/delete operators to this base class. 
<p>
This class is used in conjunction with the pluggable memory manager. It allows applications to control Xerces memory management. <hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="e5b8adaa10d5d9276b42823f47e06858"></a><!-- doxytag: member="XMemory::XMemory" ref="e5b8adaa10d5d9276b42823f47e06858" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">XMemory::XMemory           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Protected default constructor. 
<p>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="717678d9deadc627a41fe0dddede9f7f"></a><!-- doxytag: member="XMemory::operator new" ref="717678d9deadc627a41fe0dddede9f7f" args="(size_t size)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* XMemory::operator new           </td>
          <td>(</td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>size</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This method overrides operator new. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>The requested memory size </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="c3022fcc968c684a31c1e6a9ede83c10"></a><!-- doxytag: member="XMemory::operator new" ref="c3022fcc968c684a31c1e6a9ede83c10" args="(size_t size, MemoryManager *memMgr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* XMemory::operator new           </td>
          <td>(</td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classMemoryManager.html">MemoryManager</a> *&nbsp;</td>
          <td class="paramname"> <em>memMgr</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This method defines a custom operator new, that will use the provided memory manager to perform the allocation. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>The requested memory size </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>memMgr</em>&nbsp;</td><td>An application's memory manager </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="eaad885b799ac2188ffd28f76182339c"></a><!-- doxytag: member="XMemory::operator new" ref="eaad885b799ac2188ffd28f76182339c" args="(size_t size, void *ptr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* XMemory::operator new           </td>
          <td>(</td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>ptr</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This method overrides placement operator new. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>The requested memory size </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>ptr</em>&nbsp;</td><td>The memory location where the object should be allocated </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="9da30f1601ea458908cbf150fc2f8f8b"></a><!-- doxytag: member="XMemory::operator delete" ref="9da30f1601ea458908cbf150fc2f8f8b" args="(void *p)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void XMemory::operator delete           </td>
          <td>(</td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>p</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This method overrides operator delete. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>p</em>&nbsp;</td><td>The pointer to the allocated memory </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="22efbc6459bdbe79f83b7791bba4d1f6"></a><!-- doxytag: member="XMemory::operator delete" ref="22efbc6459bdbe79f83b7791bba4d1f6" args="(void *p, MemoryManager *memMgr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void XMemory::operator delete           </td>
          <td>(</td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classMemoryManager.html">MemoryManager</a> *&nbsp;</td>
          <td class="paramname"> <em>memMgr</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This method provides a matching delete for the custom operator new. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>p</em>&nbsp;</td><td>The pointer to the allocated memory </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>memMgr</em>&nbsp;</td><td>An application's memory manager </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="32ee38b70d412e12f669cfbd86adf623"></a><!-- doxytag: member="XMemory::operator delete" ref="32ee38b70d412e12f669cfbd86adf623" args="(void *p, void *ptr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void XMemory::operator delete           </td>
          <td>(</td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>ptr</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This method provides a matching delete for the placement new. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>p</em>&nbsp;</td><td>The pointer to the allocated memory </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>ptr</em>&nbsp;</td><td>The memory location where the object had to be allocated </td></tr>
  </table>
</dl>

</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="XMemory_8hpp-source.html">XMemory.hpp</a></ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Apr 21 17:55:50 2010 for Xerces-C++ by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>