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 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Struct template cpp_regex_traits</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../../xpressive/reference.html#header.boost.xpressive.traits.cpp_regex_traits_hpp" title="Header <boost/xpressive/traits/cpp_regex_traits.hpp>">
<link rel="prev" href="has_fold_case_c_regex_t_id1494132.html" title="Struct has_fold_case<c_regex_traits< char >>">
<link rel="next" href="has_fold_case_cpp_regex_id1494912.html" title="Struct has_fold_case<cpp_regex_traits< char >>">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
<td align="center"><a href="../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="has_fold_case_c_regex_t_id1494132.html"><img src="../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../xpressive/reference.html#header.boost.xpressive.traits.cpp_regex_traits_hpp"><img src="../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="has_fold_case_cpp_regex_id1494912.html"><img src="../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="refentry" title="Struct template cpp_regex_traits">
<a name="boost.xpressive.cpp_regex_traits"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Struct template cpp_regex_traits</span></h2>
<p>boost::xpressive::cpp_regex_traits — Encapsaulates a std::locale for use by the basic_regex<> class template. </p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="emphasis"><em>// In header: <<a class="link" href="../../xpressive/reference.html#header.boost.xpressive.traits.cpp_regex_traits_hpp" title="Header <boost/xpressive/traits/cpp_regex_traits.hpp>">boost/xpressive/traits/cpp_regex_traits.hpp</a>>
</em></span><span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> Char>
<span class="bold"><strong>struct</strong></span> <a class="link" href="cpp_regex_traits.html" title="Struct template cpp_regex_traits">cpp_regex_traits</a> {
<span class="emphasis"><em>// types</em></span>
<span class="bold"><strong>typedef</strong></span> Char <a name="boost.xpressive.cpp_regex_traits.char_type"></a>char_type;
<span class="bold"><strong>typedef</strong></span> std::basic_string< char_type > <a name="boost.xpressive.cpp_regex_traits.string_type"></a>string_type;
<span class="bold"><strong>typedef</strong></span> std::locale <a name="boost.xpressive.cpp_regex_traits.locale_type"></a>locale_type;
<span class="bold"><strong>typedef</strong></span> <span class="emphasis"><em>unspecified</em></span> <a name="boost.xpressive.cpp_regex_traits.char_class_type"></a>char_class_type;
<span class="bold"><strong>typedef</strong></span> <a class="link" href="regex_traits_version_2_tag.html" title="Struct regex_traits_version_2_tag">regex_traits_version_2_tag</a> <a name="boost.xpressive.cpp_regex_traits.version_tag"></a>version_tag;
<span class="bold"><strong>typedef</strong></span> <span class="emphasis"><em>unspecified</em></span> <a name="boost.xpressive.cpp_regex_traits.base_type"></a>base_type;
<span class="emphasis"><em>// <a class="link" href="cpp_regex_traits.html#boost.xpressive.cpp_regex_traitsconstruct-copy-destruct">construct/copy/destruct</a></em></span>
<a class="link" href="cpp_regex_traits.html#id1494789-bb">cpp_regex_traits</a>(locale_type <span class="bold"><strong>const</strong></span> & = locale_type());
<span class="emphasis"><em>// <a class="link" href="cpp_regex_traits.html#id1494208-bb">public member functions</a></em></span>
<span class="type"><span class="bold"><strong>bool</strong></span></span> <a class="link" href="cpp_regex_traits.html#id1494211-bb"><span class="bold"><strong>operator</strong></span>==</a>(<a class="link" href="cpp_regex_traits.html" title="Struct template cpp_regex_traits">cpp_regex_traits</a>< char_type > <span class="bold"><strong>const</strong></span> &) <span class="bold"><strong>const</strong></span>;
<span class="type"><span class="bold"><strong>bool</strong></span></span> <a class="link" href="cpp_regex_traits.html#id1494238-bb"><span class="bold"><strong>operator</strong></span>!=</a>(<a class="link" href="cpp_regex_traits.html" title="Struct template cpp_regex_traits">cpp_regex_traits</a>< char_type > <span class="bold"><strong>const</strong></span> &) <span class="bold"><strong>const</strong></span>;
<span class="type">char_type</span> <a class="link" href="cpp_regex_traits.html#id1494265-bb">widen</a>(<span class="bold"><strong>char</strong></span>) <span class="bold"><strong>const</strong></span>;
<span class="type">char_type</span> <a class="link" href="cpp_regex_traits.html#id1494293-bb">translate_nocase</a>(char_type) <span class="bold"><strong>const</strong></span>;
<span class="type">char_type</span> <a class="link" href="cpp_regex_traits.html#id1494321-bb">tolower</a>(char_type) <span class="bold"><strong>const</strong></span>;
<span class="type">char_type</span> <a class="link" href="cpp_regex_traits.html#id1494349-bb">toupper</a>(char_type) <span class="bold"><strong>const</strong></span>;
<span class="type">string_type</span> <a class="link" href="cpp_regex_traits.html#id1494377-bb">fold_case</a>(char_type) <span class="bold"><strong>const</strong></span>;
<span class="type"><span class="bold"><strong>bool</strong></span></span> <a class="link" href="cpp_regex_traits.html#id1494408-bb">in_range_nocase</a>(char_type, char_type, char_type) <span class="bold"><strong>const</strong></span>;
<span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> FwdIter>
<span class="type">string_type</span> <a class="link" href="cpp_regex_traits.html#id1494462-bb">transform_primary</a>(FwdIter, FwdIter) <span class="bold"><strong>const</strong></span>;
<span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> FwdIter>
<span class="type">string_type</span> <a class="link" href="cpp_regex_traits.html#id1494502-bb">lookup_collatename</a>(FwdIter, FwdIter) <span class="bold"><strong>const</strong></span>;
<span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> FwdIter>
<span class="type">char_class_type</span> <a class="link" href="cpp_regex_traits.html#id1494542-bb">lookup_classname</a>(FwdIter, FwdIter, <span class="bold"><strong>bool</strong></span>) <span class="bold"><strong>const</strong></span>;
<span class="type"><span class="bold"><strong>bool</strong></span></span> <a class="link" href="cpp_regex_traits.html#id1494600-bb">isctype</a>(char_type, char_class_type) <span class="bold"><strong>const</strong></span>;
<span class="type"><span class="bold"><strong>int</strong></span></span> <a class="link" href="cpp_regex_traits.html#id1494643-bb">value</a>(char_type, <span class="bold"><strong>int</strong></span>) <span class="bold"><strong>const</strong></span>;
<span class="type">locale_type</span> <a class="link" href="cpp_regex_traits.html#id1494688-bb">imbue</a>(locale_type) ;
<span class="type">locale_type</span> <a class="link" href="cpp_regex_traits.html#id1494714-bb">getloc</a>() <span class="bold"><strong>const</strong></span>;
<span class="bold"><strong>template</strong></span><> <span class="type"><span class="bold"><strong>unsigned</strong></span> <span class="bold"><strong>char</strong></span></span> <a class="link" href="cpp_regex_traits.html#id1494726-bb">hash</a>(<span class="bold"><strong>unsigned</strong></span> <span class="bold"><strong>char</strong></span>) ;
<span class="bold"><strong>template</strong></span><> <span class="type"><span class="bold"><strong>unsigned</strong></span> <span class="bold"><strong>char</strong></span></span> <a class="link" href="cpp_regex_traits.html#id1494742-bb">hash</a>(<span class="bold"><strong>char</strong></span>) ;
<span class="bold"><strong>template</strong></span><> <span class="type"><span class="bold"><strong>unsigned</strong></span> <span class="bold"><strong>char</strong></span></span> <a class="link" href="cpp_regex_traits.html#id1494758-bb">hash</a>(<span class="bold"><strong>signed</strong></span> <span class="bold"><strong>char</strong></span>) ;
<span class="bold"><strong>template</strong></span><> <span class="type"><span class="bold"><strong>unsigned</strong></span> <span class="bold"><strong>char</strong></span></span> <a class="link" href="cpp_regex_traits.html#id1494773-bb">hash</a>(<span class="bold"><strong>wchar_t</strong></span>) ;
<span class="emphasis"><em>// <a class="link" href="cpp_regex_traits.html#id1494804-bb">public static functions</a></em></span>
<span class="type"><span class="bold"><strong>static</strong></span> <span class="bold"><strong>unsigned</strong></span> <span class="bold"><strong>char</strong></span></span> <a class="link" href="cpp_regex_traits.html#id1494807-bb">hash</a>(char_type) ;
<span class="type"><span class="bold"><strong>static</strong></span> char_type</span> <a class="link" href="cpp_regex_traits.html#id1494835-bb">translate</a>(char_type) ;
<span class="type"><span class="bold"><strong>static</strong></span> <span class="bold"><strong>bool</strong></span></span> <a class="link" href="cpp_regex_traits.html#id1494862-bb">in_range</a>(char_type, char_type, char_type) ;
};</pre></div>
<div class="refsect1" title="Description">
<a name="id2134676"></a><h2>Description</h2>
<div class="refsect2" title="cpp_regex_traits public construct/copy/destruct">
<a name="id2134680"></a><h3>
<a name="boost.xpressive.cpp_regex_traitsconstruct-copy-destruct"></a><code class="computeroutput">cpp_regex_traits</code>
public
construct/copy/destruct</h3>
<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
<pre class="literallayout"><a name="id1494789-bb"></a>cpp_regex_traits(locale_type <span class="bold"><strong>const</strong></span> & loc = locale_type());</pre>
<p>Initialize a cpp_regex_traits object to use the specified std::locale, or the global std::locale if none is specified. </p>
</li></ol></div>
</div>
<div class="refsect2" title="cpp_regex_traits public member functions">
<a name="id2134724"></a><h3>
<a name="id1494208-bb"></a><code class="computeroutput">cpp_regex_traits</code> public member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="type"><span class="bold"><strong>bool</strong></span></span> <a name="id1494211-bb"></a><span class="bold"><strong>operator</strong></span>==(<a class="link" href="cpp_regex_traits.html" title="Struct template cpp_regex_traits">cpp_regex_traits</a>< char_type > <span class="bold"><strong>const</strong></span> & that) <span class="bold"><strong>const</strong></span>;</pre>
<p>Checks two cpp_regex_traits objects for equality</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>this->getloc() == that.getloc(). </p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="type"><span class="bold"><strong>bool</strong></span></span> <a name="id1494238-bb"></a><span class="bold"><strong>operator</strong></span>!=(<a class="link" href="cpp_regex_traits.html" title="Struct template cpp_regex_traits">cpp_regex_traits</a>< char_type > <span class="bold"><strong>const</strong></span> & that) <span class="bold"><strong>const</strong></span>;</pre>
<p>Checks two cpp_regex_traits objects for inequality</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>this->getloc() != that.getloc(). </p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="type">char_type</span> <a name="id1494265-bb"></a>widen(<span class="bold"><strong>char</strong></span> ch) <span class="bold"><strong>const</strong></span>;</pre>
<p>Convert a char to a Char</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">ch</code></span></p></td>
<td><p>The source character. </p></td>
</tr></tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>std::use_facet<std::ctype<char_type> >(this->getloc()).widen(ch). </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="type">char_type</span> <a name="id1494293-bb"></a>translate_nocase(char_type ch) <span class="bold"><strong>const</strong></span>;</pre>
<p>Converts a character to lower-case using the internally-stored std::locale.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">ch</code></span></p></td>
<td><p>The source character. </p></td>
</tr></tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>std::tolower(ch, this->getloc()). </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="type">char_type</span> <a name="id1494321-bb"></a>tolower(char_type ch) <span class="bold"><strong>const</strong></span>;</pre>
<p>Converts a character to lower-case using the internally-stored std::locale.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">ch</code></span></p></td>
<td><p>The source character. </p></td>
</tr></tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>std::tolower(ch, this->getloc()). </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="type">char_type</span> <a name="id1494349-bb"></a>toupper(char_type ch) <span class="bold"><strong>const</strong></span>;</pre>
<p>Converts a character to upper-case using the internally-stored std::locale.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">ch</code></span></p></td>
<td><p>The source character. </p></td>
</tr></tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>std::toupper(ch, this->getloc()). </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="type">string_type</span> <a name="id1494377-bb"></a>fold_case(char_type ch) <span class="bold"><strong>const</strong></span>;</pre>
<p>Returns a string_type containing all the characters that compare equal disregrarding case to the one passed in. This function can only be called if has_fold_case<cpp_regex_traits<Char> >value is true.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">ch</code></span></p></td>
<td><p>The source character. </p></td>
</tr></tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>string_type containing all chars which are equal to ch when disregarding case </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="type"><span class="bold"><strong>bool</strong></span></span> <a name="id1494408-bb"></a>in_range_nocase(char_type first, char_type last, char_type ch) <span class="bold"><strong>const</strong></span>;</pre>
<p>Checks to see if a character is within a character range, irregardless of case.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">ch</code></span></p></td>
<td><p>The source character. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">first</code></span></p></td>
<td><p>The bottom of the range, inclusive. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">last</code></span></p></td>
<td><p>The top of the range, inclusive. </p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>in_range(first, last, ch) || in_range(first, last, tolower(ch, this->getloc())) || in_range(first, last, toupper(ch, this->getloc())) </p></td>
</tr>
<tr>
<td><p><span class="term">Notes:</span></p></td>
<td><p>The default implementation doesn't do proper Unicode case folding, but this is the best we can do with the standard ctype facet. </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> FwdIter>
<span class="type">string_type</span> <a name="id1494462-bb"></a>transform_primary(FwdIter begin, FwdIter end) <span class="bold"><strong>const</strong></span>;</pre>
<p>Returns a sort key for the character sequence designated by the iterator range [F1, F2) such that if the character sequence [G1, G2) sorts before the character sequence [H1, H2) when character case is not considered then v.transform_primary(G1, G2) < v.transform_primary(H1, H2).</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Notes:</span></p></td>
<td><p>Not currently used </p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> FwdIter>
<span class="type">string_type</span> <a name="id1494502-bb"></a>lookup_collatename(FwdIter begin, FwdIter end) <span class="bold"><strong>const</strong></span>;</pre>
<p>Returns a sequence of characters that represents the collating element consisting of the character sequence designated by the iterator range [F1, F2). Returns an empty string if the character sequence is not a valid collating element.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Notes:</span></p></td>
<td><p>Not currently used </p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> FwdIter>
<span class="type">char_class_type</span>
<a name="id1494542-bb"></a>lookup_classname(FwdIter begin, FwdIter end, <span class="bold"><strong>bool</strong></span> icase) <span class="bold"><strong>const</strong></span>;</pre>
<p>For the character class name represented by the specified character sequence, return the corresponding bitmask representation.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">begin</code></span></p></td>
<td><p>A forward iterator to the start of the character sequence representing the name of the character class. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">end</code></span></p></td>
<td><p>The end of the character sequence. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">icase</code></span></p></td>
<td><p>Specifies whether the returned bitmask should represent the case-insensitive version of the character class. </p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>A bitmask representing the character class. </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="type"><span class="bold"><strong>bool</strong></span></span> <a name="id1494600-bb"></a>isctype(char_type ch, char_class_type mask) <span class="bold"><strong>const</strong></span>;</pre>
<p>Tests a character against a character class bitmask.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">ch</code></span></p></td>
<td><p>The character to test. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">mask</code></span></p></td>
<td><p>The character class bitmask against which to test. </p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p>mask is a bitmask returned by lookup_classname, or is several such masks bit-or'ed together. </p></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>true if the character is a member of any of the specified character classes, false otherwise. </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="type"><span class="bold"><strong>int</strong></span></span> <a name="id1494643-bb"></a>value(char_type ch, <span class="bold"><strong>int</strong></span> radix) <span class="bold"><strong>const</strong></span>;</pre>
<p>Convert a digit character into the integer it represents.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">ch</code></span></p></td>
<td><p>The digit character. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">radix</code></span></p></td>
<td><p>The radix to use for the conversion. </p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p>radix is one of 8, 10, or 16. </p></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>-1 if ch is not a digit character, the integer value of the character otherwise. The conversion is performed by imbueing a std::stringstream with this->getloc(); setting the radix to one of oct, hex or dec; inserting ch into the stream; and extracting an int. </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="type">locale_type</span> <a name="id1494688-bb"></a>imbue(locale_type loc) ;</pre>
<p>Imbues *this with loc</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">loc</code></span></p></td>
<td><p>A std::locale. </p></td>
</tr></tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>the previous std::locale used by *this. </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="type">locale_type</span> <a name="id1494714-bb"></a>getloc() <span class="bold"><strong>const</strong></span>;</pre>
<p>Returns the current std::locale used by *this. </p>
</li>
<li class="listitem"><pre class="literallayout"><span class="bold"><strong>template</strong></span><> <span class="type"><span class="bold"><strong>unsigned</strong></span> <span class="bold"><strong>char</strong></span></span> <a name="id1494726-bb"></a>hash(<span class="bold"><strong>unsigned</strong></span> <span class="bold"><strong>char</strong></span> ch) ;</pre></li>
<li class="listitem"><pre class="literallayout"><span class="bold"><strong>template</strong></span><> <span class="type"><span class="bold"><strong>unsigned</strong></span> <span class="bold"><strong>char</strong></span></span> <a name="id1494742-bb"></a>hash(<span class="bold"><strong>char</strong></span> ch) ;</pre></li>
<li class="listitem"><pre class="literallayout"><span class="bold"><strong>template</strong></span><> <span class="type"><span class="bold"><strong>unsigned</strong></span> <span class="bold"><strong>char</strong></span></span> <a name="id1494758-bb"></a>hash(<span class="bold"><strong>signed</strong></span> <span class="bold"><strong>char</strong></span> ch) ;</pre></li>
<li class="listitem"><pre class="literallayout"><span class="bold"><strong>template</strong></span><> <span class="type"><span class="bold"><strong>unsigned</strong></span> <span class="bold"><strong>char</strong></span></span> <a name="id1494773-bb"></a>hash(<span class="bold"><strong>wchar_t</strong></span> ch) ;</pre></li>
</ol></div>
</div>
<div class="refsect2" title="cpp_regex_traits public static functions">
<a name="id2135897"></a><h3>
<a name="id1494804-bb"></a><code class="computeroutput">cpp_regex_traits</code> public static functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="type"><span class="bold"><strong>static</strong></span> <span class="bold"><strong>unsigned</strong></span> <span class="bold"><strong>char</strong></span></span> <a name="id1494807-bb"></a>hash(char_type ch) ;</pre>
<p>Returns a hash value for a Char in the range [0, UCHAR_MAX]</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">ch</code></span></p></td>
<td><p>The source character. </p></td>
</tr></tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>a value between 0 and UCHAR_MAX, inclusive. </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="type"><span class="bold"><strong>static</strong></span> char_type</span> <a name="id1494835-bb"></a>translate(char_type ch) ;</pre>
<p>No-op</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">ch</code></span></p></td>
<td><p>The source character. </p></td>
</tr></tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>ch </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="type"><span class="bold"><strong>static</strong></span> <span class="bold"><strong>bool</strong></span></span> <a name="id1494862-bb"></a>in_range(char_type first, char_type last, char_type ch) ;</pre>
<p>Checks to see if a character is within a character range.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">ch</code></span></p></td>
<td><p>The source character. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">first</code></span></p></td>
<td><p>The bottom of the range, inclusive. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">last</code></span></p></td>
<td><p>The top of the range, inclusive. </p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>first <= ch && ch <= last. </p></td>
</tr>
</tbody>
</table></div>
</li>
</ol></div>
</div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2007 Eric Niebler<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="has_fold_case_c_regex_t_id1494132.html"><img src="../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../xpressive/reference.html#header.boost.xpressive.traits.cpp_regex_traits_hpp"><img src="../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="has_fold_case_cpp_regex_id1494912.html"><img src="../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>
|