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
|
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- q3textstream.cpp -->
<title>Qt 4.8: Q3TextStream Class Reference</title>
<link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
<div class="content">
<a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
</div>
<div class="breadcrumb toolblock">
<ul>
<li class="first"><a href="index.html">Home</a></li>
<!-- Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li>Qt3SupportLight</li>
<li>Q3TextStream</li>
</ul>
</div>
</div>
<div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">Q3TextStream Class Reference</h1>
<!-- $$$Q3TextStream-brief -->
<p>The Q3TextStream class provides basic functions for reading and writing text using a <a href="qiodevice.html">QIODevice</a>. <a href="#details">More...</a></p>
<!-- @@@Q3TextStream -->
<pre class="cpp"> <span class="preprocessor">#include <Q3TextStream></span></pre><p><b>This class is part of the Qt 3 support library.</b> It is provided to keep old source code working. We strongly advise against using it in new code. See <a href="porting4.html#qtextstream">Porting to Qt 4</a> for more information.</p>
<p><b>Note:</b> All functions in this class are <a href="threads-reentrancy.html#reentrant">reentrant</a>.</p>
<ul>
<li><a href="q3textstream-members.html">List of all members, including inherited members</a></li>
<li><a href="q3textstream-obsolete.html">Obsolete members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#Encoding-enum">Encoding</a></b> { Locale, Latin1, Unicode, UnicodeNetworkOrder, ..., UnicodeUTF8 }</td></tr>
</table>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#Q3TextStream">Q3TextStream</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#Q3TextStream-2">Q3TextStream</a></b> ( QIODevice * <i>iod</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#Q3TextStream-3">Q3TextStream</a></b> ( QString * <i>str</i>, int <i>filemode</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#Q3TextStream-5">Q3TextStream</a></b> ( QByteArray & <i>a</i>, int <i>mode</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#Q3TextStream-6">Q3TextStream</a></b> ( FILE * <i>fh</i>, int <i>mode</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#dtor.Q3TextStream">~Q3TextStream</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#atEnd">atEnd</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTextCodec * </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#codec">codec</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QIODevice * </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#device">device</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#fill">fill</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#fill-2">fill</a></b> ( int <i>f</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#flags">flags</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#flags-2">flags</a></b> ( int <i>f</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#precision">precision</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#precision-2">precision</a></b> ( int <i>p</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#read">read</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#readLine">readLine</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3TextStream & </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#readRawBytes">readRawBytes</a></b> ( char * <i>s</i>, uint <i>len</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#reset">reset</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#setCodec">setCodec</a></b> ( QTextCodec * <i>codec</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#setDevice">setDevice</a></b> ( QIODevice * <i>iod</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#setEncoding">setEncoding</a></b> ( Encoding <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#setf">setf</a></b> ( int <i>bits</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#setf-2">setf</a></b> ( int <i>bits</i>, int <i>mask</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#skipWhiteSpace">skipWhiteSpace</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#unsetDevice">unsetDevice</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#unsetf">unsetf</a></b> ( int <i>bits</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#width">width</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#width-2">width</a></b> ( int <i>w</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3TextStream & </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#writeRawBytes">writeRawBytes</a></b> ( const char * <i>s</i>, uint <i>len</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3TextStream & </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#operator-lt-lt">operator<<</a></b> ( QChar <i>c</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3TextStream & </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#operator-lt-lt-2">operator<<</a></b> ( char <i>c</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3TextStream & </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#operator-lt-lt-3">operator<<</a></b> ( signed short <i>i</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3TextStream & </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#operator-lt-lt-4">operator<<</a></b> ( unsigned short <i>i</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3TextStream & </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#operator-lt-lt-5">operator<<</a></b> ( signed int <i>i</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3TextStream & </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#operator-lt-lt-6">operator<<</a></b> ( unsigned int <i>i</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3TextStream & </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#operator-lt-lt-7">operator<<</a></b> ( signed long <i>i</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3TextStream & </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#operator-lt-lt-8">operator<<</a></b> ( unsigned long <i>i</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3TextStream & </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#operator-lt-lt-9">operator<<</a></b> ( float <i>f</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3TextStream & </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#operator-lt-lt-10">operator<<</a></b> ( double <i>f</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3TextStream & </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#operator-lt-lt-11">operator<<</a></b> ( const char * <i>s</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3TextStream & </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#operator-lt-lt-12">operator<<</a></b> ( const Q3CString & <i>s</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3TextStream & </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#operator-lt-lt-13">operator<<</a></b> ( const QString & <i>s</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3TextStream & </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#operator-lt-lt-14">operator<<</a></b> ( void * <i>ptr</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3TextStream & </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#operator-gt-gt">operator>></a></b> ( QChar & <i>c</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3TextStream & </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#operator-gt-gt-2">operator>></a></b> ( char & <i>c</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3TextStream & </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#operator-gt-gt-3">operator>></a></b> ( signed short & <i>i</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3TextStream & </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#operator-gt-gt-4">operator>></a></b> ( unsigned short & <i>i</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3TextStream & </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#operator-gt-gt-5">operator>></a></b> ( signed int & <i>i</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3TextStream & </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#operator-gt-gt-6">operator>></a></b> ( unsigned int & <i>i</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3TextStream & </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#operator-gt-gt-7">operator>></a></b> ( signed long & <i>i</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3TextStream & </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#operator-gt-gt-8">operator>></a></b> ( unsigned long & <i>i</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3TextStream & </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#operator-gt-gt-9">operator>></a></b> ( float & <i>f</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3TextStream & </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#operator-gt-gt-10">operator>></a></b> ( double & <i>f</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3TextStream & </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#operator-gt-gt-11">operator>></a></b> ( char * <i>s</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3TextStream & </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#operator-gt-gt-12">operator>></a></b> ( QString & <i>str</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3TextStream & </td><td class="memItemRight bottomAlign"><b><a href="q3textstream.html#operator-gt-gt-13">operator>></a></b> ( Q3CString & <i>str</i> )</td></tr>
</table>
<a name="details"></a>
<!-- $$$Q3TextStream-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The Q3TextStream class provides basic functions for reading and writing text using a <a href="qiodevice.html">QIODevice</a>.</p>
<p>The text stream class has a functional interface that is very similar to that of the standard C++ iostream class.</p>
<p>Qt provides several global functions similar to the ones in iostream:</p>
<table class="generic">
<thead><tr class="qt-style"><th >Function</th><th >Meaning</th></tr></thead>
<tr valign="top" class="odd"><td >bin</td><td >sets the Q3TextStream to read/write binary numbers</td></tr>
<tr valign="top" class="even"><td >oct</td><td >sets the Q3TextStream to read/write octal numbers</td></tr>
<tr valign="top" class="odd"><td >dec</td><td >sets the Q3TextStream to read/write decimal numbers</td></tr>
<tr valign="top" class="even"><td >hex</td><td >sets the Q3TextStream to read/write hexadecimal numbers</td></tr>
<tr valign="top" class="odd"><td >endl</td><td >forces a line break</td></tr>
<tr valign="top" class="even"><td >flush</td><td >forces the <a href="qiodevice.html">QIODevice</a> to flush any buffered data</td></tr>
<tr valign="top" class="odd"><td >ws</td><td >eats any available whitespace (on input)</td></tr>
<tr valign="top" class="even"><td >reset</td><td >resets the Q3TextStream to its default mode (see <a href="q3textstream.html#reset">reset</a>())</td></tr>
<tr valign="top" class="odd"><td >qSetW(int)</td><td >sets the <a href="q3textstream.html#width">field width</a> to the given argument</td></tr>
<tr valign="top" class="even"><td >qSetFill(int)</td><td >sets the <a href="q3textstream.html#fill">fill character</a> to the given argument</td></tr>
<tr valign="top" class="odd"><td >qSetPrecision(int)</td><td >sets the <a href="q3textstream.html#precision">precision</a> to the given argument</td></tr>
</table>
<p><b>Warning:</b> By default Q3TextStream will automatically detect whether integers in the stream are in decimal, octal, hexadecimal or binary format when reading from the stream. In particular, a leading '0' signifies octal, i.e. the sequence "0100" will be interpreted as 64.</p>
<p>The Q3TextStream class reads and writes text; it is not appropriate for dealing with binary data (but <a href="qdatastream.html">QDataStream</a> is).</p>
<p>By default, output of Unicode text (i.e. <a href="qstring.html">QString</a>) is done using the local 8-bit encoding. This can be changed using the <a href="q3textstream.html#setEncoding">setEncoding</a>() method. For input, the Q3TextStream will auto-detect standard Unicode "byte order marked" text files; otherwise the local 8-bit encoding is used.</p>
<p>The <a href="qiodevice.html">QIODevice</a> is set in the constructor, or later using <a href="q3textstream.html#setDevice">setDevice</a>(). If the end of the input is reached <a href="q3textstream.html#atEnd">atEnd</a>() returns TRUE. Data can be read into variables of the appropriate type using the operator>>() overloads, or read in its entirety into a single string using <a href="q3textstream.html#read">read</a>(), or read a line at a time using <a href="q3textstream.html#readLine">readLine</a>(). Whitespace can be skipped over using <a href="q3textstream.html#skipWhiteSpace">skipWhiteSpace</a>(). You can set flags for the stream using <a href="q3textstream.html#flags">flags</a>() or <a href="q3textstream.html#setf">setf</a>(). The stream also supports <a href="q3textstream.html#width">width</a>(), <a href="q3textstream.html#precision">precision</a>() and <a href="q3textstream.html#fill">fill</a>(); use <a href="q3textstream.html#reset">reset</a>() to reset the defaults.</p>
</div>
<p><b>See also </b><a href="qdatastream.html">QDataStream</a>.</p>
<!-- @@@Q3TextStream -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$Encoding$$$Locale$$$Latin1$$$Unicode$$$UnicodeNetworkOrder$$$UnicodeReverse$$$RawUnicode$$$UnicodeUTF8 -->
<h3 class="fn"><a name="Encoding-enum"></a>enum Q3TextStream::<span class="name">Encoding</span></h3>
<table class="valuelist"><tr><th class="tblConst">Constant</th><th class="tblVal">Value</th></tr>
<tr><td class="topAlign"><tt>Q3TextStream::Locale</tt></td><td class="topAlign"><tt>0</tt></td></tr>
<tr><td class="topAlign"><tt>Q3TextStream::Latin1</tt></td><td class="topAlign"><tt>1</tt></td></tr>
<tr><td class="topAlign"><tt>Q3TextStream::Unicode</tt></td><td class="topAlign"><tt>2</tt></td></tr>
<tr><td class="topAlign"><tt>Q3TextStream::UnicodeNetworkOrder</tt></td><td class="topAlign"><tt>3</tt></td></tr>
<tr><td class="topAlign"><tt>Q3TextStream::UnicodeReverse</tt></td><td class="topAlign"><tt>4</tt></td></tr>
<tr><td class="topAlign"><tt>Q3TextStream::RawUnicode</tt></td><td class="topAlign"><tt>5</tt></td></tr>
<tr><td class="topAlign"><tt>Q3TextStream::UnicodeUTF8</tt></td><td class="topAlign"><tt>6</tt></td></tr>
</table>
<p>See <a href="q3textstream.html#setEncoding">setEncoding</a>() for an explanation of the encodings.</p>
<!-- @@@Encoding -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$Q3TextStream[overload1]$$$Q3TextStream -->
<h3 class="fn"><a name="Q3TextStream"></a>Q3TextStream::<span class="name">Q3TextStream</span> ()</h3>
<p>Constructs a data stream that has no IO device.</p>
<!-- @@@Q3TextStream -->
<!-- $$$Q3TextStream$$$Q3TextStreamQIODevice* -->
<h3 class="fn"><a name="Q3TextStream-2"></a>Q3TextStream::<span class="name">Q3TextStream</span> ( <span class="type"><a href="qiodevice.html">QIODevice</a></span> * <i>iod</i> )</h3>
<p>Constructs a text stream that uses the IO device <i>iod</i>.</p>
<!-- @@@Q3TextStream -->
<!-- $$$Q3TextStream$$$Q3TextStreamQString*int -->
<h3 class="fn"><a name="Q3TextStream-3"></a>Q3TextStream::<span class="name">Q3TextStream</span> ( <span class="type"><a href="qstring.html">QString</a></span> * <i>str</i>, <span class="type">int</span> <i>filemode</i> )</h3>
<p>Constructs a text stream that operates on the Unicode <a href="qstring.html">QString</a>, <i>str</i>, through an internal device. The <i>filemode</i> argument is passed to the device's open() function; see <a href="qiodevice-qt3.html#mode" class="compat">QIODevice::mode</a>().</p>
<p>If you set an encoding or codec with <a href="q3textstream.html#setEncoding">setEncoding</a>() or <a href="q3textstream.html#setCodec">setCodec</a>(), this setting is ignored for text streams that operate on <a href="qstring.html">QString</a>.</p>
<p>Example:</p>
<pre class="cpp"> <span class="type"><a href="qstring.html">QString</a></span> str;
<span class="type"><a href="q3textstream.html">Q3TextStream</a></span> ts( <span class="operator">&</span>str<span class="operator">,</span> IO_WriteOnly );
ts <span class="operator"><</span><span class="operator"><</span> <span class="string">"pi = "</span> <span class="operator"><</span><span class="operator"><</span> <span class="number">3.14</span>; <span class="comment">// str == "pi = 3.14"</span></pre>
<p>Writing data to the text stream will modify the contents of the string. The string will be expanded when data is written beyond the end of the string. Note that the string will not be truncated:</p>
<pre class="cpp"> <span class="type"><a href="qstring.html">QString</a></span> str <span class="operator">=</span> <span class="string">"pi = 3.14"</span>;
<span class="type"><a href="q3textstream.html">Q3TextStream</a></span> ts( <span class="operator">&</span>str<span class="operator">,</span> IO_WriteOnly );
ts <span class="operator"><</span><span class="operator"><</span> <span class="string">"2+2 = "</span> <span class="operator"><</span><span class="operator"><</span> <span class="number">2</span><span class="operator">+</span><span class="number">2</span>; <span class="comment">// str == "2+2 = 414"</span></pre>
<p>Note that because <a href="qstring.html">QString</a> is Unicode, you should not use <a href="q3textstream.html#readRawBytes">readRawBytes</a>() or <a href="q3textstream.html#writeRawBytes">writeRawBytes</a>() on such a stream.</p>
<!-- @@@Q3TextStream -->
<!-- $$$Q3TextStream$$$Q3TextStreamQByteArray&int -->
<h3 class="fn"><a name="Q3TextStream-5"></a>Q3TextStream::<span class="name">Q3TextStream</span> ( <span class="type"><a href="qbytearray.html">QByteArray</a></span> & <i>a</i>, <span class="type">int</span> <i>mode</i> )</h3>
<p>Constructs a text stream that operates on the byte array, <i>a</i>, through an internal <a href="qbuffer.html">QBuffer</a> device. The <i>mode</i> argument is passed to the device's open() function; see <a href="qiodevice-qt3.html#mode" class="compat">QIODevice::mode</a>().</p>
<p>Example:</p>
<pre class="cpp"> <span class="type"><a href="qbytearray.html">QByteArray</a></span> array;
<span class="type"><a href="q3textstream.html">Q3TextStream</a></span> ts( array<span class="operator">,</span> IO_WriteOnly );
ts <span class="operator"><</span><span class="operator"><</span> <span class="string">"pi = "</span> <span class="operator"><</span><span class="operator"><</span> <span class="number">3.14</span> <span class="operator"><</span><span class="operator"><</span> <span class="char">'\0'</span>; <span class="comment">// array == "pi = 3.14"</span></pre>
<p>Writing data to the text stream will modify the contents of the array. The array will be expanded when data is written beyond the end of the string.</p>
<p>Same example, using a <a href="qbuffer.html">QBuffer</a>:</p>
<pre class="cpp"> <span class="type"><a href="qbytearray.html">QByteArray</a></span> array;
<span class="type"><a href="qbuffer.html">QBuffer</a></span> buf( array );
buf<span class="operator">.</span>open( IO_WriteOnly );
<span class="type"><a href="q3textstream.html">Q3TextStream</a></span> ts( <span class="operator">&</span>buf );
ts <span class="operator"><</span><span class="operator"><</span> <span class="string">"pi = "</span> <span class="operator"><</span><span class="operator"><</span> <span class="number">3.14</span> <span class="operator"><</span><span class="operator"><</span> <span class="char">'\0'</span>; <span class="comment">// array == "pi = 3.14"</span>
buf<span class="operator">.</span>close();</pre>
<!-- @@@Q3TextStream -->
<!-- $$$Q3TextStream$$$Q3TextStreamFILE*int -->
<h3 class="fn"><a name="Q3TextStream-6"></a>Q3TextStream::<span class="name">Q3TextStream</span> ( <span class="type">FILE</span> * <i>fh</i>, <span class="type">int</span> <i>mode</i> )</h3>
<p>Constructs a text stream that operates on an existing file handle <i>fh</i> through an internal <a href="qfile.html">QFile</a> device. The <i>mode</i> argument is passed to the device's open() function; see <a href="qiodevice-qt3.html#mode" class="compat">QIODevice::mode</a>().</p>
<p>Note that if you create a <a href="q3textstream.html" class="compat">Q3TextStream</a> <tt>cout</tt> or another name that is also used for another variable of a different type, some linkers may confuse the two variables, which will often cause crashes.</p>
<!-- @@@Q3TextStream -->
<!-- $$$~Q3TextStream[overload1]$$$~Q3TextStream -->
<h3 class="fn"><a name="dtor.Q3TextStream"></a>Q3TextStream::<span class="name">~Q3TextStream</span> ()<tt> [virtual]</tt></h3>
<p>Destroys the text stream.</p>
<p>The destructor does not affect the current IO device.</p>
<!-- @@@~Q3TextStream -->
<!-- $$$atEnd[overload1]$$$atEnd -->
<h3 class="fn"><a name="atEnd"></a><span class="type">bool</span> Q3TextStream::<span class="name">atEnd</span> () const</h3>
<p>Returns TRUE if the IO device has reached the end position (end of the stream or file) or if there is no IO device set; otherwise returns FALSE.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="qiodevice.html#atEnd">QIODevice::atEnd</a>().</p>
<!-- @@@atEnd -->
<!-- $$$codec[overload1]$$$codec -->
<h3 class="fn"><a name="codec"></a><span class="type"><a href="qtextcodec.html">QTextCodec</a></span> * Q3TextStream::<span class="name">codec</span> ()</h3>
<p>Returns the codec actually used for this stream.</p>
<p>If Unicode is automatically detected in input, a codec with <a href="qtextcodec.html#name">name()</a> "ISO-10646-UCS-2" is returned.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="q3textstream.html#setCodec">setCodec</a>().</p>
<!-- @@@codec -->
<!-- $$$device[overload1]$$$device -->
<h3 class="fn"><a name="device"></a><span class="type"><a href="qiodevice.html">QIODevice</a></span> * Q3TextStream::<span class="name">device</span> () const</h3>
<p>Returns the IO device currently set.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="q3textstream.html#setDevice">setDevice</a>() and <a href="q3textstream.html#unsetDevice">unsetDevice</a>().</p>
<!-- @@@device -->
<!-- $$$fill[overload1]$$$fill -->
<h3 class="fn"><a name="fill"></a><span class="type">int</span> Q3TextStream::<span class="name">fill</span> () const</h3>
<p>Returns the fill character. The default value is ' ' (space).</p>
<p>This function was introduced in Qt 4.2.</p>
<!-- @@@fill -->
<!-- $$$fill$$$fillint -->
<h3 class="fn"><a name="fill-2"></a><span class="type">int</span> Q3TextStream::<span class="name">fill</span> ( <span class="type">int</span> <i>f</i> )</h3>
<p>This is an overloaded function.</p>
<p>Sets the fill character to <i>f</i>. Returns the previous fill character.</p>
<!-- @@@fill -->
<!-- $$$flags[overload1]$$$flags -->
<h3 class="fn"><a name="flags"></a><span class="type">int</span> Q3TextStream::<span class="name">flags</span> () const</h3>
<p>Returns the current stream flags. The default value is 0.</p>
<table class="generic">
<thead><tr class="qt-style"><th >Flag</th><th >Meaning</th></tr></thead>
<tr valign="top" class="odd"><td ><tt>skipws</tt></td><td >Not currently used; whitespace always skipped</td></tr>
<tr valign="top" class="even"><td ><tt>left</tt></td><td >Numeric fields are left-aligned</td></tr>
<tr valign="top" class="odd"><td ><tt>right</tt></td><td >Not currently used (by default, numerics are right-aligned)</td></tr>
<tr valign="top" class="even"><td ><tt>internal</tt></td><td >Puts any padding spaces between +/- and value</td></tr>
<tr valign="top" class="odd"><td ><tt>bin</tt></td><td >Output <i>and</i> input only in binary</td></tr>
<tr valign="top" class="even"><td ><tt>oct</tt></td><td >Output <i>and</i> input only in octal</td></tr>
<tr valign="top" class="odd"><td ><tt>dec</tt></td><td >Output <i>and</i> input only in decimal</td></tr>
<tr valign="top" class="even"><td ><tt>hex</tt></td><td >Output <i>and</i> input only in hexadecimal</td></tr>
<tr valign="top" class="odd"><td ><tt>showbase</tt></td><td >Annotates numeric outputs with 0b, 0, or 0x if in <tt>bin</tt>, <tt>oct</tt>, or <tt>hex</tt> format</td></tr>
<tr valign="top" class="even"><td ><tt>showpoint</tt></td><td >Not currently used</td></tr>
<tr valign="top" class="odd"><td ><tt>uppercase</tt></td><td >Uses 0B and 0X rather than 0b and 0x</td></tr>
<tr valign="top" class="even"><td ><tt>showpos</tt></td><td >Shows + for positive numeric values</td></tr>
<tr valign="top" class="odd"><td ><tt>scientific</tt></td><td >Uses scientific notation for floating point values</td></tr>
<tr valign="top" class="even"><td ><tt>fixed</tt></td><td >Uses fixed-point notation for floating point values</td></tr>
</table>
<p>Note that unless <tt>bin</tt>, <tt>oct</tt>, <tt>dec</tt>, or <tt>hex</tt> is set, the input base is octal if the value starts with 0, hexadecimal if it starts with 0x, binary if it starts with 0b, and decimal otherwise.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="q3textstream.html#setf">setf</a>() and <a href="q3textstream.html#unsetf">unsetf</a>().</p>
<!-- @@@flags -->
<!-- $$$flags$$$flagsint -->
<h3 class="fn"><a name="flags-2"></a><span class="type">int</span> Q3TextStream::<span class="name">flags</span> ( <span class="type">int</span> <i>f</i> )</h3>
<p>This is an overloaded function.</p>
<p>Sets the stream flags to <i>f</i>. Returns the previous stream flags.</p>
<p><b>See also </b><a href="q3textstream.html#setf">setf</a>(), <a href="q3textstream.html#unsetf">unsetf</a>(), and <a href="q3textstream.html#flags">flags</a>().</p>
<!-- @@@flags -->
<!-- $$$precision[overload1]$$$precision -->
<h3 class="fn"><a name="precision"></a><span class="type">int</span> Q3TextStream::<span class="name">precision</span> () const</h3>
<p>Returns the precision. The default value is 6.</p>
<p>This function was introduced in Qt 4.2.</p>
<!-- @@@precision -->
<!-- $$$precision$$$precisionint -->
<h3 class="fn"><a name="precision-2"></a><span class="type">int</span> Q3TextStream::<span class="name">precision</span> ( <span class="type">int</span> <i>p</i> )</h3>
<p>This is an overloaded function.</p>
<p>Sets the precision to <i>p</i>. Returns the previous precision setting.</p>
<!-- @@@precision -->
<!-- $$$read[overload1]$$$read -->
<h3 class="fn"><a name="read"></a><span class="type"><a href="qstring.html">QString</a></span> Q3TextStream::<span class="name">read</span> ()</h3>
<p>Reads the entire stream from the current position, and returns a string containing the text.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="q3textstream.html#readLine">readLine</a>().</p>
<!-- @@@read -->
<!-- $$$readLine[overload1]$$$readLine -->
<h3 class="fn"><a name="readLine"></a><span class="type"><a href="qstring.html">QString</a></span> Q3TextStream::<span class="name">readLine</span> ()</h3>
<p>Reads a line from the stream and returns a string containing the text.</p>
<p>The returned string does not contain any trailing newline or carriage return. Note that this is different from <a href="qiodevice.html#readLine">QIODevice::readLine</a>(), which does not strip the newline at the end of the line.</p>
<p>On EOF you will get a <a href="qstring.html">QString</a> that is null. On reading an empty line the returned <a href="qstring.html">QString</a> is empty but not null.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="qiodevice.html#readLine">QIODevice::readLine</a>().</p>
<!-- @@@readLine -->
<!-- $$$readRawBytes[overload1]$$$readRawByteschar*uint -->
<h3 class="fn"><a name="readRawBytes"></a><span class="type">Q3TextStream</span> & Q3TextStream::<span class="name">readRawBytes</span> ( <span class="type">char</span> * <i>s</i>, <span class="type"><a href="qtglobal.html#uint-typedef">uint</a></span> <i>len</i> )</h3>
<p>Reads <i>len</i> bytes from the stream into <i>s</i> and returns a reference to the stream.</p>
<p>The buffer <i>s</i> must be preallocated.</p>
<p>Note that no encoding is done by this function.</p>
<p><b>Warning:</b> The behavior of this function is undefined unless the stream's encoding is set to Unicode or Latin1.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="qiodevice-qt3.html#readBlock" class="compat">QIODevice::readBlock</a>().</p>
<!-- @@@readRawBytes -->
<!-- $$$reset[overload1]$$$reset -->
<h3 class="fn"><a name="reset"></a><span class="type">void</span> Q3TextStream::<span class="name">reset</span> ()</h3>
<p>Resets the text stream.</p>
<ul>
<li>All flags are set to 0.</li>
<li>The field width is set to 0.</li>
<li>The fill character is set to ' ' (Space).</li>
<li>The precision is set to 6.</li>
</ul>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="q3textstream.html#setf">setf</a>(), <a href="q3textstream.html#width">width</a>(), <a href="q3textstream.html#fill">fill</a>(), and <a href="q3textstream.html#precision">precision</a>().</p>
<!-- @@@reset -->
<!-- $$$setCodec[overload1]$$$setCodecQTextCodec* -->
<h3 class="fn"><a name="setCodec"></a><span class="type">void</span> Q3TextStream::<span class="name">setCodec</span> ( <span class="type"><a href="qtextcodec.html">QTextCodec</a></span> * <i>codec</i> )</h3>
<p>Sets the codec for this stream to <i>codec</i>. Will not try to autodetect Unicode.</p>
<p>Note that this function should be called before any data is read to/written from the stream.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="q3textstream.html#setEncoding">setEncoding</a>() and <a href="q3textstream.html#codec">codec</a>().</p>
<!-- @@@setCodec -->
<!-- $$$setDevice[overload1]$$$setDeviceQIODevice* -->
<h3 class="fn"><a name="setDevice"></a><span class="type">void</span> Q3TextStream::<span class="name">setDevice</span> ( <span class="type"><a href="qiodevice.html">QIODevice</a></span> * <i>iod</i> )</h3>
<p>Sets the IO device to <i>iod</i>.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="q3textstream.html#device">device</a>() and <a href="q3textstream.html#unsetDevice">unsetDevice</a>().</p>
<!-- @@@setDevice -->
<!-- $$$setEncoding[overload1]$$$setEncodingEncoding -->
<h3 class="fn"><a name="setEncoding"></a><span class="type">void</span> Q3TextStream::<span class="name">setEncoding</span> ( <span class="type"><a href="q3textstream.html#Encoding-enum">Encoding</a></span> <i>e</i> )</h3>
<p>Sets the encoding of this stream to <i>e</i>, where <i>e</i> is one of the following values:</p>
<table class="generic">
<thead><tr class="qt-style"><th >Encoding</th><th >Meaning</th></tr></thead>
<tr valign="top" class="odd"><td >Locale</td><td >Uses local file format (Latin1 if locale is not set), but autodetecting Unicode(utf16) on input.</td></tr>
<tr valign="top" class="even"><td >Unicode</td><td >Uses Unicode(utf16) for input and output. Output will be written in the order most efficient for the current platform (i.e. the order used internally in <a href="qstring.html">QString</a>).</td></tr>
<tr valign="top" class="odd"><td ><a href="q3textstream.html#Encoding-enum">UnicodeUTF8</a></td><td >Using Unicode(utf8) for input and output. If you use it for input it will autodetect utf16 and use it instead of utf8.</td></tr>
<tr valign="top" class="even"><td >Latin1</td><td >ISO-8859-1. Will not autodetect utf16.</td></tr>
<tr valign="top" class="odd"><td ><a href="q3textstream.html#Encoding-enum">UnicodeNetworkOrder</a></td><td >Uses network order Unicode(utf16) for input and output. Useful when reading Unicode data that does not start with the byte order marker.</td></tr>
<tr valign="top" class="even"><td ><a href="q3textstream.html#Encoding-enum">UnicodeReverse</a></td><td >Uses reverse network order Unicode(utf16) for input and output. Useful when reading Unicode data that does not start with the byte order marker or when writing data that should be read by buggy Windows applications.</td></tr>
<tr valign="top" class="odd"><td ><a href="q3textstream.html#Encoding-enum">RawUnicode</a></td><td >Like Unicode, but does not write the byte order marker nor does it auto-detect the byte order. Useful only when writing to non-persistent storage used by a single process.</td></tr>
</table>
<p><tt>Locale</tt> and all Unicode encodings, except <tt>RawUnicode</tt>, will look at the first two bytes in an input stream to determine the byte order. The initial byte order marker will be stripped off before data is read.</p>
<p>Note that this function should be called before any data is read to or written from the stream.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="q3textstream.html#setCodec">setCodec</a>().</p>
<!-- @@@setEncoding -->
<!-- $$$setf[overload1]$$$setfint -->
<h3 class="fn"><a name="setf"></a><span class="type">int</span> Q3TextStream::<span class="name">setf</span> ( <span class="type">int</span> <i>bits</i> )</h3>
<p>Sets the stream flag bits <i>bits</i>. Returns the previous stream flags.</p>
<p>Equivalent to <tt>flags( flags() | bits )</tt>.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="q3textstream.html#unsetf">unsetf</a>().</p>
<!-- @@@setf -->
<!-- $$$setf$$$setfintint -->
<h3 class="fn"><a name="setf-2"></a><span class="type">int</span> Q3TextStream::<span class="name">setf</span> ( <span class="type">int</span> <i>bits</i>, <span class="type">int</span> <i>mask</i> )</h3>
<p>This is an overloaded function.</p>
<p>Sets the stream flag bits <i>bits</i> with a bit mask <i>mask</i>. Returns the previous stream flags.</p>
<p>Equivalent to <tt>flags( (flags() & ~mask) | (bits & mask) )</tt>.</p>
<p><b>See also </b><a href="q3textstream.html#setf">setf</a>() and <a href="q3textstream.html#unsetf">unsetf</a>().</p>
<!-- @@@setf -->
<!-- $$$skipWhiteSpace[overload1]$$$skipWhiteSpace -->
<h3 class="fn"><a name="skipWhiteSpace"></a><span class="type">void</span> Q3TextStream::<span class="name">skipWhiteSpace</span> ()</h3>
<p>Positions the read pointer at the first non-whitespace character.</p>
<p>This function was introduced in Qt 4.2.</p>
<!-- @@@skipWhiteSpace -->
<!-- $$$unsetDevice[overload1]$$$unsetDevice -->
<h3 class="fn"><a name="unsetDevice"></a><span class="type">void</span> Q3TextStream::<span class="name">unsetDevice</span> ()</h3>
<p>Unsets the IO device. Equivalent to setDevice( 0 ).</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="q3textstream.html#device">device</a>() and <a href="q3textstream.html#setDevice">setDevice</a>().</p>
<!-- @@@unsetDevice -->
<!-- $$$unsetf[overload1]$$$unsetfint -->
<h3 class="fn"><a name="unsetf"></a><span class="type">int</span> Q3TextStream::<span class="name">unsetf</span> ( <span class="type">int</span> <i>bits</i> )</h3>
<p>Clears the stream flag bits <i>bits</i>. Returns the previous stream flags.</p>
<p>Equivalent to <tt>flags( flags() & ~mask )</tt>.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="q3textstream.html#setf">setf</a>().</p>
<!-- @@@unsetf -->
<!-- $$$width[overload1]$$$width -->
<h3 class="fn"><a name="width"></a><span class="type">int</span> Q3TextStream::<span class="name">width</span> () const</h3>
<p>Returns the field width. The default value is 0.</p>
<p>This function was introduced in Qt 4.2.</p>
<!-- @@@width -->
<!-- $$$width$$$widthint -->
<h3 class="fn"><a name="width-2"></a><span class="type">int</span> Q3TextStream::<span class="name">width</span> ( <span class="type">int</span> <i>w</i> )</h3>
<p>This is an overloaded function.</p>
<p>Sets the field width to <i>w</i>. Returns the previous field width.</p>
<!-- @@@width -->
<!-- $$$writeRawBytes[overload1]$$$writeRawBytesconstchar*uint -->
<h3 class="fn"><a name="writeRawBytes"></a><span class="type">Q3TextStream</span> & Q3TextStream::<span class="name">writeRawBytes</span> ( const <span class="type">char</span> * <i>s</i>, <span class="type"><a href="qtglobal.html#uint-typedef">uint</a></span> <i>len</i> )</h3>
<p>Writes the <i>len</i> bytes from <i>s</i> to the stream and returns a reference to the stream.</p>
<p>Note that no encoding is done by this function.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="qiodevice-qt3.html#writeBlock" class="compat">QIODevice::writeBlock</a>().</p>
<!-- @@@writeRawBytes -->
<!-- $$$operator<<[overload1]$$$operator<<QChar -->
<h3 class="fn"><a name="operator-lt-lt"></a><span class="type">Q3TextStream</span> & Q3TextStream::<span class="name">operator<<</span> ( <span class="type"><a href="qchar.html">QChar</a></span> <i>c</i> )</h3>
<p>Writes character <tt>char</tt> to the stream and returns a reference to the stream.</p>
<p>The character <i>c</i> is assumed to be Latin1 encoded independent of the Encoding set for the <a href="q3textstream.html" class="compat">Q3TextStream</a>.</p>
<p>This function was introduced in Qt 4.2.</p>
<!-- @@@operator<< -->
<!-- $$$operator<<$$$operator<<char -->
<h3 class="fn"><a name="operator-lt-lt-2"></a><span class="type">Q3TextStream</span> & Q3TextStream::<span class="name">operator<<</span> ( <span class="type">char</span> <i>c</i> )</h3>
<p>This is an overloaded function.</p>
<p>Writes character <i>c</i> to the stream and returns a reference to the stream.</p>
<p>This function was introduced in Qt 4.2.</p>
<!-- @@@operator<< -->
<!-- $$$operator<<$$$operator<<signedshort -->
<h3 class="fn"><a name="operator-lt-lt-3"></a><span class="type">Q3TextStream</span> & Q3TextStream::<span class="name">operator<<</span> ( <span class="type">signed</span> <span class="type">short</span> <i>i</i> )</h3>
<p>This is an overloaded function.</p>
<p>Writes a <tt>short</tt> integer <i>i</i> to the stream and returns a reference to the stream.</p>
<p>This function was introduced in Qt 4.2.</p>
<!-- @@@operator<< -->
<!-- $$$operator<<$$$operator<<unsignedshort -->
<h3 class="fn"><a name="operator-lt-lt-4"></a><span class="type">Q3TextStream</span> & Q3TextStream::<span class="name">operator<<</span> ( <span class="type">unsigned</span> <span class="type">short</span> <i>i</i> )</h3>
<p>This is an overloaded function.</p>
<p>Writes an <tt>unsigned</tt> <tt>short</tt> integer <i>i</i> to the stream and returns a reference to the stream.</p>
<p>This function was introduced in Qt 4.2.</p>
<!-- @@@operator<< -->
<!-- $$$operator<<$$$operator<<signedint -->
<h3 class="fn"><a name="operator-lt-lt-5"></a><span class="type">Q3TextStream</span> & Q3TextStream::<span class="name">operator<<</span> ( <span class="type">signed</span> <span class="type">int</span> <i>i</i> )</h3>
<p>This is an overloaded function.</p>
<p>Writes an <tt>int</tt> <i>i</i> to the stream and returns a reference to the stream.</p>
<p>This function was introduced in Qt 4.2.</p>
<!-- @@@operator<< -->
<!-- $$$operator<<$$$operator<<unsignedint -->
<h3 class="fn"><a name="operator-lt-lt-6"></a><span class="type">Q3TextStream</span> & Q3TextStream::<span class="name">operator<<</span> ( <span class="type">unsigned</span> <span class="type">int</span> <i>i</i> )</h3>
<p>This is an overloaded function.</p>
<p>Writes an <tt>unsigned</tt> <tt>int</tt> <i>i</i> to the stream and returns a reference to the stream.</p>
<p>This function was introduced in Qt 4.2.</p>
<!-- @@@operator<< -->
<!-- $$$operator<<$$$operator<<signedlong -->
<h3 class="fn"><a name="operator-lt-lt-7"></a><span class="type">Q3TextStream</span> & Q3TextStream::<span class="name">operator<<</span> ( <span class="type">signed</span> <span class="type">long</span> <i>i</i> )</h3>
<p>This is an overloaded function.</p>
<p>Writes a <tt>long</tt> <tt>int</tt> <i>i</i> to the stream and returns a reference to the stream.</p>
<p>This function was introduced in Qt 4.2.</p>
<!-- @@@operator<< -->
<!-- $$$operator<<$$$operator<<unsignedlong -->
<h3 class="fn"><a name="operator-lt-lt-8"></a><span class="type">Q3TextStream</span> & Q3TextStream::<span class="name">operator<<</span> ( <span class="type">unsigned</span> <span class="type">long</span> <i>i</i> )</h3>
<p>This is an overloaded function.</p>
<p>Writes an <tt>unsigned</tt> <tt>long</tt> <tt>int</tt> <i>i</i> to the stream and returns a reference to the stream.</p>
<p>This function was introduced in Qt 4.2.</p>
<!-- @@@operator<< -->
<!-- $$$operator<<$$$operator<<float -->
<h3 class="fn"><a name="operator-lt-lt-9"></a><span class="type">Q3TextStream</span> & Q3TextStream::<span class="name">operator<<</span> ( <span class="type">float</span> <i>f</i> )</h3>
<p>This is an overloaded function.</p>
<p>Writes a <tt>float</tt> <i>f</i> to the stream and returns a reference to the stream.</p>
<p>This function was introduced in Qt 4.2.</p>
<!-- @@@operator<< -->
<!-- $$$operator<<$$$operator<<double -->
<h3 class="fn"><a name="operator-lt-lt-10"></a><span class="type">Q3TextStream</span> & Q3TextStream::<span class="name">operator<<</span> ( <span class="type">double</span> <i>f</i> )</h3>
<p>This is an overloaded function.</p>
<p>Writes a <tt>double</tt> <i>f</i> to the stream and returns a reference to the stream.</p>
<p>This function was introduced in Qt 4.2.</p>
<!-- @@@operator<< -->
<!-- $$$operator<<$$$operator<<constchar* -->
<h3 class="fn"><a name="operator-lt-lt-11"></a><span class="type">Q3TextStream</span> & Q3TextStream::<span class="name">operator<<</span> ( const <span class="type">char</span> * <i>s</i> )</h3>
<p>This is an overloaded function.</p>
<p>Writes a string to the stream and returns a reference to the stream.</p>
<p>The string <i>s</i> is assumed to be Latin1 encoded independent of the Encoding set for the <a href="q3textstream.html" class="compat">Q3TextStream</a>.</p>
<p>This function was introduced in Qt 4.2.</p>
<!-- @@@operator<< -->
<!-- $$$operator<<$$$operator<<constQ3CString& -->
<h3 class="fn"><a name="operator-lt-lt-12"></a><span class="type">Q3TextStream</span> & Q3TextStream::<span class="name">operator<<</span> ( const <span class="type"><a href="q3cstring.html">Q3CString</a></span> & <i>s</i> )</h3>
<p>This is an overloaded function.</p>
<p>Writes <i>s</i> to the stream and returns a reference to the stream.</p>
<p>The string <i>s</i> is assumed to be Latin1 encoded independent of the Encoding set for the <a href="q3textstream.html" class="compat">Q3TextStream</a>.</p>
<p>This function was introduced in Qt 4.2.</p>
<!-- @@@operator<< -->
<!-- $$$operator<<$$$operator<<constQString& -->
<h3 class="fn"><a name="operator-lt-lt-13"></a><span class="type">Q3TextStream</span> & Q3TextStream::<span class="name">operator<<</span> ( const <span class="type"><a href="qstring.html">QString</a></span> & <i>s</i> )</h3>
<p>This is an overloaded function.</p>
<p>Writes <i>s</i> to the stream and returns a reference to the stream.</p>
<p>This function was introduced in Qt 4.2.</p>
<!-- @@@operator<< -->
<!-- $$$operator<<$$$operator<<void* -->
<h3 class="fn"><a name="operator-lt-lt-14"></a><span class="type">Q3TextStream</span> & Q3TextStream::<span class="name">operator<<</span> ( <span class="type">void</span> * <i>ptr</i> )</h3>
<p>This is an overloaded function.</p>
<p>Writes a pointer to the stream and returns a reference to the stream.</p>
<p>The <i>ptr</i> is output as an unsigned long hexadecimal integer.</p>
<p>This function was introduced in Qt 4.2.</p>
<!-- @@@operator<< -->
<!-- $$$operator>>[overload1]$$$operator>>QChar& -->
<h3 class="fn"><a name="operator-gt-gt"></a><span class="type">Q3TextStream</span> & Q3TextStream::<span class="name">operator>></span> ( <span class="type"><a href="qchar.html">QChar</a></span> & <i>c</i> )</h3>
<p>Reads a char <i>c</i> from the stream and returns a reference to the stream. Note that whitespace is <i>not</i> skipped.</p>
<!-- @@@operator>> -->
<!-- $$$operator>>$$$operator>>char& -->
<h3 class="fn"><a name="operator-gt-gt-2"></a><span class="type">Q3TextStream</span> & Q3TextStream::<span class="name">operator>></span> ( <span class="type">char</span> & <i>c</i> )</h3>
<p>This is an overloaded function.</p>
<p>Reads a char <i>c</i> from the stream and returns a reference to the stream. Note that whitespace is skipped.</p>
<!-- @@@operator>> -->
<!-- $$$operator>>$$$operator>>signedshort& -->
<h3 class="fn"><a name="operator-gt-gt-3"></a><span class="type">Q3TextStream</span> & Q3TextStream::<span class="name">operator>></span> ( <span class="type">signed</span> <span class="type">short</span> & <i>i</i> )</h3>
<p>This is an overloaded function.</p>
<p>Reads a signed <tt>short</tt> integer <i>i</i> from the stream and returns a reference to the stream. See <a href="q3textstream.html#flags">flags</a>() for an explanation of the expected input format.</p>
<!-- @@@operator>> -->
<!-- $$$operator>>$$$operator>>unsignedshort& -->
<h3 class="fn"><a name="operator-gt-gt-4"></a><span class="type">Q3TextStream</span> & Q3TextStream::<span class="name">operator>></span> ( <span class="type">unsigned</span> <span class="type">short</span> & <i>i</i> )</h3>
<p>This is an overloaded function.</p>
<p>Reads an unsigned <tt>short</tt> integer <i>i</i> from the stream and returns a reference to the stream. See <a href="q3textstream.html#flags">flags</a>() for an explanation of the expected input format.</p>
<!-- @@@operator>> -->
<!-- $$$operator>>$$$operator>>signedint& -->
<h3 class="fn"><a name="operator-gt-gt-5"></a><span class="type">Q3TextStream</span> & Q3TextStream::<span class="name">operator>></span> ( <span class="type">signed</span> <span class="type">int</span> & <i>i</i> )</h3>
<p>This is an overloaded function.</p>
<p>Reads a signed <tt>int</tt> <i>i</i> from the stream and returns a reference to the stream. See <a href="q3textstream.html#flags">flags</a>() for an explanation of the expected input format.</p>
<!-- @@@operator>> -->
<!-- $$$operator>>$$$operator>>unsignedint& -->
<h3 class="fn"><a name="operator-gt-gt-6"></a><span class="type">Q3TextStream</span> & Q3TextStream::<span class="name">operator>></span> ( <span class="type">unsigned</span> <span class="type">int</span> & <i>i</i> )</h3>
<p>This is an overloaded function.</p>
<p>Reads an unsigned <tt>int</tt> <i>i</i> from the stream and returns a reference to the stream. See <a href="q3textstream.html#flags">flags</a>() for an explanation of the expected input format.</p>
<!-- @@@operator>> -->
<!-- $$$operator>>$$$operator>>signedlong& -->
<h3 class="fn"><a name="operator-gt-gt-7"></a><span class="type">Q3TextStream</span> & Q3TextStream::<span class="name">operator>></span> ( <span class="type">signed</span> <span class="type">long</span> & <i>i</i> )</h3>
<p>This is an overloaded function.</p>
<p>Reads a signed <tt>long</tt> int <i>i</i> from the stream and returns a reference to the stream. See <a href="q3textstream.html#flags">flags</a>() for an explanation of the expected input format.</p>
<!-- @@@operator>> -->
<!-- $$$operator>>$$$operator>>unsignedlong& -->
<h3 class="fn"><a name="operator-gt-gt-8"></a><span class="type">Q3TextStream</span> & Q3TextStream::<span class="name">operator>></span> ( <span class="type">unsigned</span> <span class="type">long</span> & <i>i</i> )</h3>
<p>This is an overloaded function.</p>
<p>Reads an unsigned <tt>long</tt> int <i>i</i> from the stream and returns a reference to the stream. See <a href="q3textstream.html#flags">flags</a>() for an explanation of the expected input format.</p>
<!-- @@@operator>> -->
<!-- $$$operator>>$$$operator>>float& -->
<h3 class="fn"><a name="operator-gt-gt-9"></a><span class="type">Q3TextStream</span> & Q3TextStream::<span class="name">operator>></span> ( <span class="type">float</span> & <i>f</i> )</h3>
<p>This is an overloaded function.</p>
<p>Reads a <tt>float</tt> <i>f</i> from the stream and returns a reference to the stream. See <a href="q3textstream.html#flags">flags</a>() for an explanation of the expected input format.</p>
<!-- @@@operator>> -->
<!-- $$$operator>>$$$operator>>double& -->
<h3 class="fn"><a name="operator-gt-gt-10"></a><span class="type">Q3TextStream</span> & Q3TextStream::<span class="name">operator>></span> ( <span class="type">double</span> & <i>f</i> )</h3>
<p>This is an overloaded function.</p>
<p>Reads a <tt>double</tt> <i>f</i> from the stream and returns a reference to the stream. See <a href="q3textstream.html#flags">flags</a>() for an explanation of the expected input format.</p>
<!-- @@@operator>> -->
<!-- $$$operator>>$$$operator>>char* -->
<h3 class="fn"><a name="operator-gt-gt-11"></a><span class="type">Q3TextStream</span> & Q3TextStream::<span class="name">operator>></span> ( <span class="type">char</span> * <i>s</i> )</h3>
<p>This is an overloaded function.</p>
<p>Reads a "word" from the stream into <i>s</i> and returns a reference to the stream.</p>
<p>A word consists of characters for which isspace() returns FALSE.</p>
<!-- @@@operator>> -->
<!-- $$$operator>>$$$operator>>QString& -->
<h3 class="fn"><a name="operator-gt-gt-12"></a><span class="type">Q3TextStream</span> & Q3TextStream::<span class="name">operator>></span> ( <span class="type"><a href="qstring.html">QString</a></span> & <i>str</i> )</h3>
<p>This is an overloaded function.</p>
<p>Reads a "word" from the stream into <i>str</i> and returns a reference to the stream.</p>
<p>A word consists of characters for which isspace() returns FALSE.</p>
<!-- @@@operator>> -->
<!-- $$$operator>>$$$operator>>Q3CString& -->
<h3 class="fn"><a name="operator-gt-gt-13"></a><span class="type">Q3TextStream</span> & Q3TextStream::<span class="name">operator>></span> ( <span class="type"><a href="q3cstring.html">Q3CString</a></span> & <i>str</i> )</h3>
<p>This is an overloaded function.</p>
<p>Reads a "word" from the stream into <i>str</i> and returns a reference to the stream.</p>
<p>A word consists of characters for which isspace() returns FALSE.</p>
<!-- @@@operator>> -->
</div>
<div class="ft">
<span></span>
</div>
</div>
<div class="footer">
<p>
<acronym title="Copyright">©</acronym> 2012 Nokia Corporation and/or its
subsidiaries. Documentation contributions included herein are the copyrights of
their respective owners.</p>
<br />
<p>
The documentation provided herein is licensed under the terms of the
<a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
License version 1.3</a> as published by the Free Software Foundation.</p>
<p>
Documentation sources may be obtained from <a href="http://www.qt-project.org">
www.qt-project.org</a>.</p>
<br />
<p>
Nokia, Qt and their respective logos are trademarks of Nokia Corporation
in Finland and/or other countries worldwide. All other trademarks are property
of their respective owners. <a title="Privacy Policy"
href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
</div>
</body>
</html>
|