File: tokenzr_8h.html

package info (click to toggle)
wxpython3.0 3.0.2.0%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 482,760 kB
  • ctags: 518,293
  • sloc: cpp: 2,127,226; python: 294,045; makefile: 51,942; ansic: 19,033; sh: 3,013; xml: 1,629; perl: 17
file content (167 lines) | stat: -rw-r--r-- 14,375 bytes parent folder | download | duplicates (2)
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>wxWidgets: interface/wx/tokenzr.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra_stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="page_container">
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0" style="width: 100%;">
 <tbody>
 <tr>
  <td id="projectlogo">
    <a href="http://www.wxwidgets.org/" target="_new">
      <img alt="wxWidgets" src="logo.png"/>
    </a>
  </td>
  <td style="padding-left: 0.5em; text-align: right;">
   <span id="projectnumber">Version: 3.0.2</span>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- Generated by Doxygen 1.8.2 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Categories</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_60feedc7276cc318b43f4d4f48ac8f8e.html">interface</a></li><li class="navelem"><a class="el" href="dir_4fb5f442218c03949e30a92e7978b03f.html">wx</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">tokenzr.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_string_tokenizer.html">wxStringTokenizer</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classwx_string_tokenizer.html" title="wxStringTokenizer helps you to break a string up into a number of tokens.">wxStringTokenizer</a> helps you to break a string up into a number of tokens.  <a href="classwx_string_tokenizer.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a58f42335052e241a3ee01fd735263922"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="tokenzr_8h.html#a58f42335052e241a3ee01fd735263922">wxDEFAULT_DELIMITERS</a>&#160;&#160;&#160;&quot; \t\r\n&quot;</td></tr>
<tr class="memdesc:a58f42335052e241a3ee01fd735263922"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default <a class="el" href="classwx_string_tokenizer.html" title="wxStringTokenizer helps you to break a string up into a number of tokens.">wxStringTokenizer</a> delimiters are the usual white space characters.  <a href="#a58f42335052e241a3ee01fd735263922"></a><br/></td></tr>
<tr class="separator:a58f42335052e241a3ee01fd735263922"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:a8203239377764e04822e52b33ee02f9f"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="tokenzr_8h.html#a8203239377764e04822e52b33ee02f9f">wxStringTokenizerMode</a> { <br/>
&#160;&#160;<a class="el" href="tokenzr_8h.html#a8203239377764e04822e52b33ee02f9fa027f579bcc5f288b25051ab7c757ee56">wxTOKEN_INVALID</a> = -1, 
<br/>
&#160;&#160;<a class="el" href="tokenzr_8h.html#a8203239377764e04822e52b33ee02f9fa47d7692cd4311164d35b0b7a0770f533">wxTOKEN_DEFAULT</a>, 
<br/>
&#160;&#160;<a class="el" href="tokenzr_8h.html#a8203239377764e04822e52b33ee02f9faf9283e590f6ec5032a79706a187848b8">wxTOKEN_RET_EMPTY</a>, 
<br/>
&#160;&#160;<a class="el" href="tokenzr_8h.html#a8203239377764e04822e52b33ee02f9faa4d5162c3be9163135a2a79bbe6ecacd">wxTOKEN_RET_EMPTY_ALL</a>, 
<br/>
&#160;&#160;<a class="el" href="tokenzr_8h.html#a8203239377764e04822e52b33ee02f9fa5f21a6611d4493e4a8a423ceb85149f8">wxTOKEN_RET_DELIMS</a>, 
<br/>
&#160;&#160;<a class="el" href="tokenzr_8h.html#a8203239377764e04822e52b33ee02f9fad20aabe40436cd31d97454c89e8bb91a">wxTOKEN_STRTOK</a>
<br/>
 }</td></tr>
<tr class="memdesc:a8203239377764e04822e52b33ee02f9f"><td class="mdescLeft">&#160;</td><td class="mdescRight">The behaviour of <a class="el" href="classwx_string_tokenizer.html" title="wxStringTokenizer helps you to break a string up into a number of tokens.">wxStringTokenizer</a> is governed by the <a class="el" href="classwx_string_tokenizer.html#a59aa6a8673730d97a235c9a77ee93866" title="Default constructor.">wxStringTokenizer::wxStringTokenizer()</a> or <a class="el" href="classwx_string_tokenizer.html#acac18438a15dbe799d659f13a10187e9" title="Initializes the tokenizer.">wxStringTokenizer::SetString()</a> with the parameter <em>mode</em>, which may be one of the following:  <a href="tokenzr_8h.html#a8203239377764e04822e52b33ee02f9f">More...</a><br/></td></tr>
<tr class="separator:a8203239377764e04822e52b33ee02f9f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga2c25293c0f273b78001e02313ca20d96"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classwx_array_string.html">wxArrayString</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__string.html#ga2c25293c0f273b78001e02313ca20d96">wxStringTokenize</a> (const <a class="el" href="classwx_string.html">wxString</a> &amp;str, const <a class="el" href="classwx_string.html">wxString</a> &amp;delims=<a class="el" href="tokenzr_8h.html#a58f42335052e241a3ee01fd735263922">wxDEFAULT_DELIMITERS</a>, <a class="el" href="tokenzr_8h.html#a8203239377764e04822e52b33ee02f9f">wxStringTokenizerMode</a> mode=<a class="el" href="tokenzr_8h.html#a8203239377764e04822e52b33ee02f9fa47d7692cd4311164d35b0b7a0770f533">wxTOKEN_DEFAULT</a>)</td></tr>
<tr class="memdesc:ga2c25293c0f273b78001e02313ca20d96"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is a convenience function wrapping <a class="el" href="classwx_string_tokenizer.html" title="wxStringTokenizer helps you to break a string up into a number of tokens.">wxStringTokenizer</a> which simply returns all tokens found in the given <em>str</em> as an array.  <a href="group__group__funcmacro__string.html#ga2c25293c0f273b78001e02313ca20d96"></a><br/></td></tr>
<tr class="separator:ga2c25293c0f273b78001e02313ca20d96"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="a58f42335052e241a3ee01fd735263922"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define wxDEFAULT_DELIMITERS&#160;&#160;&#160;&quot; \t\r\n&quot;</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Default <a class="el" href="classwx_string_tokenizer.html" title="wxStringTokenizer helps you to break a string up into a number of tokens.">wxStringTokenizer</a> delimiters are the usual white space characters. </p>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a class="anchor" id="a8203239377764e04822e52b33ee02f9f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="tokenzr_8h.html#a8203239377764e04822e52b33ee02f9f">wxStringTokenizerMode</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The behaviour of <a class="el" href="classwx_string_tokenizer.html" title="wxStringTokenizer helps you to break a string up into a number of tokens.">wxStringTokenizer</a> is governed by the <a class="el" href="classwx_string_tokenizer.html#a59aa6a8673730d97a235c9a77ee93866" title="Default constructor.">wxStringTokenizer::wxStringTokenizer()</a> or <a class="el" href="classwx_string_tokenizer.html#acac18438a15dbe799d659f13a10187e9" title="Initializes the tokenizer.">wxStringTokenizer::SetString()</a> with the parameter <em>mode</em>, which may be one of the following: </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="a8203239377764e04822e52b33ee02f9fa027f579bcc5f288b25051ab7c757ee56"></a>wxTOKEN_INVALID</em>&nbsp;</td><td>
<p>Invalid tokenizer mode. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a8203239377764e04822e52b33ee02f9fa47d7692cd4311164d35b0b7a0770f533"></a>wxTOKEN_DEFAULT</em>&nbsp;</td><td>
<p>Default behaviour: <a class="el" href="classwx_string_tokenizer.html" title="wxStringTokenizer helps you to break a string up into a number of tokens.">wxStringTokenizer</a> will behave in the same way as <code>strtok()</code> (<a class="el" href="tokenzr_8h.html#a8203239377764e04822e52b33ee02f9fad20aabe40436cd31d97454c89e8bb91a" title="In this mode the class behaves exactly like the standard strtok() function: the empty tokens are neve...">wxTOKEN_STRTOK</a>) if the delimiters string only contains white space characters but, unlike the standard function, it will behave like <a class="el" href="tokenzr_8h.html#a8203239377764e04822e52b33ee02f9faf9283e590f6ec5032a79706a187848b8" title="In this mode, the empty tokens in the middle of the string will be returned, i.e.">wxTOKEN_RET_EMPTY</a>, returning empty tokens if this is not the case. </p>
<p>This is helpful for parsing strictly formatted data where the number of fields is fixed but some of them may be empty (i.e. <code>TAB</code> or comma delimited text files). </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a8203239377764e04822e52b33ee02f9faf9283e590f6ec5032a79706a187848b8"></a>wxTOKEN_RET_EMPTY</em>&nbsp;</td><td>
<p>In this mode, the empty tokens in the middle of the string will be returned, i.e. </p>
<p><code>"a::b:"</code> will be tokenized in three tokens <code>'a'</code>, <code>''</code> and <code>'b'</code>. Notice that all trailing delimiters are ignored in this mode, not just the last one, i.e. a string <code>"a::b::"</code> would still result in the same set of tokens. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a8203239377764e04822e52b33ee02f9faa4d5162c3be9163135a2a79bbe6ecacd"></a>wxTOKEN_RET_EMPTY_ALL</em>&nbsp;</td><td>
<p>In this mode, empty trailing tokens (including the one after the last delimiter character) will be returned as well. </p>
<p>The string <code>"a::b:"</code> will be tokenized in four tokens: the already mentioned ones and another empty one as the last one and a string <code>"a::b::"</code> will have five tokens. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a8203239377764e04822e52b33ee02f9fa5f21a6611d4493e4a8a423ceb85149f8"></a>wxTOKEN_RET_DELIMS</em>&nbsp;</td><td>
<p>In this mode, the delimiter character after the end of the current token (there may be none if this is the last token) is returned appended to the token. </p>
<p>Otherwise, it is the same mode as <a class="el" href="tokenzr_8h.html#a8203239377764e04822e52b33ee02f9faf9283e590f6ec5032a79706a187848b8" title="In this mode, the empty tokens in the middle of the string will be returned, i.e.">wxTOKEN_RET_EMPTY</a>. Notice that there is no mode like this one but behaving like <a class="el" href="tokenzr_8h.html#a8203239377764e04822e52b33ee02f9faa4d5162c3be9163135a2a79bbe6ecacd" title="In this mode, empty trailing tokens (including the one after the last delimiter character) will be re...">wxTOKEN_RET_EMPTY_ALL</a> instead of <a class="el" href="tokenzr_8h.html#a8203239377764e04822e52b33ee02f9faf9283e590f6ec5032a79706a187848b8" title="In this mode, the empty tokens in the middle of the string will be returned, i.e.">wxTOKEN_RET_EMPTY</a>, use <a class="el" href="tokenzr_8h.html#a8203239377764e04822e52b33ee02f9faa4d5162c3be9163135a2a79bbe6ecacd" title="In this mode, empty trailing tokens (including the one after the last delimiter character) will be re...">wxTOKEN_RET_EMPTY_ALL</a> and <a class="el" href="classwx_string_tokenizer.html#ab58df9e376b49be51cead0a05524888c" title="Returns the delimiter which ended scan for the last token returned by GetNextToken() or NUL if there ...">wxStringTokenizer::GetLastDelimiter()</a> to emulate it. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a8203239377764e04822e52b33ee02f9fad20aabe40436cd31d97454c89e8bb91a"></a>wxTOKEN_STRTOK</em>&nbsp;</td><td>
<p>In this mode the class behaves exactly like the standard <code>strtok()</code> function: the empty tokens are never returned. </p>
</td></tr>
</table>
</dd>
</dl>

</div>
</div>
</div><!-- contents -->

<address class="footer">
	<small>
		Generated on Thu Nov 27 2014 13:46:42 for wxWidgets by <a href="http://www.doxygen.org/index.html" target="_new">Doxygen</a> 1.8.2
	</small>
</address>
<script src="wxwidgets.js" type="text/javascript"></script>
</div><!-- #page_container -->
</body>
</html>