1 | <HTML><HEAD><SCRIPT language="JavaScript" src="../resources/script.js" type="text/javascript"></SCRIPT><TITLE>PlatformUtils.hpp Source File</TITLE><link href="XercesApi.css" rel="stylesheet" type="text/css"></HEAD><BODY alink="#ff0000" bgcolor="#ffffff" leftmargin="4" link="#0000ff" marginheight="4" marginwidth="4" text="#000000" topmargin="4" vlink="#0000aa"><TABLE border="0" cellpadding="0" cellspacing="0" width="620"><TR><TD align="left" height="60" rowspan="3" valign="top" width="135"><IMG border="0" height="60" hspace="0" src="../resources/logo.gif" vspace="0" width="135"></TD><TD align="left" colspan="4" height="5" valign="top" width="456"><IMG border="0" height="5" hspace="0" src="../resources/line.gif" vspace="0" width="456"></TD><TD align="left" height="60" rowspan="3" valign="top" width="29"><IMG border="0" height="60" hspace="0" src="../resources/right.gif" vspace="0" width="29"></TD></TR><TR><TD align="left" bgcolor="#0086b2" colspan="4" height="35" valign="top" width="456"><IMG alt="" border="0" height="35" hspace="0" src="../graphics/api-header.jpg" vspace="0" width="456"></TD></TR><TR><TD align="left" height="20" valign="top" width="168"><IMG border="0" height="20" hspace="0" src="../resources/bottom.gif" vspace="0" width="168"></TD><TD align="left" height="20" valign="top" width="96"><A href="http://xml.apache.org/" onMouseOut="rolloverOff('xml');" onMouseOver="rolloverOn('xml');" target="new"><IMG alt="http://xml.apache.org/" border="0" height="20" hspace="0" name="xml" onLoad="rolloverLoad('xml','../resources/button-xml-hi.gif','../resources/button-xml-lo.gif');" src="../resources/button-xml-lo.gif" vspace="0" width="96"></A></TD><TD align="left" height="20" valign="top" width="96"><A href="http://www.apache.org/" onMouseOut="rolloverOff('asf');" onMouseOver="rolloverOn('asf');" target="new"><IMG alt="http://www.apache.org/" border="0" height="20" hspace="0" name="asf" onLoad="rolloverLoad('asf','../resources/button-asf-hi.gif','../resources/button-asf-lo.gif');" src="../resources/button-asf-lo.gif" vspace="0" width="96"></A></TD><TD align="left" height="20" valign="top" width="96"><A href="http://www.w3.org/" onMouseOut="rolloverOff('w3c');" onMouseOver="rolloverOn('w3c');" target="new"><IMG alt="http://www.w3.org/" border="0" height="20" hspace="0" name="w3c" onLoad="rolloverLoad('w3c','../resources/button-w3c-hi.gif','../resources/button-w3c-lo.gif');" src="../resources/button-w3c-lo.gif" vspace="0" width="96"></A></TD></TR></TABLE><TABLE border="0" cellpadding="0" cellspacing="0" width="620"><TR><TD align="left" valign="top" width="120"><IMG border="0" height="14" hspace="0" src="../resources/join.gif" vspace="0" width="120"><BR>
|
---|
2 | <A href="../../index.html" onMouseOut="rolloverOff('side-ext-2');" onMouseOver="rolloverOn('side-ext-2');"><IMG alt="Home" border="0" height="12" hspace="0" name="side-ext-2" onLoad="rolloverLoad('side-ext-2','../graphics/ext-2-label-2.jpg','../graphics/ext-2-label-3.jpg');" src="../graphics/ext-2-label-3.jpg" vspace="0" width="120"></A><BR>
|
---|
3 |
|
---|
4 | <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>
|
---|
5 |
|
---|
6 | <A href="../index.html" onMouseOut="rolloverOff('side-index');" onMouseOver="rolloverOn('side-index');"><IMG alt="Readme" border="0" height="12" hspace="0" name="side-index" onLoad="rolloverLoad('side-index','../graphics/index-label-2.jpg','../graphics/index-label-3.jpg');" src="../graphics/index-label-3.jpg" vspace="0" width="120"></A><BR>
|
---|
7 | <A href="../releases.html" onMouseOut="rolloverOff('side-releases');" onMouseOver="rolloverOn('side-releases');"><IMG alt="Release Info" border="0" height="12" hspace="0" name="side-releases" onLoad="rolloverLoad('side-releases','../graphics/releases-label-2.jpg','../graphics/releases-label-3.jpg');" src="../graphics/releases-label-3.jpg" vspace="0" width="120"></A><BR>
|
---|
8 | <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>
|
---|
9 | <A href="../install.html" onMouseOut="rolloverOff('side-install');" onMouseOver="rolloverOn('side-install');"><IMG alt="Installation" border="0" height="12" hspace="0" name="side-install" onLoad="rolloverLoad('side-install','../graphics/install-label-2.jpg','../graphics/install-label-3.jpg');" src="../graphics/install-label-3.jpg" vspace="0" width="120"></A><BR>
|
---|
10 | <A href="http://xml.apache.org/dist/xerces-c/" onMouseOut="rolloverOff('side-ext-18');" onMouseOver="rolloverOn('side-ext-18');"><IMG alt="Download" border="0" height="12" hspace="0" name="side-ext-18" onLoad="rolloverLoad('side-ext-18','../graphics/ext-18-label-2.jpg','../graphics/ext-18-label-3.jpg');" src="../graphics/ext-18-label-3.jpg" vspace="0" width="120"></A><BR>
|
---|
11 | <A href="../build.html" onMouseOut="rolloverOff('side-build');" onMouseOver="rolloverOn('side-build');"><IMG alt="Build" border="0" height="12" hspace="0" name="side-build" onLoad="rolloverLoad('side-build','../graphics/build-label-2.jpg','../graphics/build-label-3.jpg');" src="../graphics/build-label-3.jpg" vspace="0" width="120"></A><BR>
|
---|
12 |
|
---|
13 | <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>
|
---|
14 | <A href="../faqs.html" onMouseOut="rolloverOff('side-faqs');" onMouseOver="rolloverOn('side-faqs');"><IMG alt="FAQs" border="0" height="12" hspace="0" name="side-faqs" onLoad="rolloverLoad('side-faqs','../graphics/faqs-label-2.jpg','../graphics/faqs-label-3.jpg');" src="../graphics/faqs-label-3.jpg" vspace="0" width="120"></A><BR>
|
---|
15 | <A href="../samples.html" onMouseOut="rolloverOff('side-samples');" onMouseOver="rolloverOn('side-samples');"><IMG alt="Samples" border="0" height="12" hspace="0" name="side-samples" onLoad="rolloverLoad('side-samples','../graphics/samples-label-2.jpg','../graphics/samples-label-3.jpg');" src="../graphics/samples-label-3.jpg" vspace="0" width="120"></A><BR>
|
---|
16 | <A href="../api.html" onMouseOut="rolloverOff('side-api');" onMouseOver="rolloverOn('side-api');"><IMG alt="API Docs" border="0" height="12" hspace="0" name="side-api" onLoad="rolloverLoad('side-api','../graphics/api-label-2.jpg','../graphics/api-label-3.jpg');" src="../graphics/api-label-3.jpg" vspace="0" width="120"></A><BR>
|
---|
17 |
|
---|
18 | <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>
|
---|
19 | <A href="../ApacheDOMC++Binding.html" onMouseOut="rolloverOff('side-ext-68');" onMouseOver="rolloverOn('side-ext-68');"><IMG alt="DOM C++ Binding" border="0" height="12" hspace="0" name="side-ext-68" onLoad="rolloverLoad('side-ext-68','../graphics/ext-68-label-2.jpg','../graphics/ext-68-label-3.jpg');" src="../graphics/ext-68-label-3.jpg" vspace="0" width="120"></A><BR>
|
---|
20 |
|
---|
21 | <A href="../program.html" onMouseOut="rolloverOff('side-program');" onMouseOver="rolloverOn('side-program');"><IMG alt="Programming" border="0" height="12" hspace="0" name="side-program" onLoad="rolloverLoad('side-program','../graphics/program-label-2.jpg','../graphics/program-label-3.jpg');" src="../graphics/program-label-3.jpg" vspace="0" width="120"></A><BR>
|
---|
22 | <A href="../migrate.html" onMouseOut="rolloverOff('side-migrate');" onMouseOver="rolloverOn('side-migrate');"><IMG alt="Migration Guide" border="0" height="12" hspace="0" name="side-migrate" onLoad="rolloverLoad('side-migrate','../graphics/migrate-label-2.jpg','../graphics/migrate-label-3.jpg');" src="../graphics/migrate-label-3.jpg" vspace="0" width="120"></A><BR>
|
---|
23 |
|
---|
24 | <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>
|
---|
25 |
|
---|
26 | <A href="../feedback.html" onMouseOut="rolloverOff('side-feedback');" onMouseOver="rolloverOn('side-feedback');"><IMG alt="Feedback" border="0" height="12" hspace="0" name="side-feedback" onLoad="rolloverLoad('side-feedback','../graphics/feedback-label-2.jpg','../graphics/feedback-label-3.jpg');" src="../graphics/feedback-label-3.jpg" vspace="0" width="120"></A><BR>
|
---|
27 | <A href="../bug-report.html" onMouseOut="rolloverOff('side-bug-report');" onMouseOver="rolloverOn('side-bug-report');"><IMG alt="Bug-Reporting" border="0" height="12" hspace="0" name="side-bug-report" onLoad="rolloverLoad('side-bug-report','../graphics/bug-report-label-2.jpg','../graphics/bug-report-label-3.jpg');" src="../graphics/bug-report-label-3.jpg" vspace="0" width="120"></A><BR>
|
---|
28 | <A href="../pdf.html" onMouseOut="rolloverOff('side-pdf');" onMouseOver="rolloverOn('side-pdf');"><IMG alt="PDF Document" border="0" height="12" hspace="0" name="side-pdf" onLoad="rolloverLoad('side-pdf','../graphics/pdf-label-2.jpg','../graphics/pdf-label-3.jpg');" src="../graphics/pdf-label-3.jpg" vspace="0" width="120"></A><BR>
|
---|
29 |
|
---|
30 | <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>
|
---|
31 |
|
---|
32 | <A href="http://xml.apache.org/websrc/cvsweb.cgi/xml-xerces/c/" onMouseOut="rolloverOff('side-ext-100');" onMouseOver="rolloverOn('side-ext-100');"><IMG alt="CVS Repository" border="0" height="12" hspace="0" name="side-ext-100" onLoad="rolloverLoad('side-ext-100','../graphics/ext-100-label-2.jpg','../graphics/ext-100-label-3.jpg');" src="../graphics/ext-100-label-3.jpg" vspace="0" width="120"></A><BR>
|
---|
33 |
|
---|
34 | <A href="http://marc.theaimsgroup.com/?l=xerces-c-dev" onMouseOut="rolloverOff('side-ext-102');" onMouseOver="rolloverOn('side-ext-102');"><IMG alt="Mail Archive" border="0" height="12" hspace="0" name="side-ext-102" onLoad="rolloverLoad('side-ext-102','../graphics/ext-102-label-2.jpg','../graphics/ext-102-label-3.jpg');" src="../graphics/ext-102-label-3.jpg" vspace="0" width="120"></A><BR>
|
---|
35 |
|
---|
36 |
|
---|
37 | <IMG border="0" height="14" hspace="0" src="../resources/close.gif" vspace="0" width="120"><BR></TD><TD align="left" valign="top" width="500"><TABLE border="0" cellpadding="3" cellspacing="0"><TR><TD>
|
---|
38 | <TABLE border="0" cellpadding="0" cellspacing="0" width="494"><TR><TD bgcolor="#FFFFFF" colspan="2" width="494"><TABLE border="0" cellpadding="0" cellspacing="0" width="494"><TR><TD bgcolor="#039acc" height="1" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#039acc" height="1" width="492"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="492"></TD><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD bgcolor="#039acc" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2" width="492"><FONT color="#ffffff" face="arial,helvetica,sanserif" size="+1"><IMG border="0" height="2" hspace="0" src="../resources/void.gif" vspace="0" width="2"><B>API Docs for SAX and DOM</B></FONT></TD><TD bgcolor="#017299" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#017299" height="1" width="492"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="492"></TD><TD bgcolor="#017299" height="1" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD></TR></TABLE></TD></TR><TR><TD width="10"> </TD><TD width="484"><FONT color="#000000" face="arial,helvetica,sanserif">
|
---|
39 |
|
---|
40 | <P>
|
---|
41 | <!-- Generated by Doxygen 1.2.14 -->
|
---|
42 | <center>
|
---|
43 | <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center>
|
---|
44 | <hr><h1>PlatformUtils.hpp</h1><a href="PlatformUtils_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <font class="comment">/*</font>
|
---|
45 | 00002 <font class="comment"> * Copyright 1999-2004 The Apache Software Foundation.</font>
|
---|
46 | 00003 <font class="comment"> * </font>
|
---|
47 | 00004 <font class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</font>
|
---|
48 | 00005 <font class="comment"> * you may not use this file except in compliance with the License.</font>
|
---|
49 | 00006 <font class="comment"> * You may obtain a copy of the License at</font>
|
---|
50 | 00007 <font class="comment"> * </font>
|
---|
51 | 00008 <font class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</font>
|
---|
52 | 00009 <font class="comment"> * </font>
|
---|
53 | 00010 <font class="comment"> * Unless required by applicable law or agreed to in writing, software</font>
|
---|
54 | 00011 <font class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</font>
|
---|
55 | 00012 <font class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</font>
|
---|
56 | 00013 <font class="comment"> * See the License for the specific language governing permissions and</font>
|
---|
57 | 00014 <font class="comment"> * limitations under the License.</font>
|
---|
58 | 00015 <font class="comment"> */</font>
|
---|
59 | 00016
|
---|
60 | 00017 <font class="comment">/*</font>
|
---|
61 | 00018 <font class="comment"> * $Id: PlatformUtils.hpp,v 1.27 2004/09/08 13:56:22 peiyongz Exp $</font>
|
---|
62 | 00019 <font class="comment"> */</font>
|
---|
63 | 00020
|
---|
64 | 00021
|
---|
65 | 00022 <font class="preprocessor">#if !defined(PLATFORMUTILS_HPP)</font>
|
---|
66 | <a name="l00023"></a><a class="code" href="PlatformUtils_8hpp.html#a0">00023</a> <font class="preprocessor"></font><font class="preprocessor">#define PLATFORMUTILS_HPP</font>
|
---|
67 | 00024 <font class="preprocessor"></font>
|
---|
68 | 00025 <font class="preprocessor">#include <<a class="code" href="XMLException_8hpp.html">xercesc/util/XMLException.hpp</a>></font>
|
---|
69 | 00026 <font class="preprocessor">#include <<a class="code" href="PanicHandler_8hpp.html">xercesc/util/PanicHandler.hpp</a>></font>
|
---|
70 | 00027
|
---|
71 | 00028 <a class="code" href="XercesDefs_8hpp.html#a2">XERCES_CPP_NAMESPACE_BEGIN</a>
|
---|
72 | 00029
|
---|
73 | <a name="l00030"></a><a class="code" href="PlatformUtils_8hpp.html#a1">00030</a> <font class="keyword">class </font><a class="code" href="PlatformUtils_8hpp.html#a1">XMLMsgLoader</a>;
|
---|
74 | 00031 <font class="keyword">class </font><a class="code" href="classXMLNetAccessor.html">XMLNetAccessor</a>;
|
---|
75 | 00032 <font class="keyword">class </font><a class="code" href="classXMLTransService.html">XMLTransService</a>;
|
---|
76 | 00033 <font class="keyword">class </font><a class="code" href="classMemoryManager.html">MemoryManager</a>;
|
---|
77 | 00034 <font class="keyword">class </font>XMLMutex;
|
---|
78 | 00035
|
---|
79 | 00036 <font class="comment">//</font>
|
---|
80 | 00037 <font class="comment">// For internal use only</font>
|
---|
81 | 00038 <font class="comment">//</font>
|
---|
82 | 00039 <font class="comment">// This class provides a simple abstract API via which lazily evaluated</font>
|
---|
83 | 00040 <font class="comment">// data can be cleaned up.</font>
|
---|
84 | 00041 <font class="comment">//</font>
|
---|
85 | <a name="l00042"></a><a class="code" href="classXMLDeleter.html">00042</a> <font class="keyword">class </font><a class="code" href="XercesDefs_8hpp.html#a8"></a> <a class="code" href="classXMLDeleter.html">XMLDeleter</a>
|
---|
86 | 00043 {
|
---|
87 | 00044 <font class="keyword">public</font> :
|
---|
88 | 00045 <font class="keyword">virtual</font> ~<a class="code" href="classXMLDeleter.html">XMLDeleter</a>();
|
---|
89 | 00046
|
---|
90 | 00047 <font class="keyword">protected</font> :
|
---|
91 | 00048 <a class="code" href="classXMLDeleter.html">XMLDeleter</a>();
|
---|
92 | 00049
|
---|
93 | 00050 <font class="keyword">private</font> :
|
---|
94 | 00051 <a class="code" href="classXMLDeleter.html">XMLDeleter</a>(<font class="keyword">const</font> <a class="code" href="classXMLDeleter.html">XMLDeleter</a>&);
|
---|
95 | 00052 <a class="code" href="classXMLDeleter.html">XMLDeleter</a>& operator=(<font class="keyword">const</font> <a class="code" href="classXMLDeleter.html">XMLDeleter</a>&);
|
---|
96 | 00053 };
|
---|
97 | 00054
|
---|
98 | 00055
|
---|
99 | <a name="l00064"></a><a class="code" href="classXMLPlatformUtils.html">00064</a> <font class="keyword">class </font><a class="code" href="XercesDefs_8hpp.html#a8"></a> XMLPlatformUtils
|
---|
100 | 00065 {
|
---|
101 | 00066 <font class="keyword">public</font> :
|
---|
102 | 00067
|
---|
103 | 00070
|
---|
104 | <a name="l00083"></a><a class="code" href="classXMLPlatformUtils.html#z488_0">00083</a> <font class="keyword">static</font> <a class="code" href="classXMLNetAccessor.html">XMLNetAccessor</a>* fgNetAccessor;
|
---|
105 | 00084
|
---|
106 | <a name="l00095"></a><a class="code" href="classXMLPlatformUtils.html#z488_1">00095</a> <font class="keyword">static</font> <a class="code" href="classXMLTransService.html">XMLTransService</a>* fgTransService;
|
---|
107 | 00096
|
---|
108 | <a name="l00101"></a><a class="code" href="classXMLPlatformUtils.html#z488_2">00101</a> <font class="keyword">static</font> <a class="code" href="classPanicHandler.html">PanicHandler</a>* fgUserPanicHandler;
|
---|
109 | 00102
|
---|
110 | <a name="l00107"></a><a class="code" href="classXMLPlatformUtils.html#z488_3">00107</a> <font class="keyword">static</font> <a class="code" href="classPanicHandler.html">PanicHandler</a>* fgDefaultPanicHandler;
|
---|
111 | 00108
|
---|
112 | <a name="l00114"></a><a class="code" href="classXMLPlatformUtils.html#z488_4">00114</a> <font class="keyword">static</font> <a class="code" href="classMemoryManager.html">MemoryManager</a>* fgMemoryManager;
|
---|
113 | 00115
|
---|
114 | <a name="l00124"></a><a class="code" href="classXMLPlatformUtils.html#z488_5">00124</a> <font class="keyword">static</font> <a class="code" href="classMemoryManager.html">MemoryManager</a>* fgArrayMemoryManager;
|
---|
115 | 00125
|
---|
116 | <a name="l00126"></a><a class="code" href="classXMLPlatformUtils.html#z488_6">00126</a> <font class="keyword">static</font> XMLMutex* fgAtomicMutex;
|
---|
117 | 00127
|
---|
118 | 00129
|
---|
119 | 00130
|
---|
120 | 00133
|
---|
121 | 00164 <font class="keyword">static</font> <font class="keywordtype">void</font> Initialize(<font class="keyword">const</font> <font class="keywordtype">char</font>* <font class="keyword">const</font> locale = <a class="code" href="classXMLUni.html#p202">XMLUni::fgXercescDefaultLocale</a>
|
---|
122 | 00165 , <font class="keyword">const</font> <font class="keywordtype">char</font>* <font class="keyword">const</font> nlsHome = 0
|
---|
123 | 00166 , <a class="code" href="classPanicHandler.html">PanicHandler</a>* <font class="keyword">const</font> panicHandler = 0
|
---|
124 | 00167 , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font> memoryManager = 0);
|
---|
125 | 00168
|
---|
126 | 00175 <font class="keyword">static</font> <font class="keywordtype">void</font> Terminate();
|
---|
127 | 00176
|
---|
128 | 00193 <font class="keyword">static</font> <font class="keywordtype">void</font> panic
|
---|
129 | 00194 (
|
---|
130 | 00195 <font class="keyword">const</font> <a class="code" href="classPanicHandler.html#z485_0">PanicHandler::PanicReasons</a> reason
|
---|
131 | 00196 );
|
---|
132 | 00197
|
---|
133 | 00199
|
---|
134 | 00202
|
---|
135 | 00216 <font class="keyword">static</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> curFilePos(FileHandle theFile
|
---|
136 | 00217 , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font> manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>);
|
---|
137 | 00218
|
---|
138 | 00229 <font class="keyword">static</font> <font class="keywordtype">void</font> closeFile(FileHandle theFile
|
---|
139 | 00230 , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font> manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>);
|
---|
140 | 00231
|
---|
141 | 00242 <font class="keyword">static</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> fileSize(FileHandle theFile
|
---|
142 | 00243 , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font> manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>);
|
---|
143 | 00244
|
---|
144 | 00255 <font class="keyword">static</font> FileHandle openFile(<font class="keyword">const</font> <font class="keywordtype">char</font>* <font class="keyword">const</font> fileName
|
---|
145 | 00256 , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font> manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>);
|
---|
146 | 00257
|
---|
147 | 00268 <font class="keyword">static</font> FileHandle openFile(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> fileName
|
---|
148 | 00269 , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font> manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>);
|
---|
149 | 00270
|
---|
150 | 00281 <font class="keyword">static</font> FileHandle openFileToWrite(<font class="keyword">const</font> <font class="keywordtype">char</font>* <font class="keyword">const</font> fileName
|
---|
151 | 00282 , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font> manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>);
|
---|
152 | 00283
|
---|
153 | 00294 <font class="keyword">static</font> FileHandle openFileToWrite(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> fileName
|
---|
154 | 00295 , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font> manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>);
|
---|
155 | 00296
|
---|
156 | 00307 <font class="keyword">static</font> FileHandle openStdInHandle(<a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font> manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>);
|
---|
157 | 00308
|
---|
158 | 00325 <font class="keyword">static</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> readFileBuffer
|
---|
159 | 00326 (
|
---|
160 | 00327 FileHandle theFile
|
---|
161 | 00328 , <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> toRead
|
---|
162 | 00329 , <a class="code" href="XercesDefs_8hpp.html#a16">XMLByte</a>* <font class="keyword">const</font> toFill
|
---|
163 | 00330 , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font> manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>
|
---|
164 | 00331 );
|
---|
165 | 00332
|
---|
166 | 00347 <font class="keyword">static</font> <font class="keywordtype">void</font> writeBufferToFile
|
---|
167 | 00348 (
|
---|
168 | 00349 FileHandle <font class="keyword">const</font> theFile
|
---|
169 | 00350 , <font class="keywordtype">long</font> toWrite
|
---|
170 | 00351 , <font class="keyword">const</font> <a class="code" href="XercesDefs_8hpp.html#a16">XMLByte</a>* <font class="keyword">const</font> toFlush
|
---|
171 | 00352 , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font> manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>
|
---|
172 | 00353 );
|
---|
173 | 00354
|
---|
174 | 00364 <font class="keyword">static</font> <font class="keywordtype">void</font> resetFile(FileHandle theFile
|
---|
175 | 00365 , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font> manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>);
|
---|
176 | 00366
|
---|
177 | 00368
|
---|
178 | 00369
|
---|
179 | 00393 <font class="keyword">static</font> XMLCh* getFullPath
|
---|
180 | 00394 (
|
---|
181 | 00395 <font class="keyword">const</font> XMLCh* <font class="keyword">const</font> srcPath
|
---|
182 | 00396 , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font> manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>
|
---|
183 | 00397 );
|
---|
184 | 00398
|
---|
185 | 00412 <font class="keyword">static</font> XMLCh* getCurrentDirectory
|
---|
186 | 00413 (
|
---|
187 | 00414 <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font> manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>
|
---|
188 | 00415 );
|
---|
189 | 00416
|
---|
190 | 00426 <font class="keyword">static</font> <font class="keyword">inline</font> <font class="keywordtype">bool</font> isAnySlash(XMLCh c);
|
---|
191 | 00427
|
---|
192 | 00437 <font class="keyword">static</font> <font class="keywordtype">void</font> removeDotSlash(XMLCh* <font class="keyword">const</font> srcPath
|
---|
193 | 00438 , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font> manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>);
|
---|
194 | 00439
|
---|
195 | 00450 <font class="keyword">static</font> <font class="keywordtype">void</font> removeDotDotSlash(XMLCh* <font class="keyword">const</font> srcPath
|
---|
196 | 00451 , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font> manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>);
|
---|
197 | 00452
|
---|
198 | 00466 <font class="keyword">static</font> <font class="keywordtype">bool</font> isRelative(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> toCheck
|
---|
199 | 00467 , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font> manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>
|
---|
200 | 00468 );
|
---|
201 | 00469
|
---|
202 | 00489 <font class="keyword">static</font> XMLCh* weavePaths
|
---|
203 | 00490 (
|
---|
204 | 00491 <font class="keyword">const</font> XMLCh* <font class="keyword">const</font> basePath
|
---|
205 | 00492 , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font> relativePath
|
---|
206 | 00493 , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font> manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>
|
---|
207 | 00494 );
|
---|
208 | 00496
|
---|
209 | 00499
|
---|
210 | 00509 <font class="keyword">static</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">long</font> getCurrentMillis();
|
---|
211 | 00511
|
---|
212 | 00514
|
---|
213 | 00522 <font class="keyword">static</font> <font class="keywordtype">void</font> closeMutex(<font class="keywordtype">void</font>* <font class="keyword">const</font> mtxHandle);
|
---|
214 | 00523
|
---|
215 | 00531 <font class="keyword">static</font> <font class="keywordtype">void</font> lockMutex(<font class="keywordtype">void</font>* <font class="keyword">const</font> mtxHandle);
|
---|
216 | 00532
|
---|
217 | 00540 <font class="keyword">static</font> <font class="keywordtype">void</font>* makeMutex();
|
---|
218 | 00541
|
---|
219 | 00554 <font class="keyword">static</font> <font class="keywordtype">void</font> unlockMutex(<font class="keywordtype">void</font>* <font class="keyword">const</font> mtxHandle);
|
---|
220 | 00555
|
---|
221 | 00557
|
---|
222 | 00558
|
---|
223 | 00561
|
---|
224 | 00569 <font class="keyword">static</font> <a class="code" href="PlatformUtils_8hpp.html#a1">XMLMsgLoader</a>* loadMsgSet(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> msgDomain);
|
---|
225 | 00570
|
---|
226 | 00572
|
---|
227 | 00575
|
---|
228 | 00601 <font class="keyword">static</font> <font class="keywordtype">void</font>* compareAndSwap
|
---|
229 | 00602 (
|
---|
230 | 00603 <font class="keywordtype">void</font>** toFill
|
---|
231 | 00604 , <font class="keyword">const</font> <font class="keywordtype">void</font>* <font class="keyword">const</font> newValue
|
---|
232 | 00605 , <font class="keyword">const</font> <font class="keywordtype">void</font>* <font class="keyword">const</font> toCompare
|
---|
233 | 00606 );
|
---|
234 | 00607
|
---|
235 | 00609
|
---|
236 | 00610
|
---|
237 | 00613
|
---|
238 | 00633 <font class="keyword">static</font> <font class="keywordtype">int</font> atomicIncrement(<font class="keywordtype">int</font>& location);
|
---|
239 | 00634
|
---|
240 | 00654 <font class="keyword">static</font> <font class="keywordtype">int</font> atomicDecrement(<font class="keywordtype">int</font>& location);
|
---|
241 | 00655
|
---|
242 | 00657
|
---|
243 | 00671 <font class="keyword">static</font> <font class="keywordtype">void</font> recognizeNEL(<font class="keywordtype">bool</font> state
|
---|
244 | 00672 , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font> manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>);
|
---|
245 | 00673
|
---|
246 | 00677 <font class="keyword">static</font> <font class="keywordtype">bool</font> isNELRecognized();
|
---|
247 | 00679
|
---|
248 | 00691 <font class="keyword">static</font> <font class="keywordtype">void</font> strictIANAEncoding(<font class="keyword">const</font> <font class="keywordtype">bool</font> state);
|
---|
249 | 00692
|
---|
250 | 00697 <font class="keyword">static</font> <font class="keywordtype">bool</font> isStrictIANAEncoding();
|
---|
251 | 00699
|
---|
252 | 00707 <font class="keyword">static</font> <font class="keyword">inline</font> size_t alignPointerForNewBlockAllocation(size_t ptrSize);
|
---|
253 | 00708
|
---|
254 | 00709 <font class="keyword">private</font> :
|
---|
255 | 00710 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
256 | 00711 <font class="comment">// Unimplemented constructors and operators</font>
|
---|
257 | 00712 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
258 | 00713 XMLPlatformUtils();
|
---|
259 | 00714
|
---|
260 | 00717
|
---|
261 | 00723 <font class="keyword">static</font> <a class="code" href="PlatformUtils_8hpp.html#a1">XMLMsgLoader</a>* loadAMsgSet(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> msgDomain);
|
---|
262 | 00724
|
---|
263 | 00734 <font class="keyword">static</font> <a class="code" href="classXMLNetAccessor.html">XMLNetAccessor</a>* makeNetAccessor();
|
---|
264 | 00735
|
---|
265 | 00746 <font class="keyword">static</font> <a class="code" href="classXMLTransService.html">XMLTransService</a>* makeTransService();
|
---|
266 | 00747
|
---|
267 | 00754 <font class="keyword">static</font> <font class="keywordtype">void</font> platformInit();
|
---|
268 | 00755
|
---|
269 | 00762 <font class="keyword">static</font> <font class="keywordtype">void</font> platformTerm();
|
---|
270 | 00763
|
---|
271 | 00771 <font class="keyword">static</font> <font class="keywordtype">int</font> searchSlashDotDotSlash(XMLCh* <font class="keyword">const</font> srcPath);
|
---|
272 | 00772
|
---|
273 | 00774
|
---|
274 | 00777
|
---|
275 | 00784 <font class="keyword">static</font> <font class="keywordtype">bool</font> fgMemMgrAdopted;
|
---|
276 | 00785
|
---|
277 | 00787 };
|
---|
278 | 00788
|
---|
279 | 00789
|
---|
280 | <a name="l00790"></a><a class="code" href="PlatformUtils_8hpp.html#a2">00790</a> <a class="code" href="XMLException_8hpp.html#a1">MakeXMLException</a>(XMLPlatformUtilsException, <a class="code" href="XercesDefs_8hpp.html#a8"></a>)
|
---|
281 | 00791
|
---|
282 | 00792
|
---|
283 | 00793 <font class="comment">// ---------------------------------------------------------------------------</font>
|
---|
284 | 00794 <font class="comment">// XMLPlatformUtils: alignPointerForNewBlockAllocation</font>
|
---|
285 | 00795 <font class="comment">// ---------------------------------------------------------------------------</font>
|
---|
286 | 00796 <font class="comment">// Calculate alignment required by platform for a new</font>
|
---|
287 | 00797 <font class="comment">// block allocation. We use this in our custom allocators</font>
|
---|
288 | 00798 <font class="comment">// to ensure that returned blocks are properly aligned.</font>
|
---|
289 | 00799 <font class="comment">// Note that, although this will take a pointer and return the position</font>
|
---|
290 | 00800 <font class="comment">// at which it should be placed for correct alignment, in our code</font>
|
---|
291 | 00801 <font class="comment">// we normally use size_t parameters to discover what the alignment</font>
|
---|
292 | 00802 <font class="comment">// of header blocks should be. Thus, if this is to be</font>
|
---|
293 | 00803 <font class="comment">// used for the former purpose, to make compilers happy</font>
|
---|
294 | 00804 <font class="comment">// some casting will be necessary - neilg.</font>
|
---|
295 | 00805 <font class="comment">//</font>
|
---|
296 | 00806 <font class="comment">// Note: XML_PLATFORM_NEW_BLOCK_ALIGNMENT may be specified on a</font>
|
---|
297 | 00807 <font class="comment">// per-architecture basis to dictate the alignment requirements</font>
|
---|
298 | 00808 <font class="comment">// of the architecture. In the absense of this specification,</font>
|
---|
299 | 00809 <font class="comment">// this routine guesses at the correct alignment value.</font>
|
---|
300 | 00810 <font class="comment">//</font>
|
---|
301 | 00811 <font class="comment">// A XML_PLATFORM_NEW_BLOCK_ALIGNMENT value of zero is illegal.</font>
|
---|
302 | 00812 <font class="comment">// If a platform requires absolutely no alignment, a value</font>
|
---|
303 | 00813 <font class="comment">// of 1 should be specified ("align pointers on 1 byte boundaries").</font>
|
---|
304 | 00814 <font class="comment">//</font>
|
---|
305 | 00815 <font class="keyword">inline</font> size_t
|
---|
306 | 00816 <a class="code" href="classXMLPlatformUtils.html#d0">XMLPlatformUtils::alignPointerForNewBlockAllocation</a>(size_t ptrSize)
|
---|
307 | 00817 {
|
---|
308 | 00818 <font class="comment">// Macro XML_PLATFORM_NEW_BLOCK_ALIGNMENT may be defined</font>
|
---|
309 | 00819 <font class="comment">// as needed to dictate alignment requirements on a</font>
|
---|
310 | 00820 <font class="comment">// per-architecture basis. In the absense of that we</font>
|
---|
311 | 00821 <font class="comment">// take an educated guess.</font>
|
---|
312 | 00822 <font class="preprocessor"> #ifdef XML_PLATFORM_NEW_BLOCK_ALIGNMENT</font>
|
---|
313 | 00823 <font class="preprocessor"></font> size_t alignment = XML_PLATFORM_NEW_BLOCK_ALIGNMENT;
|
---|
314 | 00824 <font class="preprocessor"> #else</font>
|
---|
315 | 00825 <font class="preprocessor"></font> size_t alignment = (<font class="keyword">sizeof</font>(<font class="keywordtype">void</font>*) >= <font class="keyword">sizeof</font>(double)) ? <font class="keyword">sizeof</font>(<font class="keywordtype">void</font>*) : <font class="keyword">sizeof</font>(double);
|
---|
316 | 00826 <font class="preprocessor"> #endif</font>
|
---|
317 | 00827 <font class="preprocessor"></font>
|
---|
318 | 00828 <font class="comment">// Calculate current alignment of pointer</font>
|
---|
319 | 00829 size_t current = ptrSize % alignment;
|
---|
320 | 00830
|
---|
321 | 00831 <font class="comment">// Adjust pointer alignment as needed</font>
|
---|
322 | 00832 <font class="keywordflow">return</font> (current == 0)
|
---|
323 | 00833 ? ptrSize
|
---|
324 | 00834 : (ptrSize + alignment - current);
|
---|
325 | 00835 }
|
---|
326 | 00836
|
---|
327 | 00837
|
---|
328 | 00838
|
---|
329 | 00839 <font class="comment">// ---------------------------------------------------------------------------</font>
|
---|
330 | 00840 <font class="comment">// XMLDeleter: Public Destructor</font>
|
---|
331 | 00841 <font class="comment">// ---------------------------------------------------------------------------</font>
|
---|
332 | <a name="l00842"></a><a class="code" href="classXMLDeleter.html#a0">00842</a> <font class="keyword">inline</font> <a class="code" href="classXMLDeleter.html#a0">XMLDeleter::~XMLDeleter</a>()
|
---|
333 | 00843 {
|
---|
334 | 00844 }
|
---|
335 | 00845
|
---|
336 | 00846 <font class="comment">// ---------------------------------------------------------------------------</font>
|
---|
337 | 00847 <font class="comment">// XMLDeleter: Hidden constructors and operators</font>
|
---|
338 | 00848 <font class="comment">// ---------------------------------------------------------------------------</font>
|
---|
339 | <a name="l00849"></a><a class="code" href="classXMLDeleter.html#b0">00849</a> <font class="keyword">inline</font> <a class="code" href="classXMLDeleter.html#b0">XMLDeleter::XMLDeleter</a>()
|
---|
340 | 00850 {
|
---|
341 | 00851 }
|
---|
342 | 00852
|
---|
343 | 00853 <a class="code" href="XercesDefs_8hpp.html#a3">XERCES_CPP_NAMESPACE_END</a>
|
---|
344 | 00854
|
---|
345 | 00855 <font class="preprocessor">#endif</font>
|
---|
346 | </pre></div> </FONT></TD></TR></TABLE><BR>
|
---|
347 | </TD></TR></TABLE></TD></TR></TABLE><BR><TABLE border="0" cellpadding="0" cellspacing="0" width="620"><TR><TD bgcolor="#0086b2"><IMG height="1" src="images/dot.gif" width="1" alt=""></TD></TR><TR><TD align="center"><FONT color="#0086b2" size="-1"><I>
|
---|
348 | Copyright © 1994-2004 The Apache Software Foundation.
|
---|
349 | All Rights Reserved.
|
---|
350 | </I></FONT></TD></TR></TABLE></BODY></HTML>
|
---|