1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 2 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> 3 <title>OSCL_FastString class Reference</title> 4 <link href="doxygen.css" rel="stylesheet" type="text/css"> 5 </head><body> 6 <!-- Generated by Doxygen 1.2.18 --> 7 <center> 8 <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="modules.html">Modules</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Data Structures</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Data Fields</a> <a class="qindex" href="globals.html">Globals</a> </center> 9 <hr><h1>OSCL_FastString Class Reference<br> 10 <small> 11 [<a class="el" href="group__osclutil.html">OSCL Util</a>]</small> 12 </h1><code>#include <<a class="el" href="oscl__string__containers_8h-source.html">oscl_string_containers.h</a>></code> 13 <p> 14 <p>Inheritance diagram for OSCL_FastString: 15 <p><center><img src="classOSCL__FastString.png" usemap="#OSCL_FastString_map" border="0" alt=""></center> 16 <map name="OSCL_FastString_map"> 17 <area href="classOSCL__String.html" alt="OSCL_String" shape="rect" coords="0,112,110,136"> 18 <area href="classHeapBase.html" alt="HeapBase" shape="rect" coords="0,56,110,80"> 19 <area href="class__OsclHeapBase.html" alt="_OsclHeapBase" shape="rect" coords="0,0,110,24"> 20 </map> 21 <table border=0 cellpadding=0 cellspacing=0> 22 <tr><td></td></tr> 23 <tr><td colspan=2><br><h2>Public Types</h2></td></tr> 24 <tr><td nowrap align=right valign=top>typedef OSCL_String::chartype </td><td valign=bottom><a class="el" href="classOSCL__FastString.html#s0">chartype</a></td></tr> 25 <tr><td colspan=2><br><h2>Public Methods</h2></td></tr> 26 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF </td><td valign=bottom><a class="el" href="classOSCL__FastString.html#a0">OSCL_FastString</a> ()</td></tr> 27 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF </td><td valign=bottom><a class="el" href="classOSCL__FastString.html#a1">OSCL_FastString</a> (const OSCL_FastString &src)</td></tr> 28 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF </td><td valign=bottom><a class="el" href="classOSCL__FastString.html#a2">OSCL_FastString</a> (const <a class="el" href="classOSCL__FastString.html#s0">chartype</a> *cstr)</td></tr> 29 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF </td><td valign=bottom><a class="el" href="classOSCL__FastString.html#a3">OSCL_FastString</a> (<a class="el" href="classOSCL__FastString.html#s0">chartype</a> *buf, uint32 maxlen)</td></tr> 30 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF </td><td valign=bottom><a class="el" href="classOSCL__FastString.html#a4">~OSCL_FastString</a> ()</td></tr> 31 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF uint32 </td><td valign=bottom><a class="el" href="classOSCL__FastString.html#a5">get_size</a> () const</td></tr> 32 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF uint32 </td><td valign=bottom><a class="el" href="classOSCL__FastString.html#a6">get_maxsize</a> () const</td></tr> 33 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF const <a class="el" href="classOSCL__FastString.html#s0">chartype</a> * </td><td valign=bottom><a class="el" href="classOSCL__FastString.html#a7">get_cstr</a> () const</td></tr> 34 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF <a class="el" href="classOSCL__FastString.html#s0">chartype</a> * </td><td valign=bottom><a class="el" href="classOSCL__FastString.html#a8">get_str</a> () const</td></tr> 35 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF OSCL_FastString & </td><td valign=bottom><a class="el" href="classOSCL__FastString.html#a9">operator=</a> (const OSCL_FastString &src)</td></tr> 36 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF OSCL_FastString & </td><td valign=bottom><a class="el" href="classOSCL__FastString.html#a10">operator=</a> (const <a class="el" href="classOSCL__FastString.html#s0">chartype</a> *cstr)</td></tr> 37 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF void </td><td valign=bottom><a class="el" href="classOSCL__FastString.html#a11">set</a> (<a class="el" href="classOSCL__FastString.html#s0">chartype</a> *cstr, uint32 maxlen)</td></tr> 38 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF void </td><td valign=bottom><a class="el" href="classOSCL__FastString.html#a12">set_length</a> ()</td></tr> 39 <tr><td colspan=2><br><h2>Friends</h2></td></tr> 40 <tr><td nowrap align=right valign=top>class </td><td valign=bottom><a class="el" href="classOSCL__FastString.html#l0">OSCL_String</a></td></tr> 41 </table> 42 <hr><a name="_details"></a><h2>Detailed Description</h2> 43 OSCL_FastString is a simple string class, compatible with regular character array strings. 44 <p> 45 This class does not allocate internal memory for the string but acts as a container for a user-defined buffer. This means no copying of the string is done and provides a faster way of manipulating strings. Depending on initialization, this container provides either read-only or read-write access to the string. 46 <p> 47 Implementation assumes the input string is null-terminated.<dl compact><dt><b>Parameters: </b></dt><dd> 48 <table border=0 cellspacing=2 cellpadding=0> 49 <tr><td valign=top><em>C:</em> </td><td> 50 type of character. </td></tr> 51 </table> 52 </dl> 53 <p> 54 <hr><h2>Member Typedef Documentation</h2> 55 <a name="s0" doxytag="OSCL_FastString::chartype"></a><p> 56 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 57 <tr> 58 <td class="md"> 59 <table cellpadding="0" cellspacing="0" border="0"> 60 <tr> 61 <td class="md" nowrap valign="top"> typedef OSCL_String::chartype OSCL_FastString::chartype 62 </table> 63 </td> 64 </tr> 65 </table> 66 <table cellspacing=5 cellpadding=0 border=0> 67 <tr> 68 <td> 69 70 </td> 71 <td> 72 73 <p> 74 75 <p> 76 Reimplemented from <a class="el" href="classOSCL__String.html#s0">OSCL_String</a>. </td> 77 </tr> 78 </table> 79 <hr><h2>Constructor & Destructor Documentation</h2> 80 <a name="a0" doxytag="OSCL_FastString::OSCL_FastString"></a><p> 81 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 82 <tr> 83 <td class="md"> 84 <table cellpadding="0" cellspacing="0" border="0"> 85 <tr> 86 <td class="md" nowrap valign="top"> OSCL_IMPORT_REF OSCL_FastString::OSCL_FastString </td> 87 <td class="md" valign="top">( </td> 88 <td class="mdname1" valign="top" nowrap> </td> 89 <td class="md" valign="top">) </td> 90 <td class="md" nowrap></td> 91 </tr> 92 93 </table> 94 </td> 95 </tr> 96 </table> 97 <table cellspacing=5 cellpadding=0 border=0> 98 <tr> 99 <td> 100 101 </td> 102 <td> 103 104 <p> 105 Default constructor. </td> 106 </tr> 107 </table> 108 <a name="a1" doxytag="OSCL_FastString::OSCL_FastString"></a><p> 109 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 110 <tr> 111 <td class="md"> 112 <table cellpadding="0" cellspacing="0" border="0"> 113 <tr> 114 <td class="md" nowrap valign="top"> OSCL_IMPORT_REF OSCL_FastString::OSCL_FastString </td> 115 <td class="md" valign="top">( </td> 116 <td class="md" nowrap valign="top">const OSCL_FastString & </td> 117 <td class="mdname1" valign="top" nowrap> <em>src</em> </td> 118 <td class="md" valign="top">) </td> 119 <td class="md" nowrap></td> 120 </tr> 121 122 </table> 123 </td> 124 </tr> 125 </table> 126 <table cellspacing=5 cellpadding=0 border=0> 127 <tr> 128 <td> 129 130 </td> 131 <td> 132 133 <p> 134 Creates a fast string that contains a copy of the input string. The string inherits the writable-ness of the source string. <dl compact><dt><b>Parameters: </b></dt><dd> 135 <table border=0 cellspacing=2 cellpadding=0> 136 <tr><td valign=top><em>src:</em> </td><td> 137 input string. </td></tr> 138 </table> 139 </dl> </td> 140 </tr> 141 </table> 142 <a name="a2" doxytag="OSCL_FastString::OSCL_FastString"></a><p> 143 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 144 <tr> 145 <td class="md"> 146 <table cellpadding="0" cellspacing="0" border="0"> 147 <tr> 148 <td class="md" nowrap valign="top"> OSCL_IMPORT_REF OSCL_FastString::OSCL_FastString </td> 149 <td class="md" valign="top">( </td> 150 <td class="md" nowrap valign="top">const <a class="el" href="classOSCL__FastString.html#s0">chartype</a> * </td> 151 <td class="mdname1" valign="top" nowrap> <em>cstr</em> </td> 152 <td class="md" valign="top">) </td> 153 <td class="md" nowrap></td> 154 </tr> 155 156 </table> 157 </td> 158 </tr> 159 </table> 160 <table cellspacing=5 cellpadding=0 border=0> 161 <tr> 162 <td> 163 164 </td> 165 <td> 166 167 <p> 168 Create the string and initialize it to contain the input string. The string is not writable. <dl compact><dt><b>am: null-terminated string.</b></dt><dd> 169 </dl> </td> 170 </tr> 171 </table> 172 <a name="a3" doxytag="OSCL_FastString::OSCL_FastString"></a><p> 173 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 174 <tr> 175 <td class="md"> 176 <table cellpadding="0" cellspacing="0" border="0"> 177 <tr> 178 <td class="md" nowrap valign="top"> OSCL_IMPORT_REF OSCL_FastString::OSCL_FastString </td> 179 <td class="md" valign="top">( </td> 180 <td class="md" nowrap valign="top"><a class="el" href="classOSCL__FastString.html#s0">chartype</a> * </td> 181 <td class="mdname" nowrap> <em>buf</em>, </td> 182 </tr> 183 <tr> 184 <td></td> 185 <td></td> 186 <td class="md" nowrap>uint32 </td> 187 <td class="mdname" nowrap> <em>maxlen</em></td> 188 </tr> 189 <tr> 190 <td></td> 191 <td class="md">) </td> 192 <td class="md" colspan="2"></td> 193 </tr> 194 195 </table> 196 </td> 197 </tr> 198 </table> 199 <table cellspacing=5 cellpadding=0 border=0> 200 <tr> 201 <td> 202 203 </td> 204 <td> 205 206 <p> 207 Create the string and initialize it to contain the input string. The string is writable. <dl compact><dt><b>Parameters: </b></dt><dd> 208 <table border=0 cellspacing=2 cellpadding=0> 209 <tr><td valign=top><em>cp:</em> </td><td> 210 null-terminated string. </td></tr> 211 <tr><td valign=top><em>maxlen:</em> </td><td> 212 maximum size of storage at cp, not incl null terminator. If input string is not null-terminated, the function leaves. </td></tr> 213 </table> 214 </dl> </td> 215 </tr> 216 </table> 217 <a name="a4" doxytag="OSCL_FastString::~OSCL_FastString"></a><p> 218 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 219 <tr> 220 <td class="md"> 221 <table cellpadding="0" cellspacing="0" border="0"> 222 <tr> 223 <td class="md" nowrap valign="top"> OSCL_IMPORT_REF OSCL_FastString::~OSCL_FastString </td> 224 <td class="md" valign="top">( </td> 225 <td class="mdname1" valign="top" nowrap> </td> 226 <td class="md" valign="top">) </td> 227 <td class="md" nowrap></td> 228 </tr> 229 230 </table> 231 </td> 232 </tr> 233 </table> 234 <table cellspacing=5 cellpadding=0 border=0> 235 <tr> 236 <td> 237 238 </td> 239 <td> 240 241 <p> 242 </td> 243 </tr> 244 </table> 245 <hr><h2>Member Function Documentation</h2> 246 <a name="a7" doxytag="OSCL_FastString::get_cstr"></a><p> 247 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 248 <tr> 249 <td class="md"> 250 <table cellpadding="0" cellspacing="0" border="0"> 251 <tr> 252 <td class="md" nowrap valign="top"> OSCL_IMPORT_REF const <a class="el" href="classOSCL__FastString.html#s0">chartype</a>* OSCL_FastString::get_cstr </td> 253 <td class="md" valign="top">( </td> 254 <td class="mdname1" valign="top" nowrap> </td> 255 <td class="md" valign="top">) </td> 256 <td class="md" nowrap><code> [virtual]</code></td> 257 </tr> 258 259 </table> 260 </td> 261 </tr> 262 </table> 263 <table cellspacing=5 cellpadding=0 border=0> 264 <tr> 265 <td> 266 267 </td> 268 <td> 269 270 <p> 271 This function returns the C-style string for read access. 272 <p> 273 Implements <a class="el" href="classOSCL__String.html#a2">OSCL_String</a>. </td> 274 </tr> 275 </table> 276 <a name="a6" doxytag="OSCL_FastString::get_maxsize"></a><p> 277 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 278 <tr> 279 <td class="md"> 280 <table cellpadding="0" cellspacing="0" border="0"> 281 <tr> 282 <td class="md" nowrap valign="top"> OSCL_IMPORT_REF uint32 OSCL_FastString::get_maxsize </td> 283 <td class="md" valign="top">( </td> 284 <td class="mdname1" valign="top" nowrap> </td> 285 <td class="md" valign="top">) </td> 286 <td class="md" nowrap><code> [virtual]</code></td> 287 </tr> 288 289 </table> 290 </td> 291 </tr> 292 </table> 293 <table cellspacing=5 cellpadding=0 border=0> 294 <tr> 295 <td> 296 297 </td> 298 <td> 299 300 <p> 301 This function returns the maximum available storage size, not including null terminator. The maximum size may be larger than the current string size. 302 <p> 303 Implements <a class="el" href="classOSCL__String.html#a1">OSCL_String</a>. </td> 304 </tr> 305 </table> 306 <a name="a5" doxytag="OSCL_FastString::get_size"></a><p> 307 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 308 <tr> 309 <td class="md"> 310 <table cellpadding="0" cellspacing="0" border="0"> 311 <tr> 312 <td class="md" nowrap valign="top"> OSCL_IMPORT_REF uint32 OSCL_FastString::get_size </td> 313 <td class="md" valign="top">( </td> 314 <td class="mdname1" valign="top" nowrap> </td> 315 <td class="md" valign="top">) </td> 316 <td class="md" nowrap><code> [virtual]</code></td> 317 </tr> 318 319 </table> 320 </td> 321 </tr> 322 </table> 323 <table cellspacing=5 cellpadding=0 border=0> 324 <tr> 325 <td> 326 327 </td> 328 <td> 329 330 <p> 331 Pure virtuals from <a class="el" href="classOSCL__String.html">OSCL_String</a> 332 <p> 333 Implements <a class="el" href="classOSCL__String.html#a0">OSCL_String</a>. </td> 334 </tr> 335 </table> 336 <a name="a8" doxytag="OSCL_FastString::get_str"></a><p> 337 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 338 <tr> 339 <td class="md"> 340 <table cellpadding="0" cellspacing="0" border="0"> 341 <tr> 342 <td class="md" nowrap valign="top"> OSCL_IMPORT_REF <a class="el" href="classOSCL__FastString.html#s0">chartype</a>* OSCL_FastString::get_str </td> 343 <td class="md" valign="top">( </td> 344 <td class="mdname1" valign="top" nowrap> </td> 345 <td class="md" valign="top">) </td> 346 <td class="md" nowrap><code> [virtual]</code></td> 347 </tr> 348 349 </table> 350 </td> 351 </tr> 352 </table> 353 <table cellspacing=5 cellpadding=0 border=0> 354 <tr> 355 <td> 356 357 </td> 358 <td> 359 360 <p> 361 This function returns the C-style string for write access. If the string is not writable it returns NULL. 362 <p> 363 Implements <a class="el" href="classOSCL__String.html#a4">OSCL_String</a>. </td> 364 </tr> 365 </table> 366 <a name="a10" doxytag="OSCL_FastString::operator="></a><p> 367 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 368 <tr> 369 <td class="md"> 370 <table cellpadding="0" cellspacing="0" border="0"> 371 <tr> 372 <td class="md" nowrap valign="top"> OSCL_IMPORT_REF OSCL_FastString& OSCL_FastString::operator= </td> 373 <td class="md" valign="top">( </td> 374 <td class="md" nowrap valign="top">const <a class="el" href="classOSCL__FastString.html#s0">chartype</a> * </td> 375 <td class="mdname1" valign="top" nowrap> <em>cstr</em> </td> 376 <td class="md" valign="top">) </td> 377 <td class="md" nowrap></td> 378 </tr> 379 380 </table> 381 </td> 382 </tr> 383 </table> 384 <table cellspacing=5 cellpadding=0 border=0> 385 <tr> 386 <td> 387 388 </td> 389 <td> 390 391 <p> 392 Assignment operator <dl compact><dt><b>am: null-terminated string</b></dt><dd> 393 </dl> 394 <p> 395 Reimplemented from <a class="el" href="classOSCL__String.html#a6">OSCL_String</a>. </td> 396 </tr> 397 </table> 398 <a name="a9" doxytag="OSCL_FastString::operator="></a><p> 399 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 400 <tr> 401 <td class="md"> 402 <table cellpadding="0" cellspacing="0" border="0"> 403 <tr> 404 <td class="md" nowrap valign="top"> OSCL_IMPORT_REF OSCL_FastString& OSCL_FastString::operator= </td> 405 <td class="md" valign="top">( </td> 406 <td class="md" nowrap valign="top">const OSCL_FastString & </td> 407 <td class="mdname1" valign="top" nowrap> <em>src</em> </td> 408 <td class="md" valign="top">) </td> 409 <td class="md" nowrap></td> 410 </tr> 411 412 </table> 413 </td> 414 </tr> 415 </table> 416 <table cellspacing=5 cellpadding=0 border=0> 417 <tr> 418 <td> 419 420 </td> 421 <td> 422 423 <p> 424 Assignment operators </td> 425 </tr> 426 </table> 427 <a name="a11" doxytag="OSCL_FastString::set"></a><p> 428 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 429 <tr> 430 <td class="md"> 431 <table cellpadding="0" cellspacing="0" border="0"> 432 <tr> 433 <td class="md" nowrap valign="top"> OSCL_IMPORT_REF void OSCL_FastString::set </td> 434 <td class="md" valign="top">( </td> 435 <td class="md" nowrap valign="top"><a class="el" href="classOSCL__FastString.html#s0">chartype</a> * </td> 436 <td class="mdname" nowrap> <em>cstr</em>, </td> 437 </tr> 438 <tr> 439 <td></td> 440 <td></td> 441 <td class="md" nowrap>uint32 </td> 442 <td class="mdname" nowrap> <em>maxlen</em></td> 443 </tr> 444 <tr> 445 <td></td> 446 <td class="md">) </td> 447 <td class="md" colspan="2"></td> 448 </tr> 449 450 </table> 451 </td> 452 </tr> 453 </table> 454 <table cellspacing=5 cellpadding=0 border=0> 455 <tr> 456 <td> 457 458 </td> 459 <td> 460 461 <p> 462 This function can be used to reassign the string to a new writable string. If input string is not null-terminated, the function leaves. </td> 463 </tr> 464 </table> 465 <a name="a12" doxytag="OSCL_FastString::set_length"></a><p> 466 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 467 <tr> 468 <td class="md"> 469 <table cellpadding="0" cellspacing="0" border="0"> 470 <tr> 471 <td class="md" nowrap valign="top"> OSCL_IMPORT_REF void OSCL_FastString::set_length </td> 472 <td class="md" valign="top">( </td> 473 <td class="mdname1" valign="top" nowrap> </td> 474 <td class="md" valign="top">) </td> 475 <td class="md" nowrap></td> 476 </tr> 477 478 </table> 479 </td> 480 </tr> 481 </table> 482 <table cellspacing=5 cellpadding=0 border=0> 483 <tr> 484 <td> 485 486 </td> 487 <td> 488 489 <p> 490 This function can be used to refresh the string size in case the contents of the string buffer have been modified since the container was created. </td> 491 </tr> 492 </table> 493 <hr><h2>Friends And Related Function Documentation</h2> 494 <a name="l0" doxytag="OSCL_FastString::OSCL_String"></a><p> 495 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 496 <tr> 497 <td class="md"> 498 <table cellpadding="0" cellspacing="0" border="0"> 499 <tr> 500 <td class="md" nowrap valign="top"> friend class OSCL_String<code> [friend]</code> 501 </table> 502 </td> 503 </tr> 504 </table> 505 <table cellspacing=5 cellpadding=0 border=0> 506 <tr> 507 <td> 508 509 </td> 510 <td> 511 512 <p> 513 </td> 514 </tr> 515 </table> 516 <hr>The documentation for this class was generated from the following file:<ul> 517 <li><a class="el" href="oscl__string__containers_8h-source.html">oscl_string_containers.h</a></ul> 518 <hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small> 519 <address style="align: left;"><small>Posting Version: OPENCORE_20090310 </small> 520 </small></address> 521 </body> 522 </html> 523