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 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808
|
<!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: wxArrayString Class 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 Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Categories</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="classes.html"><span>Class Index</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-types">Public Types</a> |
<a href="#pub-methods">Public Member Functions</a> |
<a href="classwx_array_string-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">wxArrayString Class Reference<div class="ingroups"><a class="el" href="group__group__class__containers.html">Containers</a></div></div> </div>
</div><!--header-->
<div class="contents">
<p><code>#include <wx/arrstr.h></code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
<img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for wxArrayString:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="classwx_array_string__inherit__graph.png" border="0" usemap="#wx_array_string_inherit__map" alt="Inheritance graph"/></div>
<map name="wx_array_string_inherit__map" id="wx_array_string_inherit__map">
<area shape="rect" id="node5" href="classwx_path_list.html" title="The path list is a convenient way of storing a number of directories, and when presented with a filen..." alt="" coords="15,161,97,189"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="classwx_array_string.html" title="wxArrayString is an efficient container for storing wxString objects.">wxArrayString</a> is an efficient container for storing <a class="el" href="classwx_string.html" title="String class for passing textual data to or receiving it from wxWidgets.">wxString</a> objects. </p>
<p>It has the same features as all wxArray classes, i.e. it dynamically expands when new items are added to it (so it is as easy to use as a linked list), but the access time to the elements is constant, instead of being linear in number of elements as in the case of linked lists. It is also very size efficient and doesn't take more space than a C array <em><a class="el" href="classwx_string.html" title="String class for passing textual data to or receiving it from wxWidgets.">wxString</a></em>[] type (<a class="el" href="classwx_array_string.html" title="wxArrayString is an efficient container for storing wxString objects.">wxArrayString</a> uses its knowledge of internals of <a class="el" href="classwx_string.html" title="String class for passing textual data to or receiving it from wxWidgets.">wxString</a> class to achieve this).</p>
<p>This class is used in the same way as other dynamic arrays(), except that no <a class="el" href="dynarray_8h.html#aa9c653860ef656116ad6914e79e17340" title="This macro defines a new array class named name and containing the elements of type T...">WX_DEFINE_ARRAY</a> declaration is needed for it. When a string is added or inserted in the array, a copy of the string is created, so the original string may be safely deleted (e.g. if it was a <em>wxChar</em> * pointer the memory it was using can be freed immediately after this). In general, there is no need to worry about string memory deallocation when using this class - it will always free the memory it uses itself.</p>
<p>The references returned by <a class="el" href="classwx_array_string.html#a9d02526d49d8b9da9ea184969ca721d2" title="Return the array element at position nIndex.">wxArrayString::Item</a>, <a class="el" href="classwx_array_string.html#ae6c05b8d0a6dd18ec1f72a94827dbd03" title="Returns the last element of the array.">wxArrayString::Last</a> or <a class="el" href="classwx_array_string.html#af0a959d8f8e8031e1442bc0e977b6a4f" title="Return the array element at position nIndex.">wxArrayString::operator[]</a> are not constant, so the array elements may be modified in place like this:</p>
<div class="fragment"><div class="line">array.Last().MakeUpper();</div>
</div><!-- fragment --><dl class="section note"><dt>Note</dt><dd>none of the methods of <a class="el" href="classwx_array_string.html" title="wxArrayString is an efficient container for storing wxString objects.">wxArrayString</a> is virtual including its destructor, so this class should not be used as a base class.</dd></dl>
<p>Although this is not true strictly speaking, this class may be considered as a specialization of wxArray class for the <a class="el" href="classwx_string.html" title="String class for passing textual data to or receiving it from wxWidgets.">wxString</a> member data: it is not implemented like this, but it does have all of the wxArray functions.</p>
<p>It also has the full set of <code>std::vector<wxString></code> compatible methods, including nested <code>iterator</code> and <code>const_iterator</code> classes which should be used in the new code for forward compatibility with the future wxWidgets versions.</p>
<h2></h2>
<div><span class="lib">Library:</span>  <span class="lib_text"><a class="el" href="page_libs.html#page_libs_wxbase">wxBase</a></span></div><div><span class="category">Category:</span>  <span class="category_text"><a class="el" href="group__group__class__containers.html">Containers</a></span></div><dl class="section see"><dt>See Also</dt><dd><a class="el" href="classwx_array_3_01_t_01_4.html" title="This section describes the so called "dynamic arrays".">wxArray<T></a>, <a class="el" href="classwx_string.html" title="String class for passing textual data to or receiving it from wxWidgets.">wxString</a>, <a class="el" href="overview_string.html">wxString Overview</a> </dd></dl>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:ab3765f8d31f415ef480c3224c390eda3"><td class="memItemLeft" align="right" valign="top">typedef int(* </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_array_string.html#ab3765f8d31f415ef480c3224c390eda3">CompareFunction</a> )(const <a class="el" href="classwx_string.html">wxString</a> &first, const <a class="el" href="classwx_string.html">wxString</a> &second)</td></tr>
<tr class="memdesc:ab3765f8d31f415ef480c3224c390eda3"><td class="mdescLeft"> </td><td class="mdescRight">The function type used with <a class="el" href="classwx_array_string.html#af10a5c5c81001638f5a2b6dceaa74810" title="Sorts the array in alphabetical order or in reverse alphabetical order if reverseOrder is true...">wxArrayString::Sort</a> function. <a href="#ab3765f8d31f415ef480c3224c390eda3"></a><br/></td></tr>
<tr class="separator:ab3765f8d31f415ef480c3224c390eda3"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a35fe0f0ee8452506f1ca39d3fd48c14e"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_array_string.html#a35fe0f0ee8452506f1ca39d3fd48c14e">wxArrayString</a> ()</td></tr>
<tr class="memdesc:a35fe0f0ee8452506f1ca39d3fd48c14e"><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <a href="#a35fe0f0ee8452506f1ca39d3fd48c14e"></a><br/></td></tr>
<tr class="separator:a35fe0f0ee8452506f1ca39d3fd48c14e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a217ff3d3246ea5079bac9295ff36a237"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_array_string.html#a217ff3d3246ea5079bac9295ff36a237">wxArrayString</a> (const <a class="el" href="classwx_array_string.html">wxArrayString</a> &array)</td></tr>
<tr class="memdesc:a217ff3d3246ea5079bac9295ff36a237"><td class="mdescLeft"> </td><td class="mdescRight">Copy constructor. <a href="#a217ff3d3246ea5079bac9295ff36a237"></a><br/></td></tr>
<tr class="separator:a217ff3d3246ea5079bac9295ff36a237"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aeb9c9e5cb3550098735f54a47c3d29b4"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_array_string.html#aeb9c9e5cb3550098735f54a47c3d29b4">wxArrayString</a> (size_t sz, const <a class="el" href="classwx_string.html">wxString</a> *arr)</td></tr>
<tr class="memdesc:aeb9c9e5cb3550098735f54a47c3d29b4"><td class="mdescLeft"> </td><td class="mdescRight">Constructor from a <a class="el" href="classwx_string.html" title="String class for passing textual data to or receiving it from wxWidgets.">wxString</a> array. <a href="#aeb9c9e5cb3550098735f54a47c3d29b4"></a><br/></td></tr>
<tr class="separator:aeb9c9e5cb3550098735f54a47c3d29b4"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a62c4453faf577c0196eac0b38701d710"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_array_string.html#a62c4453faf577c0196eac0b38701d710">~wxArrayString</a> ()</td></tr>
<tr class="memdesc:a62c4453faf577c0196eac0b38701d710"><td class="mdescLeft"> </td><td class="mdescRight">Destructor frees memory occupied by the array strings. <a href="#a62c4453faf577c0196eac0b38701d710"></a><br/></td></tr>
<tr class="separator:a62c4453faf577c0196eac0b38701d710"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af06b61455118d83a24183c3a9f6854b1"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_array_string.html#af06b61455118d83a24183c3a9f6854b1">Add</a> (const <a class="el" href="classwx_string.html">wxString</a> &str, size_t copies=1)</td></tr>
<tr class="memdesc:af06b61455118d83a24183c3a9f6854b1"><td class="mdescLeft"> </td><td class="mdescRight">Appends the given number of <em>copies</em> of the new item <em>str</em> to the array and returns the index of the first new item in the array. <a href="#af06b61455118d83a24183c3a9f6854b1"></a><br/></td></tr>
<tr class="separator:af06b61455118d83a24183c3a9f6854b1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7d399eb79ba4f7ad165af03909889894"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_array_string.html#a7d399eb79ba4f7ad165af03909889894">Alloc</a> (size_t nCount)</td></tr>
<tr class="memdesc:a7d399eb79ba4f7ad165af03909889894"><td class="mdescLeft"> </td><td class="mdescRight">Preallocates enough memory to store <em>nCount</em> items. <a href="#a7d399eb79ba4f7ad165af03909889894"></a><br/></td></tr>
<tr class="separator:a7d399eb79ba4f7ad165af03909889894"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aad1c8fe1dd445b359a633cdd6c5940ce"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_array_string.html#aad1c8fe1dd445b359a633cdd6c5940ce">Clear</a> ()</td></tr>
<tr class="memdesc:aad1c8fe1dd445b359a633cdd6c5940ce"><td class="mdescLeft"> </td><td class="mdescRight">Clears the array contents and frees memory. <a href="#aad1c8fe1dd445b359a633cdd6c5940ce"></a><br/></td></tr>
<tr class="separator:aad1c8fe1dd445b359a633cdd6c5940ce"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac23ff4a9b6a0f014c2c803361eee52f5"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_array_string.html#ac23ff4a9b6a0f014c2c803361eee52f5">Empty</a> ()</td></tr>
<tr class="memdesc:ac23ff4a9b6a0f014c2c803361eee52f5"><td class="mdescLeft"> </td><td class="mdescRight">Empties the array: after a call to this function <a class="el" href="classwx_array_string.html#ad2a491f799c8d6539dc64d06f2c37ac6" title="Returns the number of items in the array.">GetCount()</a> will return 0. <a href="#ac23ff4a9b6a0f014c2c803361eee52f5"></a><br/></td></tr>
<tr class="separator:ac23ff4a9b6a0f014c2c803361eee52f5"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad2a491f799c8d6539dc64d06f2c37ac6"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_array_string.html#ad2a491f799c8d6539dc64d06f2c37ac6">GetCount</a> () const </td></tr>
<tr class="memdesc:ad2a491f799c8d6539dc64d06f2c37ac6"><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of items in the array. <a href="#ad2a491f799c8d6539dc64d06f2c37ac6"></a><br/></td></tr>
<tr class="separator:ad2a491f799c8d6539dc64d06f2c37ac6"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a87d29ec37fca50c5b289c242fbaad2f5"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_array_string.html#a87d29ec37fca50c5b289c242fbaad2f5">Index</a> (const <a class="el" href="classwx_string.html">wxString</a> &sz, bool bCase=true, bool bFromEnd=false) const </td></tr>
<tr class="memdesc:a87d29ec37fca50c5b289c242fbaad2f5"><td class="mdescLeft"> </td><td class="mdescRight">Search the element in the array, starting from the beginning if <em>bFromEnd</em> is <span class="literal">false</span> or from end otherwise. <a href="#a87d29ec37fca50c5b289c242fbaad2f5"></a><br/></td></tr>
<tr class="separator:a87d29ec37fca50c5b289c242fbaad2f5"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a9913831038ad76b0c4386cbd095b8e0d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_array_string.html#a9913831038ad76b0c4386cbd095b8e0d">Insert</a> (<a class="el" href="classwx_string.html">wxString</a> lItem, size_t nIndex, size_t copies=1)</td></tr>
<tr class="memdesc:a9913831038ad76b0c4386cbd095b8e0d"><td class="mdescLeft"> </td><td class="mdescRight">Insert the given number of <em>copies</em> of the new element in the array before the position <em>nIndex</em>. <a href="#a9913831038ad76b0c4386cbd095b8e0d"></a><br/></td></tr>
<tr class="separator:a9913831038ad76b0c4386cbd095b8e0d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1eb4f967685188b1c14407026e9ec53c"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_array_string.html#a1eb4f967685188b1c14407026e9ec53c">IsEmpty</a> () const </td></tr>
<tr class="memdesc:a1eb4f967685188b1c14407026e9ec53c"><td class="mdescLeft"> </td><td class="mdescRight">Returns <span class="literal">true</span> if the array is empty, <span class="literal">false</span> otherwise. <a href="#a1eb4f967685188b1c14407026e9ec53c"></a><br/></td></tr>
<tr class="separator:a1eb4f967685188b1c14407026e9ec53c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae24a86de01c53488e84ce3c39582fbc1"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_array_string.html#ae24a86de01c53488e84ce3c39582fbc1">Remove</a> (const <a class="el" href="classwx_string.html">wxString</a> &sz)</td></tr>
<tr class="memdesc:ae24a86de01c53488e84ce3c39582fbc1"><td class="mdescLeft"> </td><td class="mdescRight">Removes the first item matching this value. <a href="#ae24a86de01c53488e84ce3c39582fbc1"></a><br/></td></tr>
<tr class="separator:ae24a86de01c53488e84ce3c39582fbc1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1374163a35ccb75adac977acfe8add96"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_array_string.html#a1374163a35ccb75adac977acfe8add96">RemoveAt</a> (size_t nIndex, size_t count=1)</td></tr>
<tr class="memdesc:a1374163a35ccb75adac977acfe8add96"><td class="mdescLeft"> </td><td class="mdescRight">Removes <em>count</em> items starting at position <em>nIndex</em> from the array. <a href="#a1374163a35ccb75adac977acfe8add96"></a><br/></td></tr>
<tr class="separator:a1374163a35ccb75adac977acfe8add96"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a598a1eba111e3c25ef760dcdcc0c7678"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_array_string.html#a598a1eba111e3c25ef760dcdcc0c7678">Shrink</a> ()</td></tr>
<tr class="memdesc:a598a1eba111e3c25ef760dcdcc0c7678"><td class="mdescLeft"> </td><td class="mdescRight">Releases the extra memory allocated by the array. <a href="#a598a1eba111e3c25ef760dcdcc0c7678"></a><br/></td></tr>
<tr class="separator:a598a1eba111e3c25ef760dcdcc0c7678"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af10a5c5c81001638f5a2b6dceaa74810"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_array_string.html#af10a5c5c81001638f5a2b6dceaa74810">Sort</a> (bool reverseOrder=false)</td></tr>
<tr class="memdesc:af10a5c5c81001638f5a2b6dceaa74810"><td class="mdescLeft"> </td><td class="mdescRight">Sorts the array in alphabetical order or in reverse alphabetical order if <em>reverseOrder</em> is <span class="literal">true</span>. <a href="#af10a5c5c81001638f5a2b6dceaa74810"></a><br/></td></tr>
<tr class="separator:af10a5c5c81001638f5a2b6dceaa74810"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0403ae7f8702fdc5c21b700053e7af0c"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_array_string.html#a0403ae7f8702fdc5c21b700053e7af0c">Sort</a> (<a class="el" href="classwx_array_string.html#ab3765f8d31f415ef480c3224c390eda3">CompareFunction</a> compareFunction)</td></tr>
<tr class="memdesc:a0403ae7f8702fdc5c21b700053e7af0c"><td class="mdescLeft"> </td><td class="mdescRight">Sorts the array using the specified <em>compareFunction</em> for item comparison. <a href="#a0403ae7f8702fdc5c21b700053e7af0c"></a><br/></td></tr>
<tr class="separator:a0403ae7f8702fdc5c21b700053e7af0c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3796e3297a21ff4f1dce9f1eecc7f8f7"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_array_string.html#a3796e3297a21ff4f1dce9f1eecc7f8f7">operator!=</a> (const <a class="el" href="classwx_array_string.html">wxArrayString</a> &array) const </td></tr>
<tr class="memdesc:a3796e3297a21ff4f1dce9f1eecc7f8f7"><td class="mdescLeft"> </td><td class="mdescRight">Compares 2 arrays respecting the case. <a href="#a3796e3297a21ff4f1dce9f1eecc7f8f7"></a><br/></td></tr>
<tr class="separator:a3796e3297a21ff4f1dce9f1eecc7f8f7"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a87f49b6cea7e371f45a4fc40b0f01548"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classwx_array_string.html">wxArrayString</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_array_string.html#a87f49b6cea7e371f45a4fc40b0f01548">operator=</a> (const <a class="el" href="classwx_array_string.html">wxArrayString</a> &)</td></tr>
<tr class="memdesc:a87f49b6cea7e371f45a4fc40b0f01548"><td class="mdescLeft"> </td><td class="mdescRight">Assignment operator. <a href="#a87f49b6cea7e371f45a4fc40b0f01548"></a><br/></td></tr>
<tr class="separator:a87f49b6cea7e371f45a4fc40b0f01548"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4ccc608a22d5a805ee1374b3446b09ff"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_array_string.html#a4ccc608a22d5a805ee1374b3446b09ff">operator==</a> (const <a class="el" href="classwx_array_string.html">wxArrayString</a> &array) const </td></tr>
<tr class="memdesc:a4ccc608a22d5a805ee1374b3446b09ff"><td class="mdescLeft"> </td><td class="mdescRight">Compares 2 arrays respecting the case. <a href="#a4ccc608a22d5a805ee1374b3446b09ff"></a><br/></td></tr>
<tr class="separator:a4ccc608a22d5a805ee1374b3446b09ff"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af0a959d8f8e8031e1442bc0e977b6a4f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classwx_string.html">wxString</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_array_string.html#af0a959d8f8e8031e1442bc0e977b6a4f">operator[]</a> (size_t nIndex) const </td></tr>
<tr class="memdesc:af0a959d8f8e8031e1442bc0e977b6a4f"><td class="mdescLeft"> </td><td class="mdescRight">Return the array element at position <em>nIndex</em>. <a href="#af0a959d8f8e8031e1442bc0e977b6a4f"></a><br/></td></tr>
<tr class="separator:af0a959d8f8e8031e1442bc0e977b6a4f"><td class="memSeparator" colspan="2"> </td></tr>
<tr><td colspan="2"><div class="groupHeader"></div></td></tr>
<tr class="memitem:a4df6e48276a8f2f12d018281eda1a618"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_array_string.html#a4df6e48276a8f2f12d018281eda1a618">wxArrayString</a> (size_t sz, const char **arr)</td></tr>
<tr class="memdesc:a4df6e48276a8f2f12d018281eda1a618"><td class="mdescLeft"> </td><td class="mdescRight">Constructor from a C string array. <a href="#a4df6e48276a8f2f12d018281eda1a618"></a><br/></td></tr>
<tr class="separator:a4df6e48276a8f2f12d018281eda1a618"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a71f569b4bbe2a77a6f222a743dc9e44b"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_array_string.html#a71f569b4bbe2a77a6f222a743dc9e44b">wxArrayString</a> (size_t sz, const wchar_t **arr)</td></tr>
<tr class="memdesc:a71f569b4bbe2a77a6f222a743dc9e44b"><td class="mdescLeft"> </td><td class="mdescRight">Constructor from a C string array. <a href="#a71f569b4bbe2a77a6f222a743dc9e44b"></a><br/></td></tr>
<tr class="separator:a71f569b4bbe2a77a6f222a743dc9e44b"><td class="memSeparator" colspan="2"> </td></tr>
<tr><td colspan="2"><div class="groupHeader"></div></td></tr>
<tr class="memitem:a9d02526d49d8b9da9ea184969ca721d2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classwx_string.html">wxString</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_array_string.html#a9d02526d49d8b9da9ea184969ca721d2">Item</a> (size_t nIndex)</td></tr>
<tr class="memdesc:a9d02526d49d8b9da9ea184969ca721d2"><td class="mdescLeft"> </td><td class="mdescRight">Return the array element at position <em>nIndex</em>. <a href="#a9d02526d49d8b9da9ea184969ca721d2"></a><br/></td></tr>
<tr class="separator:a9d02526d49d8b9da9ea184969ca721d2"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2eaf5fd9e978099af9a06da914aa30db"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classwx_string.html">wxString</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_array_string.html#a2eaf5fd9e978099af9a06da914aa30db">Item</a> (size_t nIndex) const </td></tr>
<tr class="memdesc:a2eaf5fd9e978099af9a06da914aa30db"><td class="mdescLeft"> </td><td class="mdescRight">Return the array element at position <em>nIndex</em>. <a href="#a2eaf5fd9e978099af9a06da914aa30db"></a><br/></td></tr>
<tr class="separator:a2eaf5fd9e978099af9a06da914aa30db"><td class="memSeparator" colspan="2"> </td></tr>
<tr><td colspan="2"><div class="groupHeader"></div></td></tr>
<tr class="memitem:ae6c05b8d0a6dd18ec1f72a94827dbd03"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classwx_string.html">wxString</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_array_string.html#ae6c05b8d0a6dd18ec1f72a94827dbd03">Last</a> ()</td></tr>
<tr class="memdesc:ae6c05b8d0a6dd18ec1f72a94827dbd03"><td class="mdescLeft"> </td><td class="mdescRight">Returns the last element of the array. <a href="#ae6c05b8d0a6dd18ec1f72a94827dbd03"></a><br/></td></tr>
<tr class="separator:ae6c05b8d0a6dd18ec1f72a94827dbd03"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab02b482011ff086cf024b11dce2eb105"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classwx_string.html">wxString</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_array_string.html#ab02b482011ff086cf024b11dce2eb105">Last</a> () const </td></tr>
<tr class="memdesc:ab02b482011ff086cf024b11dce2eb105"><td class="mdescLeft"> </td><td class="mdescRight">Returns the last element of the array. <a href="#ab02b482011ff086cf024b11dce2eb105"></a><br/></td></tr>
<tr class="separator:ab02b482011ff086cf024b11dce2eb105"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<h2 class="groupheader">Member Typedef Documentation</h2>
<a class="anchor" id="ab3765f8d31f415ef480c3224c390eda3"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef int(* wxArrayString::CompareFunction)(const <a class="el" href="classwx_string.html">wxString</a> &first, const <a class="el" href="classwx_string.html">wxString</a> &second)</td>
</tr>
</table>
</div><div class="memdoc">
<p>The function type used with <a class="el" href="classwx_array_string.html#af10a5c5c81001638f5a2b6dceaa74810" title="Sorts the array in alphabetical order or in reverse alphabetical order if reverseOrder is true...">wxArrayString::Sort</a> function. </p>
</div>
</div>
<h2 class="groupheader">Constructor & Destructor Documentation</h2>
<a class="anchor" id="a35fe0f0ee8452506f1ca39d3fd48c14e"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">wxArrayString::wxArrayString </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Default constructor. </p>
</div>
</div>
<a class="anchor" id="a217ff3d3246ea5079bac9295ff36a237"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">wxArrayString::wxArrayString </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classwx_array_string.html">wxArrayString</a> & </td>
<td class="paramname"><em>array</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Copy constructor. </p>
</div>
</div>
<a class="anchor" id="a4df6e48276a8f2f12d018281eda1a618"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">wxArrayString::wxArrayString </td>
<td>(</td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>sz</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char ** </td>
<td class="paramname"><em>arr</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructor from a C string array. </p>
<p>Pass a size <em>sz</em> and an array <em>arr</em>. </p>
</div>
</div>
<a class="anchor" id="a71f569b4bbe2a77a6f222a743dc9e44b"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">wxArrayString::wxArrayString </td>
<td>(</td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>sz</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const wchar_t ** </td>
<td class="paramname"><em>arr</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructor from a C string array. </p>
<p>Pass a size <em>sz</em> and an array <em>arr</em>. </p>
</div>
</div>
<a class="anchor" id="aeb9c9e5cb3550098735f54a47c3d29b4"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">wxArrayString::wxArrayString </td>
<td>(</td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>sz</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classwx_string.html">wxString</a> * </td>
<td class="paramname"><em>arr</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructor from a <a class="el" href="classwx_string.html" title="String class for passing textual data to or receiving it from wxWidgets.">wxString</a> array. </p>
<p>Pass a size <em>sz</em> and array <em>arr</em>. </p>
</div>
</div>
<a class="anchor" id="a62c4453faf577c0196eac0b38701d710"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">wxArrayString::~wxArrayString </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Destructor frees memory occupied by the array strings. </p>
<p>For performance reasons it is not virtual, so this class should not be derived from. </p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="af06b61455118d83a24183c3a9f6854b1"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">size_t wxArrayString::Add </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classwx_string.html">wxString</a> & </td>
<td class="paramname"><em>str</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>copies</em> = <code>1</code> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Appends the given number of <em>copies</em> of the new item <em>str</em> to the array and returns the index of the first new item in the array. </p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classwx_array_string.html#a9913831038ad76b0c4386cbd095b8e0d" title="Insert the given number of copies of the new element in the array before the position nIndex...">Insert()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="a7d399eb79ba4f7ad165af03909889894"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wxArrayString::Alloc </td>
<td>(</td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>nCount</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Preallocates enough memory to store <em>nCount</em> items. </p>
<p>This function may be used to improve array class performance before adding a known number of items consecutively. </p>
</div>
</div>
<a class="anchor" id="aad1c8fe1dd445b359a633cdd6c5940ce"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wxArrayString::Clear </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Clears the array contents and frees memory. </p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classwx_array_string.html#ac23ff4a9b6a0f014c2c803361eee52f5" title="Empties the array: after a call to this function GetCount() will return 0.">Empty()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="ac23ff4a9b6a0f014c2c803361eee52f5"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wxArrayString::Empty </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Empties the array: after a call to this function <a class="el" href="classwx_array_string.html#ad2a491f799c8d6539dc64d06f2c37ac6" title="Returns the number of items in the array.">GetCount()</a> will return 0. </p>
<p>However, this function does not free the memory used by the array and so should be used when the array is going to be reused for storing other strings. Otherwise, you should use <a class="el" href="classwx_array_string.html#aad1c8fe1dd445b359a633cdd6c5940ce" title="Clears the array contents and frees memory.">Clear()</a> to empty the array and free memory. </p>
</div>
</div>
<a class="anchor" id="ad2a491f799c8d6539dc64d06f2c37ac6"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">size_t wxArrayString::GetCount </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the number of items in the array. </p>
</div>
</div>
<a class="anchor" id="a87d29ec37fca50c5b289c242fbaad2f5"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int wxArrayString::Index </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classwx_string.html">wxString</a> & </td>
<td class="paramname"><em>sz</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"><em>bCase</em> = <code>true</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"><em>bFromEnd</em> = <code>false</code> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Search the element in the array, starting from the beginning if <em>bFromEnd</em> is <span class="literal">false</span> or from end otherwise. </p>
<p>If <em>bCase</em>, comparison is case sensitive (default), otherwise the case is ignored.</p>
<p>This function uses linear search for <a class="el" href="classwx_array_string.html" title="wxArrayString is an efficient container for storing wxString objects.">wxArrayString</a>. Returns index of the first item matched or <code>wxNOT_FOUND</code> if there is no match. </p>
</div>
</div>
<a class="anchor" id="a9913831038ad76b0c4386cbd095b8e0d"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wxArrayString::Insert </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classwx_string.html">wxString</a> </td>
<td class="paramname"><em>lItem</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>nIndex</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>copies</em> = <code>1</code> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Insert the given number of <em>copies</em> of the new element in the array before the position <em>nIndex</em>. </p>
<p>Thus, for example, to insert the string in the beginning of the array you would write:</p>
<div class="fragment"><div class="line"><a class="code" href="classwx_array_string.html#a9913831038ad76b0c4386cbd095b8e0d" title="Insert the given number of copies of the new element in the array before the position nIndex...">Insert</a>(<span class="stringliteral">"foo"</span>, 0);</div>
</div><!-- fragment --><p>If <em>nIndex</em> is equal to <a class="el" href="classwx_array_string.html#ad2a491f799c8d6539dc64d06f2c37ac6" title="Returns the number of items in the array.">GetCount()</a> this function behaves as <a class="el" href="classwx_array_string.html#af06b61455118d83a24183c3a9f6854b1" title="Appends the given number of copies of the new item str to the array and returns the index of the firs...">Add()</a>. </p>
</div>
</div>
<a class="anchor" id="a1eb4f967685188b1c14407026e9ec53c"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool wxArrayString::IsEmpty </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns <span class="literal">true</span> if the array is empty, <span class="literal">false</span> otherwise. </p>
<p>This function returns the same result as <a class="el" href="classwx_array_string.html#ad2a491f799c8d6539dc64d06f2c37ac6" title="Returns the number of items in the array.">GetCount()</a> == 0 but is probably easier to read. </p>
</div>
</div>
<a class="anchor" id="a9d02526d49d8b9da9ea184969ca721d2"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classwx_string.html">wxString</a>& wxArrayString::Item </td>
<td>(</td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>nIndex</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Return the array element at position <em>nIndex</em>. </p>
<p>An assert failure will result from an attempt to access an element beyond the end of array in debug mode, but no check is done in release mode.</p>
<dl class="section see"><dt>See Also</dt><dd>operator[] for the operator version. </dd></dl>
</div>
</div>
<a class="anchor" id="a2eaf5fd9e978099af9a06da914aa30db"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="classwx_string.html">wxString</a>& wxArrayString::Item </td>
<td>(</td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>nIndex</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Return the array element at position <em>nIndex</em>. </p>
<p>An assert failure will result from an attempt to access an element beyond the end of array in debug mode, but no check is done in release mode.</p>
<dl class="section see"><dt>See Also</dt><dd>operator[] for the operator version. </dd></dl>
</div>
</div>
<a class="anchor" id="ae6c05b8d0a6dd18ec1f72a94827dbd03"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classwx_string.html">wxString</a>& wxArrayString::Last </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the last element of the array. </p>
<p>Attempt to access the last element of an empty array will result in assert failure in debug build, however no checks are done in release mode. </p>
</div>
</div>
<a class="anchor" id="ab02b482011ff086cf024b11dce2eb105"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="classwx_string.html">wxString</a>& wxArrayString::Last </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the last element of the array. </p>
<p>Attempt to access the last element of an empty array will result in assert failure in debug build, however no checks are done in release mode. </p>
</div>
</div>
<a class="anchor" id="a3796e3297a21ff4f1dce9f1eecc7f8f7"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool wxArrayString::operator!= </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classwx_array_string.html">wxArrayString</a> & </td>
<td class="paramname"><em>array</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Compares 2 arrays respecting the case. </p>
<p>Returns <span class="literal">true</span> if the arrays have different number of elements or if the elements don't match pairwise. </p>
</div>
</div>
<a class="anchor" id="a87f49b6cea7e371f45a4fc40b0f01548"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classwx_array_string.html">wxArrayString</a>& wxArrayString::operator= </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classwx_array_string.html">wxArrayString</a> & </td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Assignment operator. </p>
</div>
</div>
<a class="anchor" id="a4ccc608a22d5a805ee1374b3446b09ff"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool wxArrayString::operator== </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classwx_array_string.html">wxArrayString</a> & </td>
<td class="paramname"><em>array</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Compares 2 arrays respecting the case. </p>
<p>Returns <span class="literal">true</span> only if the arrays have the same number of elements and the same strings in the same order. </p>
</div>
</div>
<a class="anchor" id="af0a959d8f8e8031e1442bc0e977b6a4f"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classwx_string.html">wxString</a>& wxArrayString::operator[] </td>
<td>(</td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>nIndex</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Return the array element at position <em>nIndex</em>. </p>
<p>An assert failure will result from an attempt to access an element beyond the end of array in debug mode, but no check is done in release mode.</p>
<p>This is the operator version of the <a class="el" href="classwx_array_string.html#a9d02526d49d8b9da9ea184969ca721d2" title="Return the array element at position nIndex.">Item()</a> method. </p>
</div>
</div>
<a class="anchor" id="ae24a86de01c53488e84ce3c39582fbc1"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wxArrayString::Remove </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classwx_string.html">wxString</a> & </td>
<td class="paramname"><em>sz</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Removes the first item matching this value. </p>
<p>An assert failure is provoked by an attempt to remove an element which does not exist in debug build.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classwx_array_string.html#a87d29ec37fca50c5b289c242fbaad2f5" title="Search the element in the array, starting from the beginning if bFromEnd is false or from end otherwi...">Index()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="a1374163a35ccb75adac977acfe8add96"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wxArrayString::RemoveAt </td>
<td>(</td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>nIndex</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>count</em> = <code>1</code> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Removes <em>count</em> items starting at position <em>nIndex</em> from the array. </p>
</div>
</div>
<a class="anchor" id="a598a1eba111e3c25ef760dcdcc0c7678"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wxArrayString::Shrink </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Releases the extra memory allocated by the array. </p>
<p>This function is useful to minimize the array memory consumption.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classwx_array_string.html#a7d399eb79ba4f7ad165af03909889894" title="Preallocates enough memory to store nCount items.">Alloc()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="af10a5c5c81001638f5a2b6dceaa74810"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wxArrayString::Sort </td>
<td>(</td>
<td class="paramtype">bool </td>
<td class="paramname"><em>reverseOrder</em> = <code>false</code></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sorts the array in alphabetical order or in reverse alphabetical order if <em>reverseOrder</em> is <span class="literal">true</span>. </p>
<p>The sort is case-sensitive. </p>
</div>
</div>
<a class="anchor" id="a0403ae7f8702fdc5c21b700053e7af0c"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wxArrayString::Sort </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classwx_array_string.html#ab3765f8d31f415ef480c3224c390eda3">CompareFunction</a> </td>
<td class="paramname"><em>compareFunction</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sorts the array using the specified <em>compareFunction</em> for item comparison. </p>
<p><em>CompareFunction</em> is defined as a function taking two <em>const <a class="el" href="classwx_string.html" title="String class for passing textual data to or receiving it from wxWidgets.">wxString</a>&</em> parameters and returning an <em>int</em> value less than, equal to or greater than 0 if the first string is less than, equal to or greater than the second one.</p>
<p>Example: The following example sorts strings by their length.</p>
<div class="fragment"><div class="line"><span class="keyword">static</span> <span class="keywordtype">int</span> CompareStringLen(<span class="keyword">const</span> <a class="code" href="classwx_string.html" title="String class for passing textual data to or receiving it from wxWidgets.">wxString</a>& first, <span class="keyword">const</span> <a class="code" href="classwx_string.html" title="String class for passing textual data to or receiving it from wxWidgets.">wxString</a>& second)</div>
<div class="line">{</div>
<div class="line"> <span class="keywordflow">return</span> first.<a class="code" href="classwx_string.html#af63f200410b56436a830550905e20539">length</a>() - second.<a class="code" href="classwx_string.html#af63f200410b56436a830550905e20539">length</a>();</div>
<div class="line">}</div>
<div class="line"></div>
<div class="line">...</div>
<div class="line"></div>
<div class="line">wxArrayString array;</div>
<div class="line"></div>
<div class="line">array.Add(<span class="stringliteral">"one"</span>);</div>
<div class="line">array.Add(<span class="stringliteral">"two"</span>);</div>
<div class="line">array.Add(<span class="stringliteral">"three"</span>);</div>
<div class="line">array.Add(<span class="stringliteral">"four"</span>);</div>
<div class="line"></div>
<div class="line">array.Sort(CompareStringLen);</div>
</div><!-- fragment -->
</div>
</div>
</div><!-- contents -->
<address class="footer">
<small>
Generated on Thu Nov 27 2014 13:46:43 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>
|