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
|
<!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: wxDataOutputStream 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-methods">Public Member Functions</a> |
<a href="classwx_data_output_stream-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">wxDataOutputStream Class Reference<div class="ingroups"><a class="el" href="group__group__class__streams.html">Streams</a></div></div> </div>
</div><!--header-->
<div class="contents">
<p><code>#include <wx/datstrm.h></code></p>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>This class provides functions that write binary data types in a portable way. </p>
<p>Data can be written in either big-endian or little-endian format, little-endian being the default on all architectures but <a class="el" href="classwx_data_output_stream.html#a2e81f24ae13610bcc4adc566946a47d1" title="If be_order is true, all data will be written in big-endian order, e.g.">BigEndianOrdered()</a> can be used to change this. The default format for the floating point types is 80 bit "extended precision" unless <code>wxUSE_APPLE_IEEE</code> was turned off during the library compilation, in which case extended precision is not available at all. You can call <a class="el" href="classwx_data_output_stream.html#a4c5edb15cb2b5e1e16fcaeb3ccf91dfb" title="Disables the use of extended precision format for floating point numbers.">UseBasicPrecisions()</a> to change this and use the standard IEEE 754 32 bit single precision format for floats and standard 64 bit double precision format for doubles. This is recommended for the new code for better interoperability with other software that typically uses standard IEEE 754 formats for its data, the use of extended precision by default is solely due to backwards compatibility.</p>
<p>If you want to write data to text files (or streams) use <a class="el" href="classwx_text_output_stream.html" title="This class provides functions that write text data using an output stream, allowing you to write text...">wxTextOutputStream</a> instead.</p>
<p>The "<<" operator is overloaded and you can use this class like a standard C++ iostream. See <a class="el" href="classwx_data_input_stream.html" title="This class provides functions that read binary data types in a portable way.">wxDataInputStream</a> for its usage and caveats.</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__streams.html">Streams</a></span></div><dl class="section see"><dt>See Also</dt><dd><a class="el" href="classwx_data_input_stream.html" title="This class provides functions that read binary data types in a portable way.">wxDataInputStream</a> </dd></dl>
</div><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:a7fb37c717609de9f339321d186afe547"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_data_output_stream.html#a7fb37c717609de9f339321d186afe547">wxDataOutputStream</a> (<a class="el" href="classwx_output_stream.html">wxOutputStream</a> &stream, const <a class="el" href="classwx_m_b_conv.html">wxMBConv</a> &conv=wxConvUTF8)</td></tr>
<tr class="memdesc:a7fb37c717609de9f339321d186afe547"><td class="mdescLeft"> </td><td class="mdescRight">Constructs a datastream object from an output stream. <a href="#a7fb37c717609de9f339321d186afe547"></a><br/></td></tr>
<tr class="separator:a7fb37c717609de9f339321d186afe547"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8373bef51ad9b57f635ad6d66055ef65"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_data_output_stream.html#a8373bef51ad9b57f635ad6d66055ef65">~wxDataOutputStream</a> ()</td></tr>
<tr class="memdesc:a8373bef51ad9b57f635ad6d66055ef65"><td class="mdescLeft"> </td><td class="mdescRight">Destroys the <a class="el" href="classwx_data_output_stream.html" title="This class provides functions that write binary data types in a portable way.">wxDataOutputStream</a> object. <a href="#a8373bef51ad9b57f635ad6d66055ef65"></a><br/></td></tr>
<tr class="separator:a8373bef51ad9b57f635ad6d66055ef65"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2e81f24ae13610bcc4adc566946a47d1"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_data_output_stream.html#a2e81f24ae13610bcc4adc566946a47d1">BigEndianOrdered</a> (bool be_order)</td></tr>
<tr class="memdesc:a2e81f24ae13610bcc4adc566946a47d1"><td class="mdescLeft"> </td><td class="mdescRight">If <em>be_order</em> is <span class="literal">true</span>, all data will be written in big-endian order, e.g. <a href="#a2e81f24ae13610bcc4adc566946a47d1"></a><br/></td></tr>
<tr class="separator:a2e81f24ae13610bcc4adc566946a47d1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac77976709d7884b21d5afcab6857f53b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classwx_m_b_conv.html">wxMBConv</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_data_output_stream.html#ac77976709d7884b21d5afcab6857f53b">GetConv</a> () const </td></tr>
<tr class="memdesc:ac77976709d7884b21d5afcab6857f53b"><td class="mdescLeft"> </td><td class="mdescRight">Returns the current text conversion class used for writing strings. <a href="#ac77976709d7884b21d5afcab6857f53b"></a><br/></td></tr>
<tr class="separator:ac77976709d7884b21d5afcab6857f53b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3e585f43a9c1127d93316c5b9d1b3da8"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_data_output_stream.html#a3e585f43a9c1127d93316c5b9d1b3da8">SetConv</a> (const <a class="el" href="classwx_m_b_conv.html">wxMBConv</a> &conv)</td></tr>
<tr class="memdesc:a3e585f43a9c1127d93316c5b9d1b3da8"><td class="mdescLeft"> </td><td class="mdescRight">Sets the text conversion class used for writing strings. <a href="#a3e585f43a9c1127d93316c5b9d1b3da8"></a><br/></td></tr>
<tr class="separator:a3e585f43a9c1127d93316c5b9d1b3da8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4c5edb15cb2b5e1e16fcaeb3ccf91dfb"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_data_output_stream.html#a4c5edb15cb2b5e1e16fcaeb3ccf91dfb">UseBasicPrecisions</a> ()</td></tr>
<tr class="memdesc:a4c5edb15cb2b5e1e16fcaeb3ccf91dfb"><td class="mdescLeft"> </td><td class="mdescRight">Disables the use of extended precision format for floating point numbers. <a href="#a4c5edb15cb2b5e1e16fcaeb3ccf91dfb"></a><br/></td></tr>
<tr class="separator:a4c5edb15cb2b5e1e16fcaeb3ccf91dfb"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3567889a28566ece070de26a4af6d084"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_data_output_stream.html#a3567889a28566ece070de26a4af6d084">UseExtendedPrecision</a> ()</td></tr>
<tr class="memdesc:a3567889a28566ece070de26a4af6d084"><td class="mdescLeft"> </td><td class="mdescRight">Explicitly request the use of extended precision for floating point numbers. <a href="#a3567889a28566ece070de26a4af6d084"></a><br/></td></tr>
<tr class="separator:a3567889a28566ece070de26a4af6d084"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a51e3e2bafdd4023dfa216c27993603f0"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_data_output_stream.html#a51e3e2bafdd4023dfa216c27993603f0">Write8</a> (<a class="el" href="defs_8h.html#aad88e290b822df511ad8025ee2e45263">wxUint8</a> i8)</td></tr>
<tr class="memdesc:a51e3e2bafdd4023dfa216c27993603f0"><td class="mdescLeft"> </td><td class="mdescRight">Writes the single byte <em>i8</em> to the stream. <a href="#a51e3e2bafdd4023dfa216c27993603f0"></a><br/></td></tr>
<tr class="separator:a51e3e2bafdd4023dfa216c27993603f0"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af5edf80d17cf04c0de64b3cf45c8e4be"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_data_output_stream.html#af5edf80d17cf04c0de64b3cf45c8e4be">Write8</a> (const <a class="el" href="defs_8h.html#aad88e290b822df511ad8025ee2e45263">wxUint8</a> *buffer, size_t size)</td></tr>
<tr class="memdesc:af5edf80d17cf04c0de64b3cf45c8e4be"><td class="mdescLeft"> </td><td class="mdescRight">Writes an array of bytes to the stream. <a href="#af5edf80d17cf04c0de64b3cf45c8e4be"></a><br/></td></tr>
<tr class="separator:af5edf80d17cf04c0de64b3cf45c8e4be"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a71b069b0ae19f613c1f14214790c7f62"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_data_output_stream.html#a71b069b0ae19f613c1f14214790c7f62">Write16</a> (<a class="el" href="defs_8h.html#a8e9363c460a79dd550df544fab96e16d">wxUint16</a> i16)</td></tr>
<tr class="memdesc:a71b069b0ae19f613c1f14214790c7f62"><td class="mdescLeft"> </td><td class="mdescRight">Writes the 16 bit unsigned integer <em>i16</em> to the stream. <a href="#a71b069b0ae19f613c1f14214790c7f62"></a><br/></td></tr>
<tr class="separator:a71b069b0ae19f613c1f14214790c7f62"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7f9993d71c30a18cc75daa82d1bbd7f9"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_data_output_stream.html#a7f9993d71c30a18cc75daa82d1bbd7f9">Write16</a> (const <a class="el" href="defs_8h.html#a8e9363c460a79dd550df544fab96e16d">wxUint16</a> *buffer, size_t size)</td></tr>
<tr class="memdesc:a7f9993d71c30a18cc75daa82d1bbd7f9"><td class="mdescLeft"> </td><td class="mdescRight">Writes an array of 16 bit unsigned integer to the stream. <a href="#a7f9993d71c30a18cc75daa82d1bbd7f9"></a><br/></td></tr>
<tr class="separator:a7f9993d71c30a18cc75daa82d1bbd7f9"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8ed33d4489e1c9e477b3ebd4cba17e0b"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_data_output_stream.html#a8ed33d4489e1c9e477b3ebd4cba17e0b">Write32</a> (<a class="el" href="defs_8h.html#afdb12e5345c3fae4b537e813df9f02a3">wxUint32</a> i32)</td></tr>
<tr class="memdesc:a8ed33d4489e1c9e477b3ebd4cba17e0b"><td class="mdescLeft"> </td><td class="mdescRight">Writes the 32 bit unsigned integer <em>i32</em> to the stream. <a href="#a8ed33d4489e1c9e477b3ebd4cba17e0b"></a><br/></td></tr>
<tr class="separator:a8ed33d4489e1c9e477b3ebd4cba17e0b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:acd99b68c389f6d8bd0f9dfb09a53ed87"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_data_output_stream.html#acd99b68c389f6d8bd0f9dfb09a53ed87">Write32</a> (const <a class="el" href="defs_8h.html#afdb12e5345c3fae4b537e813df9f02a3">wxUint32</a> *buffer, size_t size)</td></tr>
<tr class="memdesc:acd99b68c389f6d8bd0f9dfb09a53ed87"><td class="mdescLeft"> </td><td class="mdescRight">Writes an array of 32 bit unsigned integer to the stream. <a href="#acd99b68c389f6d8bd0f9dfb09a53ed87"></a><br/></td></tr>
<tr class="separator:acd99b68c389f6d8bd0f9dfb09a53ed87"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab603dcaeb8a41c109d95799a7e44dc0f"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_data_output_stream.html#ab603dcaeb8a41c109d95799a7e44dc0f">Write64</a> (<a class="el" href="defs_8h.html#a356b5511a759210b8138b6433ed8b1fc">wxUint64</a> i64)</td></tr>
<tr class="memdesc:ab603dcaeb8a41c109d95799a7e44dc0f"><td class="mdescLeft"> </td><td class="mdescRight">Writes the 64 bit unsigned integer <em>i64</em> to the stream. <a href="#ab603dcaeb8a41c109d95799a7e44dc0f"></a><br/></td></tr>
<tr class="separator:ab603dcaeb8a41c109d95799a7e44dc0f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab79689966c8f09118c5fdfbcf98f90c0"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_data_output_stream.html#ab79689966c8f09118c5fdfbcf98f90c0">Write64</a> (const <a class="el" href="defs_8h.html#a356b5511a759210b8138b6433ed8b1fc">wxUint64</a> *buffer, size_t size)</td></tr>
<tr class="memdesc:ab79689966c8f09118c5fdfbcf98f90c0"><td class="mdescLeft"> </td><td class="mdescRight">Writes an array of 64 bit unsigned integer to the stream. <a href="#ab79689966c8f09118c5fdfbcf98f90c0"></a><br/></td></tr>
<tr class="separator:ab79689966c8f09118c5fdfbcf98f90c0"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad3abc552c947509c7f0b69d9449abbe4"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_data_output_stream.html#ad3abc552c947509c7f0b69d9449abbe4">WriteFloat</a> (float f)</td></tr>
<tr class="memdesc:ad3abc552c947509c7f0b69d9449abbe4"><td class="mdescLeft"> </td><td class="mdescRight">Writes the float <em>f</em> to the stream. <a href="#ad3abc552c947509c7f0b69d9449abbe4"></a><br/></td></tr>
<tr class="separator:ad3abc552c947509c7f0b69d9449abbe4"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac05b830a50acb4929c18807b518612af"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_data_output_stream.html#ac05b830a50acb4929c18807b518612af">WriteFloat</a> (const float *buffer, size_t size)</td></tr>
<tr class="memdesc:ac05b830a50acb4929c18807b518612af"><td class="mdescLeft"> </td><td class="mdescRight">Writes an array of float to the stream. <a href="#ac05b830a50acb4929c18807b518612af"></a><br/></td></tr>
<tr class="separator:ac05b830a50acb4929c18807b518612af"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac4446de313514ca452c5adf75f13964c"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_data_output_stream.html#ac4446de313514ca452c5adf75f13964c">WriteDouble</a> (double d)</td></tr>
<tr class="memdesc:ac4446de313514ca452c5adf75f13964c"><td class="mdescLeft"> </td><td class="mdescRight">Writes the double <em>d</em> to the stream. <a href="#ac4446de313514ca452c5adf75f13964c"></a><br/></td></tr>
<tr class="separator:ac4446de313514ca452c5adf75f13964c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6c7a2a4f07cc05b391cf0fe8a726fba5"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_data_output_stream.html#a6c7a2a4f07cc05b391cf0fe8a726fba5">WriteDouble</a> (const double *buffer, size_t size)</td></tr>
<tr class="memdesc:a6c7a2a4f07cc05b391cf0fe8a726fba5"><td class="mdescLeft"> </td><td class="mdescRight">Writes an array of double to the stream. <a href="#a6c7a2a4f07cc05b391cf0fe8a726fba5"></a><br/></td></tr>
<tr class="separator:a6c7a2a4f07cc05b391cf0fe8a726fba5"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad59954476921dd0f4a480e4d212ed61a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_data_output_stream.html#ad59954476921dd0f4a480e4d212ed61a">WriteString</a> (const <a class="el" href="classwx_string.html">wxString</a> &string)</td></tr>
<tr class="memdesc:ad59954476921dd0f4a480e4d212ed61a"><td class="mdescLeft"> </td><td class="mdescRight">Writes <em>string</em> to the stream. <a href="#ad59954476921dd0f4a480e4d212ed61a"></a><br/></td></tr>
<tr class="separator:ad59954476921dd0f4a480e4d212ed61a"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<h2 class="groupheader">Constructor & Destructor Documentation</h2>
<a class="anchor" id="a7fb37c717609de9f339321d186afe547"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">wxDataOutputStream::wxDataOutputStream </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classwx_output_stream.html">wxOutputStream</a> & </td>
<td class="paramname"><em>stream</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classwx_m_b_conv.html">wxMBConv</a> & </td>
<td class="paramname"><em>conv</em> = <code>wxConvUTF8</code> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructs a datastream object from an output stream. </p>
<p>Only write methods will be available.</p>
<p>Note that the <em>conv</em> parameter is only available in Unicode builds of wxWidgets.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">stream</td><td>The output stream. </td></tr>
<tr><td class="paramname">conv</td><td>Charset conversion object used to encoding Unicode strings before writing them to the stream in Unicode mode (see <a class="el" href="classwx_data_output_stream.html#ad59954476921dd0f4a480e4d212ed61a" title="Writes string to the stream.">WriteString()</a> for a detailed description). Note that you must not destroy <em>conv</em> before you destroy this <a class="el" href="classwx_data_output_stream.html" title="This class provides functions that write binary data types in a portable way.">wxDataOutputStream</a> instance! It is recommended to use the default value (UTF-8). </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a8373bef51ad9b57f635ad6d66055ef65"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">wxDataOutputStream::~wxDataOutputStream </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Destroys the <a class="el" href="classwx_data_output_stream.html" title="This class provides functions that write binary data types in a portable way.">wxDataOutputStream</a> object. </p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a2e81f24ae13610bcc4adc566946a47d1"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wxDataOutputStream::BigEndianOrdered </td>
<td>(</td>
<td class="paramtype">bool </td>
<td class="paramname"><em>be_order</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>If <em>be_order</em> is <span class="literal">true</span>, all data will be written in big-endian order, e.g. </p>
<p>for reading on a Sparc or from Java-Streams (which always use big-endian order), otherwise data will be written in little-endian order. </p>
</div>
</div>
<a class="anchor" id="ac77976709d7884b21d5afcab6857f53b"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classwx_m_b_conv.html">wxMBConv</a>* wxDataOutputStream::GetConv </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the current text conversion class used for writing strings. </p>
</div>
</div>
<a class="anchor" id="a3e585f43a9c1127d93316c5b9d1b3da8"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wxDataOutputStream::SetConv </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classwx_m_b_conv.html">wxMBConv</a> & </td>
<td class="paramname"><em>conv</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the text conversion class used for writing strings. </p>
</div>
</div>
<a class="anchor" id="a4c5edb15cb2b5e1e16fcaeb3ccf91dfb"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wxDataOutputStream::UseBasicPrecisions </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Disables the use of extended precision format for floating point numbers. </p>
<p>This method disables the use of 80 bit extended precision format for the <code>float</code> and <code>double</code> values written to the stream, which is used by default (unless <code>wxUSE_APPLE_IEEE</code> was set to <code>0</code> when building the library, in which case the extended format support is not available at all and this function does nothing).</p>
<p>After calling it, <code>float</code> values will be written out in one of IEEE 754 "basic formats", i.e. 32 bit single precision format for floats and 64 bit double precision format for doubles.</p>
<dl class="section since"><dt>Since</dt><dd>2.9.5 </dd></dl>
</div>
</div>
<a class="anchor" id="a3567889a28566ece070de26a4af6d084"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wxDataOutputStream::UseExtendedPrecision </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Explicitly request the use of extended precision for floating point numbers. </p>
<p>This function allows the application code to explicitly request the use of 80 bit extended precision format for the floating point numbers. This is the case by default but using this function explicitly ensures that the compilation of code relying on producing the output stream using extended precision would fail when using a version of wxWidgets compiled with <code>wxUSE_APPLE_IEEE==0</code> and so not supporting this format at all.</p>
<dl class="section since"><dt>Since</dt><dd>2.9.5 </dd></dl>
</div>
</div>
<a class="anchor" id="a71b069b0ae19f613c1f14214790c7f62"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wxDataOutputStream::Write16 </td>
<td>(</td>
<td class="paramtype"><a class="el" href="defs_8h.html#a8e9363c460a79dd550df544fab96e16d">wxUint16</a> </td>
<td class="paramname"><em>i16</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Writes the 16 bit unsigned integer <em>i16</em> to the stream. </p>
</div>
</div>
<a class="anchor" id="a7f9993d71c30a18cc75daa82d1bbd7f9"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wxDataOutputStream::Write16 </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="defs_8h.html#a8e9363c460a79dd550df544fab96e16d">wxUint16</a> * </td>
<td class="paramname"><em>buffer</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>size</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Writes an array of 16 bit unsigned integer to the stream. </p>
<p>The number of 16 bit unsigned integer to write is specified with the <em>size</em> variable. </p>
</div>
</div>
<a class="anchor" id="a8ed33d4489e1c9e477b3ebd4cba17e0b"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wxDataOutputStream::Write32 </td>
<td>(</td>
<td class="paramtype"><a class="el" href="defs_8h.html#afdb12e5345c3fae4b537e813df9f02a3">wxUint32</a> </td>
<td class="paramname"><em>i32</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Writes the 32 bit unsigned integer <em>i32</em> to the stream. </p>
</div>
</div>
<a class="anchor" id="acd99b68c389f6d8bd0f9dfb09a53ed87"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wxDataOutputStream::Write32 </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="defs_8h.html#afdb12e5345c3fae4b537e813df9f02a3">wxUint32</a> * </td>
<td class="paramname"><em>buffer</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>size</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Writes an array of 32 bit unsigned integer to the stream. </p>
<p>The number of 32 bit unsigned integer to write is specified with the <em>size</em> variable. </p>
</div>
</div>
<a class="anchor" id="ab603dcaeb8a41c109d95799a7e44dc0f"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wxDataOutputStream::Write64 </td>
<td>(</td>
<td class="paramtype"><a class="el" href="defs_8h.html#a356b5511a759210b8138b6433ed8b1fc">wxUint64</a> </td>
<td class="paramname"><em>i64</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Writes the 64 bit unsigned integer <em>i64</em> to the stream. </p>
</div>
</div>
<a class="anchor" id="ab79689966c8f09118c5fdfbcf98f90c0"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wxDataOutputStream::Write64 </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="defs_8h.html#a356b5511a759210b8138b6433ed8b1fc">wxUint64</a> * </td>
<td class="paramname"><em>buffer</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>size</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Writes an array of 64 bit unsigned integer to the stream. </p>
<p>The number of 64 bit unsigned integer to write is specified with the <em>size</em> variable. </p>
</div>
</div>
<a class="anchor" id="a51e3e2bafdd4023dfa216c27993603f0"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wxDataOutputStream::Write8 </td>
<td>(</td>
<td class="paramtype"><a class="el" href="defs_8h.html#aad88e290b822df511ad8025ee2e45263">wxUint8</a> </td>
<td class="paramname"><em>i8</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Writes the single byte <em>i8</em> to the stream. </p>
</div>
</div>
<a class="anchor" id="af5edf80d17cf04c0de64b3cf45c8e4be"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wxDataOutputStream::Write8 </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="defs_8h.html#aad88e290b822df511ad8025ee2e45263">wxUint8</a> * </td>
<td class="paramname"><em>buffer</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>size</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Writes an array of bytes to the stream. </p>
<p>The number of bytes to write is specified with the <em>size</em> variable. </p>
</div>
</div>
<a class="anchor" id="ac4446de313514ca452c5adf75f13964c"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wxDataOutputStream::WriteDouble </td>
<td>(</td>
<td class="paramtype">double </td>
<td class="paramname"><em>d</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Writes the double <em>d</em> to the stream. </p>
<p>The output format is either 80 bit extended precision or, if <a class="el" href="classwx_data_output_stream.html#a4c5edb15cb2b5e1e16fcaeb3ccf91dfb" title="Disables the use of extended precision format for floating point numbers.">UseBasicPrecisions()</a> had been called, standard IEEE 754 64 bit double precision. </p>
</div>
</div>
<a class="anchor" id="a6c7a2a4f07cc05b391cf0fe8a726fba5"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wxDataOutputStream::WriteDouble </td>
<td>(</td>
<td class="paramtype">const double * </td>
<td class="paramname"><em>buffer</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>size</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Writes an array of double to the stream. </p>
<p>The number of doubles to write is specified by the <em>size</em> variable. </p>
</div>
</div>
<a class="anchor" id="ad3abc552c947509c7f0b69d9449abbe4"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wxDataOutputStream::WriteFloat </td>
<td>(</td>
<td class="paramtype">float </td>
<td class="paramname"><em>f</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Writes the float <em>f</em> to the stream. </p>
<p>If <a class="el" href="classwx_data_output_stream.html#a4c5edb15cb2b5e1e16fcaeb3ccf91dfb" title="Disables the use of extended precision format for floating point numbers.">UseBasicPrecisions()</a> had been called, the value is written out using the standard IEEE 754 32 bit single precision format. Otherwise, this method uses the same format as <a class="el" href="classwx_data_output_stream.html#ac4446de313514ca452c5adf75f13964c" title="Writes the double d to the stream.">WriteDouble()</a>, i.e. 80 bit extended precision representation.</p>
<dl class="section since"><dt>Since</dt><dd>2.9.5 </dd></dl>
</div>
</div>
<a class="anchor" id="ac05b830a50acb4929c18807b518612af"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wxDataOutputStream::WriteFloat </td>
<td>(</td>
<td class="paramtype">const float * </td>
<td class="paramname"><em>buffer</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>size</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Writes an array of float to the stream. </p>
<p>The number of floats to write is specified by the <em>size</em> variable.</p>
<dl class="section since"><dt>Since</dt><dd>2.9.5 </dd></dl>
</div>
</div>
<a class="anchor" id="ad59954476921dd0f4a480e4d212ed61a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wxDataOutputStream::WriteString </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classwx_string.html">wxString</a> & </td>
<td class="paramname"><em>string</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Writes <em>string</em> to the stream. </p>
<p>Actually, this method writes the size of the string before writing <em>string</em> itself.</p>
<p>In ANSI build of wxWidgets, the string is written to the stream in exactly same way it is represented in memory. In Unicode build, however, the string is first converted to multibyte representation with <em>conv</em> object passed to stream's constructor (consequently, ANSI applications can read data written by Unicode application, as long as they agree on encoding) and this representation is written to the stream. UTF-8 is used by default. </p>
</div>
</div>
</div><!-- contents -->
<address class="footer">
<small>
Generated on Thu Nov 27 2014 13:46:45 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>
|