diff options
author | David Walter Seikel | 2014-01-13 19:47:58 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-01-13 19:47:58 +1000 |
commit | f9158592e1478b2013afc7041d9ed041cf2d2f4a (patch) | |
tree | b16e389d7988700e21b4c9741044cefa536dcbae /libraries/irrlicht-1.8/doc/html/coreutil_8h_source.html | |
parent | Libraries readme updated with change markers and more of the Irrlicht changes. (diff) | |
download | SledjHamr-f9158592e1478b2013afc7041d9ed041cf2d2f4a.zip SledjHamr-f9158592e1478b2013afc7041d9ed041cf2d2f4a.tar.gz SledjHamr-f9158592e1478b2013afc7041d9ed041cf2d2f4a.tar.bz2 SledjHamr-f9158592e1478b2013afc7041d9ed041cf2d2f4a.tar.xz |
Update Irrlicht to 1.8.1. Include actual change markers this time. lol
Diffstat (limited to 'libraries/irrlicht-1.8/doc/html/coreutil_8h_source.html')
-rw-r--r-- | libraries/irrlicht-1.8/doc/html/coreutil_8h_source.html | 295 |
1 files changed, 0 insertions, 295 deletions
diff --git a/libraries/irrlicht-1.8/doc/html/coreutil_8h_source.html b/libraries/irrlicht-1.8/doc/html/coreutil_8h_source.html deleted file mode 100644 index 9835896..0000000 --- a/libraries/irrlicht-1.8/doc/html/coreutil_8h_source.html +++ /dev/null | |||
@@ -1,295 +0,0 @@ | |||
1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
2 | <html xmlns="http://www.w3.org/1999/xhtml"> | ||
3 | <head> | ||
4 | <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> | ||
5 | <title>Irrlicht 3D Engine: coreutil.h Source File</title> | ||
6 | |||
7 | <link href="tabs.css" rel="stylesheet" type="text/css"/> | ||
8 | <link href="doxygen.css" rel="stylesheet" type="text/css" /> | ||
9 | <link href="navtree.css" rel="stylesheet" type="text/css"/> | ||
10 | <script type="text/javascript" src="jquery.js"></script> | ||
11 | <script type="text/javascript" src="resize.js"></script> | ||
12 | <script type="text/javascript" src="navtree.js"></script> | ||
13 | <script type="text/javascript"> | ||
14 | $(document).ready(initResizable); | ||
15 | </script> | ||
16 | <link href="search/search.css" rel="stylesheet" type="text/css"/> | ||
17 | <script type="text/javascript" src="search/search.js"></script> | ||
18 | <script type="text/javascript"> | ||
19 | $(document).ready(function() { searchBox.OnSelectItem(0); }); | ||
20 | </script> | ||
21 | |||
22 | </head> | ||
23 | <body> | ||
24 | <div id="top"><!-- do not remove this div! --> | ||
25 | |||
26 | |||
27 | <div id="titlearea"> | ||
28 | <table cellspacing="0" cellpadding="0"> | ||
29 | <tbody> | ||
30 | <tr style="height: 56px;"> | ||
31 | |||
32 | <td id="projectlogo"><img alt="Logo" src="irrlichtlogo.png"/></td> | ||
33 | |||
34 | |||
35 | <td style="padding-left: 0.5em;"> | ||
36 | <div id="projectname">Irrlicht 3D Engine | ||
37 | |||
38 | </div> | ||
39 | |||
40 | </td> | ||
41 | |||
42 | |||
43 | |||
44 | |||
45 | <td> <div id="MSearchBox" class="MSearchBoxInactive"> | ||
46 | <span class="left"> | ||
47 | <img id="MSearchSelect" src="search/mag_sel.png" | ||
48 | onmouseover="return searchBox.OnSearchSelectShow()" | ||
49 | onmouseout="return searchBox.OnSearchSelectHide()" | ||
50 | alt=""/> | ||
51 | <input type="text" id="MSearchField" value="Search" accesskey="S" | ||
52 | onfocus="searchBox.OnSearchFieldFocus(true)" | ||
53 | onblur="searchBox.OnSearchFieldFocus(false)" | ||
54 | onkeyup="searchBox.OnSearchFieldChange(event)"/> | ||
55 | </span><span class="right"> | ||
56 | <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> | ||
57 | </span> | ||
58 | </div> | ||
59 | </td> | ||
60 | |||
61 | |||
62 | </tr> | ||
63 | </tbody> | ||
64 | </table> | ||
65 | </div> | ||
66 | |||
67 | <!-- Generated by Doxygen 1.7.5.1 --> | ||
68 | <script type="text/javascript"> | ||
69 | var searchBox = new SearchBox("searchBox", "search",false,'Search'); | ||
70 | </script> | ||
71 | <script type="text/javascript" src="dynsections.js"></script> | ||
72 | </div> | ||
73 | <div id="side-nav" class="ui-resizable side-nav-resizable"> | ||
74 | <div id="nav-tree"> | ||
75 | <div id="nav-tree-contents"> | ||
76 | </div> | ||
77 | </div> | ||
78 | <div id="splitbar" style="-moz-user-select:none;" | ||
79 | class="ui-resizable-handle"> | ||
80 | </div> | ||
81 | </div> | ||
82 | <script type="text/javascript"> | ||
83 | initNavTree('coreutil_8h.html',''); | ||
84 | </script> | ||
85 | <div id="doc-content"> | ||
86 | <div class="header"> | ||
87 | <div class="headertitle"> | ||
88 | <div class="title">coreutil.h</div> </div> | ||
89 | </div> | ||
90 | <div class="contents"> | ||
91 | <a href="coreutil_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// Copyright (C) 2002-2012 Nikolaus Gebhardt</span> | ||
92 | <a name="l00002"></a>00002 <span class="comment">// This file is part of the "Irrlicht Engine".</span> | ||
93 | <a name="l00003"></a>00003 <span class="comment">// For conditions of distribution and use, see copyright notice in irrlicht.h</span> | ||
94 | <a name="l00004"></a>00004 | ||
95 | <a name="l00005"></a>00005 <span class="preprocessor">#ifndef __IRR_CORE_UTIL_H_INCLUDED__</span> | ||
96 | <a name="l00006"></a>00006 <span class="preprocessor"></span><span class="preprocessor">#define __IRR_CORE_UTIL_H_INCLUDED__</span> | ||
97 | <a name="l00007"></a>00007 <span class="preprocessor"></span> | ||
98 | <a name="l00008"></a>00008 <span class="preprocessor">#include "<a class="code" href="irr_string_8h.html">irrString.h</a>"</span> | ||
99 | <a name="l00009"></a>00009 <span class="preprocessor">#include "<a class="code" href="path_8h.html">path.h</a>"</span> | ||
100 | <a name="l00010"></a>00010 | ||
101 | <a name="l00011"></a>00011 <span class="keyword">namespace </span>irr | ||
102 | <a name="l00012"></a>00012 { | ||
103 | <a name="l00013"></a>00013 <span class="keyword">namespace </span>core | ||
104 | <a name="l00014"></a>00014 { | ||
105 | <a name="l00015"></a>00015 | ||
106 | <a name="l00020"></a>00020 <span class="comment">// ----------- some basic quite often used string functions -----------------</span> | ||
107 | <a name="l00021"></a>00021 | ||
108 | <a name="l00023"></a><a class="code" href="namespaceirr_1_1core.html#ab214253f8925de2ed42a7d671d02cf7f">00023</a> <span class="keyword">inline</span> <a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> <a class="code" href="namespaceirr_1_1core.html#ab214253f8925de2ed42a7d671d02cf7f" title="search if a filename has a proper extension">isFileExtension</a> ( <span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1string.html">io::path</a>& filename, | ||
109 | <a name="l00024"></a>00024 <span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1string.html">io::path</a>& ext0, | ||
110 | <a name="l00025"></a>00025 <span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1string.html">io::path</a>& ext1, | ||
111 | <a name="l00026"></a>00026 <span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1string.html">io::path</a>& ext2) | ||
112 | <a name="l00027"></a>00027 { | ||
113 | <a name="l00028"></a>00028 <a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> extPos = filename.<a class="code" href="classirr_1_1core_1_1string.html#a000258d8ce7a49ba10d20bfb8d9d3ad8" title="finds last occurrence of character in string">findLast</a> ( <span class="charliteral">'.'</span> ); | ||
114 | <a name="l00029"></a>00029 <span class="keywordflow">if</span> ( extPos < 0 ) | ||
115 | <a name="l00030"></a>00030 <span class="keywordflow">return</span> 0; | ||
116 | <a name="l00031"></a>00031 | ||
117 | <a name="l00032"></a>00032 extPos += 1; | ||
118 | <a name="l00033"></a>00033 <span class="keywordflow">if</span> ( filename.<a class="code" href="classirr_1_1core_1_1string.html#adf74d5a6ce1a2ed79b4b06d51e899602" title="Compares the strings ignoring case.">equals_substring_ignore_case</a> ( ext0, extPos ) ) <span class="keywordflow">return</span> 1; | ||
119 | <a name="l00034"></a>00034 <span class="keywordflow">if</span> ( filename.<a class="code" href="classirr_1_1core_1_1string.html#adf74d5a6ce1a2ed79b4b06d51e899602" title="Compares the strings ignoring case.">equals_substring_ignore_case</a> ( ext1, extPos ) ) <span class="keywordflow">return</span> 2; | ||
120 | <a name="l00035"></a>00035 <span class="keywordflow">if</span> ( filename.<a class="code" href="classirr_1_1core_1_1string.html#adf74d5a6ce1a2ed79b4b06d51e899602" title="Compares the strings ignoring case.">equals_substring_ignore_case</a> ( ext2, extPos ) ) <span class="keywordflow">return</span> 3; | ||
121 | <a name="l00036"></a>00036 <span class="keywordflow">return</span> 0; | ||
122 | <a name="l00037"></a>00037 } | ||
123 | <a name="l00038"></a>00038 | ||
124 | <a name="l00040"></a><a class="code" href="namespaceirr_1_1core.html#a7a0c7be24d78c02b334c3ae5a18005a1">00040</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="namespaceirr_1_1core.html#a7a0c7be24d78c02b334c3ae5a18005a1" title="search if a filename has a proper extension">hasFileExtension</a> ( <span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1string.html">io::path</a>& filename, | ||
125 | <a name="l00041"></a>00041 <span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1string.html">io::path</a>& ext0, | ||
126 | <a name="l00042"></a>00042 <span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1string.html">io::path</a>& ext1 = <span class="stringliteral">""</span>, | ||
127 | <a name="l00043"></a>00043 <span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1string.html">io::path</a>& ext2 = <span class="stringliteral">""</span>) | ||
128 | <a name="l00044"></a>00044 { | ||
129 | <a name="l00045"></a>00045 <span class="keywordflow">return</span> <a class="code" href="namespaceirr_1_1core.html#ab214253f8925de2ed42a7d671d02cf7f" title="search if a filename has a proper extension">isFileExtension</a> ( filename, ext0, ext1, ext2 ) > 0; | ||
130 | <a name="l00046"></a>00046 } | ||
131 | <a name="l00047"></a>00047 | ||
132 | <a name="l00049"></a><a class="code" href="namespaceirr_1_1core.html#a188da2e914c6d4a6535bee08565d877b">00049</a> <span class="keyword">inline</span> <a class="code" href="classirr_1_1core_1_1string.html">io::path</a>& <a class="code" href="namespaceirr_1_1core.html#a188da2e914c6d4a6535bee08565d877b" title="cut the filename extension from a source file path and store it in a dest file path">cutFilenameExtension</a> ( <a class="code" href="classirr_1_1core_1_1string.html">io::path</a> &dest, <span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1string.html">io::path</a> &source ) | ||
133 | <a name="l00050"></a>00050 { | ||
134 | <a name="l00051"></a>00051 <a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> endPos = source.<a class="code" href="classirr_1_1core_1_1string.html#a000258d8ce7a49ba10d20bfb8d9d3ad8" title="finds last occurrence of character in string">findLast</a> ( <span class="charliteral">'.'</span> ); | ||
135 | <a name="l00052"></a>00052 dest = source.<a class="code" href="classirr_1_1core_1_1string.html#ad3d16f4aa3c4295f46d86b7bc525450f" title="Returns a substring.">subString</a> ( 0, endPos < 0 ? source.<a class="code" href="classirr_1_1core_1_1string.html#a062f23675d892012c7e8d5d4e92ecd00" title="Returns length of the string's content.">size</a> () : endPos ); | ||
136 | <a name="l00053"></a>00053 <span class="keywordflow">return</span> dest; | ||
137 | <a name="l00054"></a>00054 } | ||
138 | <a name="l00055"></a>00055 | ||
139 | <a name="l00057"></a><a class="code" href="namespaceirr_1_1core.html#abebbe8b229dc865ebeb9bb0fd367d6ea">00057</a> <span class="keyword">inline</span> <a class="code" href="classirr_1_1core_1_1string.html">io::path</a>& <a class="code" href="namespaceirr_1_1core.html#abebbe8b229dc865ebeb9bb0fd367d6ea" title="get the filename extension from a file path">getFileNameExtension</a> ( <a class="code" href="classirr_1_1core_1_1string.html">io::path</a> &dest, <span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1string.html">io::path</a> &source ) | ||
140 | <a name="l00058"></a>00058 { | ||
141 | <a name="l00059"></a>00059 <a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> endPos = source.<a class="code" href="classirr_1_1core_1_1string.html#a000258d8ce7a49ba10d20bfb8d9d3ad8" title="finds last occurrence of character in string">findLast</a> ( <span class="charliteral">'.'</span> ); | ||
142 | <a name="l00060"></a>00060 <span class="keywordflow">if</span> ( endPos < 0 ) | ||
143 | <a name="l00061"></a>00061 dest = <span class="stringliteral">""</span>; | ||
144 | <a name="l00062"></a>00062 <span class="keywordflow">else</span> | ||
145 | <a name="l00063"></a>00063 dest = source.<a class="code" href="classirr_1_1core_1_1string.html#ad3d16f4aa3c4295f46d86b7bc525450f" title="Returns a substring.">subString</a> ( endPos, source.<a class="code" href="classirr_1_1core_1_1string.html#a062f23675d892012c7e8d5d4e92ecd00" title="Returns length of the string's content.">size</a> () ); | ||
146 | <a name="l00064"></a>00064 <span class="keywordflow">return</span> dest; | ||
147 | <a name="l00065"></a>00065 } | ||
148 | <a name="l00066"></a>00066 | ||
149 | <a name="l00068"></a><a class="code" href="namespaceirr_1_1core.html#a905c95bab4a7e8d5360a19b0726383a9">00068</a> <span class="keyword">inline</span> <a class="code" href="classirr_1_1core_1_1string.html">io::path</a>& <a class="code" href="namespaceirr_1_1core.html#a905c95bab4a7e8d5360a19b0726383a9" title="delete path from filename">deletePathFromFilename</a>(<a class="code" href="classirr_1_1core_1_1string.html">io::path</a>& filename) | ||
150 | <a name="l00069"></a>00069 { | ||
151 | <a name="l00070"></a>00070 <span class="comment">// delete path from filename</span> | ||
152 | <a name="l00071"></a>00071 <span class="keyword">const</span> <a class="code" href="namespaceirr.html#a813cca9bac9fa0c1427d89720a451460" title="Type name for character type used by the file system.">fschar_t</a>* s = filename.<a class="code" href="classirr_1_1core_1_1string.html#a4abad222c478c108096ee9297870068c" title="Returns character string.">c_str</a>(); | ||
153 | <a name="l00072"></a>00072 <span class="keyword">const</span> <a class="code" href="namespaceirr.html#a813cca9bac9fa0c1427d89720a451460" title="Type name for character type used by the file system.">fschar_t</a>* p = s + filename.<a class="code" href="classirr_1_1core_1_1string.html#a062f23675d892012c7e8d5d4e92ecd00" title="Returns length of the string's content.">size</a>(); | ||
154 | <a name="l00073"></a>00073 | ||
155 | <a name="l00074"></a>00074 <span class="comment">// search for path separator or beginning</span> | ||
156 | <a name="l00075"></a>00075 <span class="keywordflow">while</span> ( *p != <span class="charliteral">'/'</span> && *p != <span class="charliteral">'\\'</span> && p != s ) | ||
157 | <a name="l00076"></a>00076 p--; | ||
158 | <a name="l00077"></a>00077 | ||
159 | <a name="l00078"></a>00078 <span class="keywordflow">if</span> ( p != s ) | ||
160 | <a name="l00079"></a>00079 { | ||
161 | <a name="l00080"></a>00080 ++p; | ||
162 | <a name="l00081"></a>00081 filename = p; | ||
163 | <a name="l00082"></a>00082 } | ||
164 | <a name="l00083"></a>00083 <span class="keywordflow">return</span> filename; | ||
165 | <a name="l00084"></a>00084 } | ||
166 | <a name="l00085"></a>00085 | ||
167 | <a name="l00087"></a><a class="code" href="namespaceirr_1_1core.html#a9215d20e34c12cb6c1522366389bfcce">00087</a> <span class="keyword">inline</span> <a class="code" href="classirr_1_1core_1_1string.html">io::path</a>& <a class="code" href="namespaceirr_1_1core.html#a9215d20e34c12cb6c1522366389bfcce" title="trim paths">deletePathFromPath</a>(<a class="code" href="classirr_1_1core_1_1string.html">io::path</a>& filename, <a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> pathCount) | ||
168 | <a name="l00088"></a>00088 { | ||
169 | <a name="l00089"></a>00089 <span class="comment">// delete path from filename</span> | ||
170 | <a name="l00090"></a>00090 <a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> i = filename.<a class="code" href="classirr_1_1core_1_1string.html#a062f23675d892012c7e8d5d4e92ecd00" title="Returns length of the string's content.">size</a>(); | ||
171 | <a name="l00091"></a>00091 | ||
172 | <a name="l00092"></a>00092 <span class="comment">// search for path separator or beginning</span> | ||
173 | <a name="l00093"></a>00093 <span class="keywordflow">while</span> ( i>=0 ) | ||
174 | <a name="l00094"></a>00094 { | ||
175 | <a name="l00095"></a>00095 <span class="keywordflow">if</span> ( filename[i] == <span class="charliteral">'/'</span> || filename[i] == <span class="charliteral">'\\'</span> ) | ||
176 | <a name="l00096"></a>00096 { | ||
177 | <a name="l00097"></a>00097 <span class="keywordflow">if</span> ( --pathCount <= 0 ) | ||
178 | <a name="l00098"></a>00098 <span class="keywordflow">break</span>; | ||
179 | <a name="l00099"></a>00099 } | ||
180 | <a name="l00100"></a>00100 --i; | ||
181 | <a name="l00101"></a>00101 } | ||
182 | <a name="l00102"></a>00102 | ||
183 | <a name="l00103"></a>00103 <span class="keywordflow">if</span> ( i>0 ) | ||
184 | <a name="l00104"></a>00104 { | ||
185 | <a name="l00105"></a>00105 filename [ i + 1 ] = 0; | ||
186 | <a name="l00106"></a>00106 filename.<a class="code" href="classirr_1_1core_1_1string.html#acf96202ede3fc24bc21d9d0167627224" title="verify the existing string.">validate</a>(); | ||
187 | <a name="l00107"></a>00107 } | ||
188 | <a name="l00108"></a>00108 <span class="keywordflow">else</span> | ||
189 | <a name="l00109"></a>00109 filename=<span class="stringliteral">""</span>; | ||
190 | <a name="l00110"></a>00110 <span class="keywordflow">return</span> filename; | ||
191 | <a name="l00111"></a>00111 } | ||
192 | <a name="l00112"></a>00112 | ||
193 | <a name="l00115"></a><a class="code" href="namespaceirr_1_1core.html#afc9926e02ab9727cd5998ab2ffa9fa32">00115</a> <span class="keyword">inline</span> <a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> <a class="code" href="namespaceirr_1_1core.html#afc9926e02ab9727cd5998ab2ffa9fa32">isInSameDirectory</a> ( <span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1string.html">io::path</a>& <a class="code" href="namespaceirr_1_1io.html#ab1bdc45edb3f94d8319c02bc0f840ee1" title="Type used for all file system related strings.">path</a>, <span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1string.html">io::path</a>& file ) | ||
194 | <a name="l00116"></a>00116 { | ||
195 | <a name="l00117"></a>00117 <a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> subA = 0; | ||
196 | <a name="l00118"></a>00118 <a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> subB = 0; | ||
197 | <a name="l00119"></a>00119 <a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> pos; | ||
198 | <a name="l00120"></a>00120 | ||
199 | <a name="l00121"></a>00121 <span class="keywordflow">if</span> ( path.<a class="code" href="classirr_1_1core_1_1string.html#a062f23675d892012c7e8d5d4e92ecd00" title="Returns length of the string's content.">size</a>() && !path.<a class="code" href="classirr_1_1core_1_1string.html#a37c19857c3d44a88ae5a98e5be41b74f" title="compares the first n characters of the strings">equalsn</a> ( file, path.<a class="code" href="classirr_1_1core_1_1string.html#a062f23675d892012c7e8d5d4e92ecd00" title="Returns length of the string's content.">size</a>() ) ) | ||
200 | <a name="l00122"></a>00122 <span class="keywordflow">return</span> -1; | ||
201 | <a name="l00123"></a>00123 | ||
202 | <a name="l00124"></a>00124 pos = 0; | ||
203 | <a name="l00125"></a>00125 <span class="keywordflow">while</span> ( (pos = path.<a class="code" href="classirr_1_1core_1_1string.html#a6d82f74b061b248f01133f34b94841d9" title="finds next occurrence of character in string">findNext</a> ( <span class="charliteral">'/'</span>, pos )) >= 0 ) | ||
204 | <a name="l00126"></a>00126 { | ||
205 | <a name="l00127"></a>00127 subA += 1; | ||
206 | <a name="l00128"></a>00128 pos += 1; | ||
207 | <a name="l00129"></a>00129 } | ||
208 | <a name="l00130"></a>00130 | ||
209 | <a name="l00131"></a>00131 pos = 0; | ||
210 | <a name="l00132"></a>00132 <span class="keywordflow">while</span> ( (pos = file.<a class="code" href="classirr_1_1core_1_1string.html#a6d82f74b061b248f01133f34b94841d9" title="finds next occurrence of character in string">findNext</a> ( <span class="charliteral">'/'</span>, pos )) >= 0 ) | ||
211 | <a name="l00133"></a>00133 { | ||
212 | <a name="l00134"></a>00134 subB += 1; | ||
213 | <a name="l00135"></a>00135 pos += 1; | ||
214 | <a name="l00136"></a>00136 } | ||
215 | <a name="l00137"></a>00137 | ||
216 | <a name="l00138"></a>00138 <span class="keywordflow">return</span> subB - subA; | ||
217 | <a name="l00139"></a>00139 } | ||
218 | <a name="l00140"></a>00140 | ||
219 | <a name="l00141"></a>00141 <span class="comment">// splits a path into components</span> | ||
220 | <a name="l00142"></a>00142 <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> splitFilename(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1string.html">io::path</a> &name, <a class="code" href="classirr_1_1core_1_1string.html">io::path</a>* <a class="code" href="namespaceirr_1_1io.html#ab1bdc45edb3f94d8319c02bc0f840ee1" title="Type used for all file system related strings.">path</a>=0, | ||
221 | <a name="l00143"></a>00143 <a class="code" href="classirr_1_1core_1_1string.html">io::path</a>* filename=0, <a class="code" href="classirr_1_1core_1_1string.html">io::path</a>* extension=0, <span class="keywordtype">bool</span> make_lower=<span class="keyword">false</span>) | ||
222 | <a name="l00144"></a>00144 { | ||
223 | <a name="l00145"></a>00145 <a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> i = name.<a class="code" href="classirr_1_1core_1_1string.html#a062f23675d892012c7e8d5d4e92ecd00" title="Returns length of the string's content.">size</a>(); | ||
224 | <a name="l00146"></a>00146 <a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> extpos = i; | ||
225 | <a name="l00147"></a>00147 | ||
226 | <a name="l00148"></a>00148 <span class="comment">// search for path separator or beginning</span> | ||
227 | <a name="l00149"></a>00149 <span class="keywordflow">while</span> ( i >= 0 ) | ||
228 | <a name="l00150"></a>00150 { | ||
229 | <a name="l00151"></a>00151 <span class="keywordflow">if</span> ( name[i] == <span class="charliteral">'.'</span> ) | ||
230 | <a name="l00152"></a>00152 { | ||
231 | <a name="l00153"></a>00153 extpos = i; | ||
232 | <a name="l00154"></a>00154 <span class="keywordflow">if</span> ( extension ) | ||
233 | <a name="l00155"></a>00155 *extension = name.<a class="code" href="classirr_1_1core_1_1string.html#ad3d16f4aa3c4295f46d86b7bc525450f" title="Returns a substring.">subString</a> ( extpos + 1, name.<a class="code" href="classirr_1_1core_1_1string.html#a062f23675d892012c7e8d5d4e92ecd00" title="Returns length of the string's content.">size</a>() - (extpos + 1), make_lower ); | ||
234 | <a name="l00156"></a>00156 } | ||
235 | <a name="l00157"></a>00157 <span class="keywordflow">else</span> | ||
236 | <a name="l00158"></a>00158 <span class="keywordflow">if</span> ( name[i] == <span class="charliteral">'/'</span> || name[i] == <span class="charliteral">'\\'</span> ) | ||
237 | <a name="l00159"></a>00159 { | ||
238 | <a name="l00160"></a>00160 <span class="keywordflow">if</span> ( filename ) | ||
239 | <a name="l00161"></a>00161 *filename = name.<a class="code" href="classirr_1_1core_1_1string.html#ad3d16f4aa3c4295f46d86b7bc525450f" title="Returns a substring.">subString</a> ( i + 1, extpos - (i + 1), make_lower ); | ||
240 | <a name="l00162"></a>00162 <span class="keywordflow">if</span> ( <a class="code" href="namespaceirr_1_1io.html#ab1bdc45edb3f94d8319c02bc0f840ee1" title="Type used for all file system related strings.">path</a> ) | ||
241 | <a name="l00163"></a>00163 { | ||
242 | <a name="l00164"></a>00164 *<a class="code" href="namespaceirr_1_1io.html#ab1bdc45edb3f94d8319c02bc0f840ee1" title="Type used for all file system related strings.">path</a> = name.<a class="code" href="classirr_1_1core_1_1string.html#ad3d16f4aa3c4295f46d86b7bc525450f" title="Returns a substring.">subString</a> ( 0, i + 1, make_lower ); | ||
243 | <a name="l00165"></a>00165 <a class="code" href="namespaceirr_1_1io.html#ab1bdc45edb3f94d8319c02bc0f840ee1" title="Type used for all file system related strings.">path</a>->replace ( <span class="charliteral">'\\'</span>, <span class="charliteral">'/'</span> ); | ||
244 | <a name="l00166"></a>00166 } | ||
245 | <a name="l00167"></a>00167 <span class="keywordflow">return</span>; | ||
246 | <a name="l00168"></a>00168 } | ||
247 | <a name="l00169"></a>00169 i -= 1; | ||
248 | <a name="l00170"></a>00170 } | ||
249 | <a name="l00171"></a>00171 <span class="keywordflow">if</span> ( filename ) | ||
250 | <a name="l00172"></a>00172 *filename = name.<a class="code" href="classirr_1_1core_1_1string.html#ad3d16f4aa3c4295f46d86b7bc525450f" title="Returns a substring.">subString</a> ( 0, extpos, make_lower ); | ||
251 | <a name="l00173"></a>00173 } | ||
252 | <a name="l00174"></a>00174 | ||
253 | <a name="l00175"></a>00175 | ||
254 | <a name="l00177"></a>00177 <span class="preprocessor">#undef isdigit</span> | ||
255 | <a name="l00178"></a>00178 <span class="preprocessor"></span><span class="preprocessor">#undef isspace</span> | ||
256 | <a name="l00179"></a>00179 <span class="preprocessor"></span><span class="preprocessor">#undef isupper</span> | ||
257 | <a name="l00180"></a><a class="code" href="namespaceirr_1_1core.html#ac7f1fc1c7eb3f8291b8a044214823070">00180</a> <span class="preprocessor"></span><span class="keyword">inline</span> <a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> <a class="code" href="namespaceirr_1_1core.html#ac7f1fc1c7eb3f8291b8a044214823070" title="some standard function ( to remove dependencies )">isdigit</a>(<a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> c) { <span class="keywordflow">return</span> c >= <span class="charliteral">'0'</span> && c <= <span class="charliteral">'9'</span>; } | ||
258 | <a name="l00181"></a><a class="code" href="namespaceirr_1_1core.html#aca7b6fe1985b526a8519885bbbd670bb">00181</a> <span class="keyword">inline</span> <a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> <a class="code" href="namespaceirr_1_1core.html#aca7b6fe1985b526a8519885bbbd670bb">isspace</a>(<a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> c) { <span class="keywordflow">return</span> c == <span class="charliteral">' '</span> || c == <span class="charliteral">'\f'</span> || c == <span class="charliteral">'\n'</span> || c == <span class="charliteral">'\r'</span> || c == <span class="charliteral">'\t'</span> || c == <span class="charliteral">'\v'</span>; } | ||
259 | <a name="l00182"></a><a class="code" href="namespaceirr_1_1core.html#a5d1328379d825a783e8ac832480701b7">00182</a> <span class="keyword">inline</span> <a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> <a class="code" href="namespaceirr_1_1core.html#a5d1328379d825a783e8ac832480701b7">isupper</a>(<a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> c) { <span class="keywordflow">return</span> c >= <span class="charliteral">'A'</span> && c <= <span class="charliteral">'Z'</span>; } | ||
260 | <a name="l00183"></a>00183 | ||
261 | <a name="l00184"></a>00184 | ||
262 | <a name="l00185"></a>00185 } <span class="comment">// end namespace core</span> | ||
263 | <a name="l00186"></a>00186 } <span class="comment">// end namespace irr</span> | ||
264 | <a name="l00187"></a>00187 | ||
265 | <a name="l00188"></a>00188 <span class="preprocessor">#endif</span> | ||
266 | </pre></div></div> | ||
267 | </div> | ||
268 | <div id="nav-path" class="navpath"> | ||
269 | <ul> | ||
270 | <li class="navelem"><a class="el" href="coreutil_8h.html">coreutil.h</a> </li> | ||
271 | <!-- window showing the filter options --> | ||
272 | <div id="MSearchSelectWindow" | ||
273 | onmouseover="return searchBox.OnSearchSelectShow()" | ||
274 | onmouseout="return searchBox.OnSearchSelectHide()" | ||
275 | onkeydown="return searchBox.OnSearchSelectKey(event)"> | ||
276 | <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark"> </span>Defines</a></div> | ||
277 | |||
278 | <!-- iframe showing the search results (closed by default) --> | ||
279 | <div id="MSearchResultsWindow"> | ||
280 | <iframe src="javascript:void(0)" frameborder="0" | ||
281 | name="MSearchResults" id="MSearchResults"> | ||
282 | </iframe> | ||
283 | </div> | ||
284 | |||
285 | |||
286 | <li class="footer"> | ||
287 | <a href="http://irrlicht.sourceforge.net" target="_blank">Irrlicht | ||
288 | Engine</a> Documentation © 2003-2012 by Nikolaus Gebhardt. Generated on Tue Nov 6 2012 11:05:59 for Irrlicht 3D Engine by | ||
289 | <a href="http://www.doxygen.org/index.html" target="_blank">Doxygen</a> 1.7.5.1 </li> | ||
290 | </ul> | ||
291 | </div> | ||
292 | |||
293 | |||
294 | </body> | ||
295 | </html> | ||