/usr/share/doc/libucommon-dev/a00057.html is in libucommon-doc 3.2.0-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 | <!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"/>
<title>UCommon: ucc::IOBuffer Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.3 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="main.html"><span>Main Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Data Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Data Structures</span></a></li>
<li><a href="classes.html"><span>Data Structure Index</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Data Fields</span></a></li>
</ul>
</div>
<div class="navpath"><a class="el" href="a00214.html">ucc</a>::<a class="el" href="a00057.html">IOBuffer</a>
</div>
</div>
<div class="contents">
<h1>ucc::IOBuffer Class Reference</h1><!-- doxytag: class="ucc::IOBuffer" -->
<p>Common buffered I/O class.
<a href="#_details">More...</a></p>
<p><code>#include <<a class="el" href="a00189_source.html">buffer.h</a>></code></p>
<div class="dynheader">
Inheritance diagram for ucc::IOBuffer:</div>
<div class="dynsection">
<div class="center"><img src="a00397.png" border="0" usemap="#ucc_1_1_i_o_buffer_inherit__map" alt="Inheritance graph"/></div>
<map name="ucc_1_1_i_o_buffer_inherit__map" id="ucc_1_1_i_o_buffer_inherit__map">
<area shape="rect" id="node3" href="a00054.html" title="A generic file streaming class built from the I/O buffer." alt="" coords="5,83,80,112"/><area shape="rect" id="node5" href="a00146.html" title="Process pipe with I/O buffering." alt="" coords="104,83,224,112"/><area shape="rect" id="node7" href="a00162.html" title="A generic tcp socket class that offers i/o buffering." alt="" coords="248,83,365,112"/><area shape="rect" id="node9" href="a00154.html" title="Secure socket class." alt="" coords="255,160,359,189"/></map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Types</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><b>type_t</b> { <b>BUF_RD</b>,
<b>BUF_WR</b>,
<b>BUF_RDWR</b>
}</td></tr>
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad95528e45a63ae461eb0674645cd41d7"></a><!-- doxytag: member="ucc::IOBuffer::clear" ref="ad95528e45a63ae461eb0674645cd41d7" args="(void)" -->
void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#ad95528e45a63ae461eb0674645cd41d7">clear</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Clear last error state. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#ac1395cc623ff847a748f51932750c688">eof</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Check if at end of input. <a href="#ac1395cc623ff847a748f51932750c688"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#a2de76aed9104fe128c8a753872fc02f8">err</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get last error associated with a failed operation. <a href="#a2de76aed9104fe128c8a753872fc02f8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#a6c0d513e2c85ee1aa52f7db1c5355685">flush</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Flush buffered memory to physical I/O. <a href="#a6c0d513e2c85ee1aa52f7db1c5355685"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#ab8c807f7a07f28ce6c20b063f51e0b5e">getch</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get a character from the buffer. <a href="#ab8c807f7a07f28ce6c20b063f51e0b5e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#a690a7aa4232d218b76fc4497026fe04a">getline</a> (char *<a class="el" href="a00157.html">string</a>, size_t size)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get a string as a line of input from the buffer. <a href="#a690a7aa4232d218b76fc4497026fe04a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#a923a8684a00314f3e8e02f3f40e8be0b">getstr</a> (char *address, size_t count)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get memory from the buffer. <a href="#a923a8684a00314f3e8e02f3f40e8be0b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#a953213c59a9d4cd28252d3f91ce89182">isinput</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">See if input active. <a href="#a953213c59a9d4cd28252d3f91ce89182"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#a1e964d175adae6bb13b9f79611fa081b">isopen</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">See if buffer open. <a href="#a1e964d175adae6bb13b9f79611fa081b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#a0cdbc447b10f0e190f1821bf9b0b0a8e">isoutput</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">See if output active. <a href="#a0cdbc447b10f0e190f1821bf9b0b0a8e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#aede708848660ee8deab7faf9178471f0">operator bool</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">See if buffer open. <a href="#aede708848660ee8deab7faf9178471f0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#a6326bc08726bc9b8e777cfff32b35194">operator!</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">See if buffer closed. <a href="#a6326bc08726bc9b8e777cfff32b35194"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#af74ba2a42576801ceaab76eee3fbef66">pending</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">See if data is pending. <a href="#af74ba2a42576801ceaab76eee3fbef66"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#a79f89dfad7aeb01f4d2d1a29e859efa3">printf</a> (const char *format,...)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Print formatted string to the buffer. <a href="#a79f89dfad7aeb01f4d2d1a29e859efa3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6851de58c275494cb9fd19164eee5428"></a><!-- doxytag: member="ucc::IOBuffer::purge" ref="a6851de58c275494cb9fd19164eee5428" args="(void)" -->
void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#a6851de58c275494cb9fd19164eee5428">purge</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Purge any pending input or output buffer data. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#af630da18a02def8d6ed6a42f426023af">putch</a> (int ch)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Put a character into the buffer. <a href="#af630da18a02def8d6ed6a42f426023af"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#abeb5c89b1c72283acd093c1b8d0010aa">putline</a> (const char *<a class="el" href="a00157.html">string</a>)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Put a string as a line of output to the buffer. <a href="#abeb5c89b1c72283acd093c1b8d0010aa"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#a34ac0a666f64ff52fabcbf43fee7a2a2">putstr</a> (const char *address, size_t count=0)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Put memory into the buffer. <a href="#a34ac0a666f64ff52fabcbf43fee7a2a2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#a76309b607fd7327aaa1125af0b6c0af5">read</a> (char *address, size_t size)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Method to read input data from the buffer. <a href="#a76309b607fd7327aaa1125af0b6c0af5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#a637976c9c2c4a3bcbcee32ef69f03c1f">read</a> (<a class="el" href="a00157.html">String</a> &<a class="el" href="a00157.html">string</a>)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Method to read a line of input from the buffer. <a href="#a637976c9c2c4a3bcbcee32ef69f03c1f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#a02985449e23957432bb2ac6ed1433c1b">readln</a> (char *address, size_t size)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Method to read a line of input from the buffer. <a href="#a02985449e23957432bb2ac6ed1433c1b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#a6aee71e03faf569b1e74415011f4c941">reset</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Reset input buffer state. <a href="#a6aee71e03faf569b1e74415011f4c941"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a72084f8f3993b26aa0e16fe347aeb545"></a><!-- doxytag: member="ucc::IOBuffer::seteof" ref="a72084f8f3993b26aa0e16fe347aeb545" args="(void)" -->
void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#a72084f8f3993b26aa0e16fe347aeb545">seteof</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set eof flag. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#a3193a7d69a22e228845ddf519256d2a1">write</a> (<a class="el" href="a00157.html">String</a> &<a class="el" href="a00157.html">string</a>)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Method to write a string object. <a href="#a3193a7d69a22e228845ddf519256d2a1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#af678f2b46cfb64414964c49dc5ac2acf">write</a> (const char *address, size_t size)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Method to write memory to the buffer. <a href="#af678f2b46cfb64414964c49dc5ac2acf"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#ad9ce673f267215a09b40a209e6ed047b">writeln</a> (const char *<a class="el" href="a00157.html">string</a>)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Method to write a null terminated string. <a href="#ad9ce673f267215a09b40a209e6ed047b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#a7fa1a785b4b27a70b7bb8b3e741b0579">writes</a> (const char *<a class="el" href="a00157.html">string</a>)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Method to write a null terminated string. <a href="#a7fa1a785b4b27a70b7bb8b3e741b0579"></a><br/></td></tr>
<tr><td colspan="2"><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a54ca57f898df1ba47a94292060e9a278"></a><!-- doxytag: member="ucc::IOBuffer::_buffering" ref="a54ca57f898df1ba47a94292060e9a278" args="(void)" -->
size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#a54ca57f898df1ba47a94292060e9a278">_buffering</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get size of the I/O buffer. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#aae9e5fdd50a3f75b22f88d5eeafa1b96">_pending</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get current input position. <a href="#aae9e5fdd50a3f75b22f88d5eeafa1b96"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#ad6089d06f36137661b2f0c37943a4187">_pull</a> (char *address, size_t size)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Method to pull buffer from physical i/o (read). <a href="#ad6089d06f36137661b2f0c37943a4187"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#abe10b39c40a9cc0ba70b9e025dec072a">_push</a> (const char *address, size_t size)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Method to push buffer into physical i/o (write). <a href="#abe10b39c40a9cc0ba70b9e025dec072a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#a4de49cb64116d5f6148bcd33fff89bf2">_waiting</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get current output position. <a href="#a4de49cb64116d5f6148bcd33fff89bf2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#a8ef19c099d1a7c8fa3c31d478fe5efd9">allocate</a> (size_t size, type_t access=BUF_RDWR)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Allocate I/O buffer(s) of specified size. <a href="#a8ef19c099d1a7c8fa3c31d478fe5efd9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#a23df62cbd48e0b8211926c3ad179d558">gather</a> (size_t size)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Gather returns a pointer to contigues input of specified size. <a href="#a23df62cbd48e0b8211926c3ad179d558"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#af7461f618309b22f3fee4284c01277f0">IOBuffer</a> (size_t size, type_t access=BUF_RDWR)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct a buffer of pre-allocated size and access type. <a href="#af7461f618309b22f3fee4284c01277f0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a02b0ff9de69ccb277927df752577153a"></a><!-- doxytag: member="ucc::IOBuffer::IOBuffer" ref="a02b0ff9de69ccb277927df752577153a" args="()" -->
</td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#a02b0ff9de69ccb277927df752577153a">IOBuffer</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct an empty (unallocated) buffer. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac61f4cc324a744be8bc78f012a8c2565"></a><!-- doxytag: member="ucc::IOBuffer::release" ref="ac61f4cc324a744be8bc78f012a8c2565" args="(void)" -->
void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#ac61f4cc324a744be8bc78f012a8c2565">release</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Release (free) buffer memory. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#a23b92d15215d9a2d40b402a87a1461b2">request</a> (size_t size)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Request workspace in output buffer. <a href="#a23b92d15215d9a2d40b402a87a1461b2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#a8eeebeb2b534948cb45dabae7b7eebec">seteol</a> (const char *<a class="el" href="a00157.html">string</a>)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set end of line marker. <a href="#a8eeebeb2b534948cb45dabae7b7eebec"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9a0d385c1fe97c7768b620fb06986950"></a><!-- doxytag: member="ucc::IOBuffer::~IOBuffer" ref="a9a0d385c1fe97c7768b620fb06986950" args="()" -->
</td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#a9a0d385c1fe97c7768b620fb06986950">~IOBuffer</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroy object by releasing buffer memory. <br/></td></tr>
<tr><td colspan="2"><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad72618b87bf18ca6bb76e7186d90e1a3"></a><!-- doxytag: member="ucc::IOBuffer::format" ref="ad72618b87bf18ca6bb76e7186d90e1a3" args="" -->
const char * </td><td class="memItemRight" valign="bottom"><b>format</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abbd382a99deed0900e401206c669ff71"></a><!-- doxytag: member="ucc::IOBuffer::ioerror" ref="abbd382a99deed0900e401206c669ff71" args="" -->
int </td><td class="memItemRight" valign="bottom"><b>ioerror</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2848abaa2ed8d73a87f134c8b272afb6"></a><!-- doxytag: member="ucc::IOBuffer::timeout" ref="a2848abaa2ed8d73a87f134c8b272afb6" args="" -->
<a class="el" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c">timeout_t</a> </td><td class="memItemRight" valign="bottom"><b>timeout</b></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Common buffered I/O class. </p>
<p>This is used to create objects which will stream character data as needed. This class can support bidrectionalal streaming as may be needed for serial devices, sockets, and pipes. The buffering mechanisms are hidden from derived classes, and two virtuals are used to communicate with the physical transport. </p>
<dl class="author"><dt><b>Author:</b></dt><dd>David Sugar <<a href="mailto:dyfet@gnutelephony.org">dyfet@gnutelephony.org</a>> </dd></dl>
<p>Definition at line <a class="el" href="a00189_source.html#l00054">54</a> of file <a class="el" href="a00189_source.html">buffer.h</a>.</p>
<hr/><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" id="af7461f618309b22f3fee4284c01277f0"></a><!-- doxytag: member="ucc::IOBuffer::IOBuffer" ref="af7461f618309b22f3fee4284c01277f0" args="(size_t size, type_t access=BUF_RDWR)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ucc::IOBuffer::IOBuffer </td>
<td>(</td>
<td class="paramtype">size_t </td>
<td class="paramname"> <em>size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">type_t </td>
<td class="paramname"> <em>access</em> = <code>BUF_RDWR</code></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Construct a buffer of pre-allocated size and access type. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>size</em> </td><td>of buffer to allocate. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>access</em> </td><td>mode of buffer. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="aae9e5fdd50a3f75b22f88d5eeafa1b96"></a><!-- doxytag: member="ucc::IOBuffer::_pending" ref="aae9e5fdd50a3f75b22f88d5eeafa1b96" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">size_t ucc::IOBuffer::_pending </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td>
<td> ) </td>
<td><code> [inline, protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get current input position. </p>
<p>Sometimes used to help compute and report a "tell" offset. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>offset of input buffer. </dd></dl>
<p>Definition at line <a class="el" href="a00189_source.html#l00151">151</a> of file <a class="el" href="a00189_source.html">buffer.h</a>.</p>
</div>
</div>
<a class="anchor" id="ad6089d06f36137661b2f0c37943a4187"></a><!-- doxytag: member="ucc::IOBuffer::_pull" ref="ad6089d06f36137661b2f0c37943a4187" args="(char *address, size_t size)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual size_t ucc::IOBuffer::_pull </td>
<td>(</td>
<td class="paramtype">char * </td>
<td class="paramname"> <em>address</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"> <em>size</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [protected, virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Method to pull buffer from physical i/o (read). </p>
<p>The address is passed to this virtual since it is hidden as private. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>address</em> </td><td>of buffer to pull data into. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>size</em> </td><td>of buffer area being pulled.. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>number of read written, 0 on error or end of data. </dd></dl>
<p>Reimplemented in <a class="el" href="a00054.html#ada6eeafad94f859fea178e502935af8f">ucc::fbuf</a>, <a class="el" href="a00162.html#a1ce3ecc90dae3c278143ecf3f54e9b9a">ucc::TCPSocket</a>, <a class="el" href="a00154.html#ad9a5b8e666290f81728ca0efbf13a019">ucc::SSocket</a>, and <a class="el" href="a00146.html#a9adaa2dc286acdcfc27eaac603a29614">ucc::shell::iobuf</a>.</p>
</div>
</div>
<a class="anchor" id="abe10b39c40a9cc0ba70b9e025dec072a"></a><!-- doxytag: member="ucc::IOBuffer::_push" ref="abe10b39c40a9cc0ba70b9e025dec072a" args="(const char *address, size_t size)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual size_t ucc::IOBuffer::_push </td>
<td>(</td>
<td class="paramtype">const char * </td>
<td class="paramname"> <em>address</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"> <em>size</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [protected, virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Method to push buffer into physical i/o (write). </p>
<p>The address is passed to this virtual since it is hidden as private. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>address</em> </td><td>of data to push. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>size</em> </td><td>of data to push. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>number of bytes written, 0 on error. </dd></dl>
<p>Reimplemented in <a class="el" href="a00054.html#a6633944cf18140194347af2c0c342ca5">ucc::fbuf</a>, <a class="el" href="a00162.html#aa4d11855ebc0e3539812b6d3eb16eb81">ucc::TCPSocket</a>, <a class="el" href="a00154.html#ae4b4ff82b33cd469c94c04de190918a6">ucc::SSocket</a>, and <a class="el" href="a00146.html#ab60dd4c37e328a520f6e00ab78c9ff99">ucc::shell::iobuf</a>.</p>
</div>
</div>
<a class="anchor" id="a4de49cb64116d5f6148bcd33fff89bf2"></a><!-- doxytag: member="ucc::IOBuffer::_waiting" ref="a4de49cb64116d5f6148bcd33fff89bf2" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">size_t ucc::IOBuffer::_waiting </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td>
<td> ) </td>
<td><code> [inline, protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get current output position. </p>
<p>Sometimes used to help compute a "trunc" operation. </p>
<p>Definition at line <a class="el" href="a00189_source.html#l00158">158</a> of file <a class="el" href="a00189_source.html">buffer.h</a>.</p>
</div>
</div>
<a class="anchor" id="a8ef19c099d1a7c8fa3c31d478fe5efd9"></a><!-- doxytag: member="ucc::IOBuffer::allocate" ref="a8ef19c099d1a7c8fa3c31d478fe5efd9" args="(size_t size, type_t access=BUF_RDWR)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void ucc::IOBuffer::allocate </td>
<td>(</td>
<td class="paramtype">size_t </td>
<td class="paramname"> <em>size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">type_t </td>
<td class="paramname"> <em>access</em> = <code>BUF_RDWR</code></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Allocate I/O buffer(s) of specified size. </p>
<p>If a buffer is currently allocated, it is released. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>size</em> </td><td>of buffer to allocate. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>access</em> </td><td>mode of buffer. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ac1395cc623ff847a748f51932750c688"></a><!-- doxytag: member="ucc::IOBuffer::eof" ref="ac1395cc623ff847a748f51932750c688" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool ucc::IOBuffer::eof </td>
<td>(</td>
<td class="paramname"></td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Check if at end of input. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if end of data, false if input still buffered. </dd></dl>
</div>
</div>
<a class="anchor" id="a2de76aed9104fe128c8a753872fc02f8"></a><!-- doxytag: member="ucc::IOBuffer::err" ref="a2de76aed9104fe128c8a753872fc02f8" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int ucc::IOBuffer::err </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td>
<td> ) </td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get last error associated with a failed operation. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>last error. </dd></dl>
<p>Definition at line <a class="el" href="a00189_source.html#l00311">311</a> of file <a class="el" href="a00189_source.html">buffer.h</a>.</p>
</div>
</div>
<a class="anchor" id="a6c0d513e2c85ee1aa52f7db1c5355685"></a><!-- doxytag: member="ucc::IOBuffer::flush" ref="a6c0d513e2c85ee1aa52f7db1c5355685" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual bool ucc::IOBuffer::flush </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td>
<td> ) </td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Flush buffered memory to physical I/O. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true on success, false if not active or fails. </dd></dl>
<p>Reimplemented in <a class="el" href="a00154.html#af2b103fbb4266781c6451f7b5ff8915d">ucc::SSocket</a>.</p>
</div>
</div>
<a class="anchor" id="a23df62cbd48e0b8211926c3ad179d558"></a><!-- doxytag: member="ucc::IOBuffer::gather" ref="a23df62cbd48e0b8211926c3ad179d558" args="(size_t size)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">char* ucc::IOBuffer::gather </td>
<td>(</td>
<td class="paramtype">size_t </td>
<td class="paramname"> <em>size</em></td>
<td> ) </td>
<td><code> [protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Gather returns a pointer to contigues input of specified size. </p>
<p>This may require moving the input data in memory. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>size</em> </td><td>of gather space. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>data pointer to gathered data or NULL if not available. </dd></dl>
</div>
</div>
<a class="anchor" id="ab8c807f7a07f28ce6c20b063f51e0b5e"></a><!-- doxytag: member="ucc::IOBuffer::getch" ref="ab8c807f7a07f28ce6c20b063f51e0b5e" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int ucc::IOBuffer::getch </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get a character from the buffer. </p>
<p>If no data is available, return EOF. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>character from buffer or eof. </dd></dl>
</div>
</div>
<a class="anchor" id="a690a7aa4232d218b76fc4497026fe04a"></a><!-- doxytag: member="ucc::IOBuffer::getline" ref="a690a7aa4232d218b76fc4497026fe04a" args="(char *string, size_t size)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">size_t ucc::IOBuffer::getline </td>
<td>(</td>
<td class="paramtype">char * </td>
<td class="paramname"> <em>string</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"> <em>size</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get a string as a line of input from the buffer. </p>
<p>The eol character(s) are used to mark the end of a line. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>string</em> </td><td>to save input into. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>size</em> </td><td>limit of string to save. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>count of characters read or 0 if at end of data. </dd></dl>
</div>
</div>
<a class="anchor" id="a923a8684a00314f3e8e02f3f40e8be0b"></a><!-- doxytag: member="ucc::IOBuffer::getstr" ref="a923a8684a00314f3e8e02f3f40e8be0b" args="(char *address, size_t count)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">size_t ucc::IOBuffer::getstr </td>
<td>(</td>
<td class="paramtype">char * </td>
<td class="paramname"> <em>address</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"> <em>count</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get memory from the buffer. </p>
<p>This method will become "get()" in abi 4 and may become a protected method. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>address</em> </td><td>of characters save from buffer. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>count</em> </td><td>of characters to get from buffer. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>number of characters actually copied. </dd></dl>
</div>
</div>
<a class="anchor" id="a953213c59a9d4cd28252d3f91ce89182"></a><!-- doxytag: member="ucc::IOBuffer::isinput" ref="a953213c59a9d4cd28252d3f91ce89182" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool ucc::IOBuffer::isinput </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td>
<td> ) </td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>See if input active. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if input active. </dd></dl>
<p>Definition at line <a class="el" href="a00189_source.html#l00345">345</a> of file <a class="el" href="a00189_source.html">buffer.h</a>.</p>
</div>
</div>
<a class="anchor" id="a1e964d175adae6bb13b9f79611fa081b"></a><!-- doxytag: member="ucc::IOBuffer::isopen" ref="a1e964d175adae6bb13b9f79611fa081b" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool ucc::IOBuffer::isopen </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td>
<td> ) </td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>See if buffer open. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if buffer active. </dd></dl>
<p>Definition at line <a class="el" href="a00189_source.html#l00338">338</a> of file <a class="el" href="a00189_source.html">buffer.h</a>.</p>
</div>
</div>
<a class="anchor" id="a0cdbc447b10f0e190f1821bf9b0b0a8e"></a><!-- doxytag: member="ucc::IOBuffer::isoutput" ref="a0cdbc447b10f0e190f1821bf9b0b0a8e" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool ucc::IOBuffer::isoutput </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td>
<td> ) </td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>See if output active. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if output active. </dd></dl>
<p>Definition at line <a class="el" href="a00189_source.html#l00352">352</a> of file <a class="el" href="a00189_source.html">buffer.h</a>.</p>
</div>
</div>
<a class="anchor" id="aede708848660ee8deab7faf9178471f0"></a><!-- doxytag: member="ucc::IOBuffer::operator bool" ref="aede708848660ee8deab7faf9178471f0" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ucc::IOBuffer::operator bool </td>
<td>(</td>
<td class="paramname"></td>
<td> ) </td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>See if buffer open. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if buffer active. </dd></dl>
<p>Definition at line <a class="el" href="a00189_source.html#l00324">324</a> of file <a class="el" href="a00189_source.html">buffer.h</a>.</p>
</div>
</div>
<a class="anchor" id="a6326bc08726bc9b8e777cfff32b35194"></a><!-- doxytag: member="ucc::IOBuffer::operator!" ref="a6326bc08726bc9b8e777cfff32b35194" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool ucc::IOBuffer::operator! </td>
<td>(</td>
<td class="paramname"></td>
<td> ) </td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>See if buffer closed. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if buffer inactive. </dd></dl>
<p>Definition at line <a class="el" href="a00189_source.html#l00331">331</a> of file <a class="el" href="a00189_source.html">buffer.h</a>.</p>
</div>
</div>
<a class="anchor" id="af74ba2a42576801ceaab76eee3fbef66"></a><!-- doxytag: member="ucc::IOBuffer::pending" ref="af74ba2a42576801ceaab76eee3fbef66" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual bool ucc::IOBuffer::pending </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td>
<td> ) </td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>See if data is pending. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if data is pending. </dd></dl>
<p>Reimplemented in <a class="el" href="a00162.html#a4e153320094ecc110a763209187da70f">ucc::TCPSocket</a>, and <a class="el" href="a00154.html#ab891511f1e2b841c7c60fcd995736d26">ucc::SSocket</a>.</p>
</div>
</div>
<a class="anchor" id="a79f89dfad7aeb01f4d2d1a29e859efa3"></a><!-- doxytag: member="ucc::IOBuffer::printf" ref="a79f89dfad7aeb01f4d2d1a29e859efa3" args="(const char *format,...)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">size_t ucc::IOBuffer::printf </td>
<td>(</td>
<td class="paramtype">const char * </td>
<td class="paramname"> <em>format</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname"> <em>...</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Print formatted string to the buffer. </p>
<p>The maximum output size is the buffer size, and the operation flushes the buffer. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>format</em> </td><td>string. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>number of bytes written. </dd></dl>
</div>
</div>
<a class="anchor" id="af630da18a02def8d6ed6a42f426023af"></a><!-- doxytag: member="ucc::IOBuffer::putch" ref="af630da18a02def8d6ed6a42f426023af" args="(int ch)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int ucc::IOBuffer::putch </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"> <em>ch</em></td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Put a character into the buffer. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>character put into buffer or eof. </dd></dl>
</div>
</div>
<a class="anchor" id="abeb5c89b1c72283acd093c1b8d0010aa"></a><!-- doxytag: member="ucc::IOBuffer::putline" ref="abeb5c89b1c72283acd093c1b8d0010aa" args="(const char *string)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">size_t ucc::IOBuffer::putline </td>
<td>(</td>
<td class="paramtype">const char * </td>
<td class="paramname"> <em>string</em></td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Put a string as a line of output to the buffer. </p>
<p>The eol character is appended to the end. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>string</em> </td><td>to write. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>total characters successfully written, including eol chars. </dd></dl>
</div>
</div>
<a class="anchor" id="a34ac0a666f64ff52fabcbf43fee7a2a2"></a><!-- doxytag: member="ucc::IOBuffer::putstr" ref="a34ac0a666f64ff52fabcbf43fee7a2a2" args="(const char *address, size_t count=0)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">size_t ucc::IOBuffer::putstr </td>
<td>(</td>
<td class="paramtype">const char * </td>
<td class="paramname"> <em>address</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"> <em>count</em> = <code>0</code></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Put memory into the buffer. </p>
<p>If count is 0 then put as NULL terminated string. This method will become "put()" in abi 4 and may become a protected method. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>address</em> </td><td>of characters to put into buffer. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>count</em> </td><td>of characters to put into buffer. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>number of characters actually written. </dd></dl>
</div>
</div>
<a class="anchor" id="a76309b607fd7327aaa1125af0b6c0af5"></a><!-- doxytag: member="ucc::IOBuffer::read" ref="a76309b607fd7327aaa1125af0b6c0af5" args="(char *address, size_t size)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">size_t ucc::IOBuffer::read </td>
<td>(</td>
<td class="paramtype">char * </td>
<td class="paramname"> <em>address</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"> <em>size</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Method to read input data from the buffer. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>address</em> </td><td>of buffer to use. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>size</em> </td><td>of buffer to request. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>number of characters actually read. </dd></dl>
<p>Definition at line <a class="el" href="a00189_source.html#l00257">257</a> of file <a class="el" href="a00189_source.html">buffer.h</a>.</p>
</div>
</div>
<a class="anchor" id="a637976c9c2c4a3bcbcee32ef69f03c1f"></a><!-- doxytag: member="ucc::IOBuffer::read" ref="a637976c9c2c4a3bcbcee32ef69f03c1f" args="(String &string)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">size_t ucc::IOBuffer::read </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00157.html">String</a> & </td>
<td class="paramname"> <em>string</em></td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Method to read a line of input from the buffer. </p>
<p>This saves the result into an already allocated string object. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>string</em> </td><td>buffer to use. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>number of characters actually read. </dd></dl>
</div>
</div>
<a class="anchor" id="a02985449e23957432bb2ac6ed1433c1b"></a><!-- doxytag: member="ucc::IOBuffer::readln" ref="a02985449e23957432bb2ac6ed1433c1b" args="(char *address, size_t size)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">size_t ucc::IOBuffer::readln </td>
<td>(</td>
<td class="paramtype">char * </td>
<td class="paramname"> <em>address</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"> <em>size</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Method to read a line of input from the buffer. </p>
<p>This uses the current newline character sequence to mark the end of line input. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>address</em> </td><td>of string buffer to use. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>size</em> </td><td>of string buffer. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>number of characters actually read. </dd></dl>
<p>Definition at line <a class="el" href="a00189_source.html#l00240">240</a> of file <a class="el" href="a00189_source.html">buffer.h</a>.</p>
</div>
</div>
<a class="anchor" id="a23b92d15215d9a2d40b402a87a1461b2"></a><!-- doxytag: member="ucc::IOBuffer::request" ref="a23b92d15215d9a2d40b402a87a1461b2" args="(size_t size)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">char* ucc::IOBuffer::request </td>
<td>(</td>
<td class="paramtype">size_t </td>
<td class="paramname"> <em>size</em></td>
<td> ) </td>
<td><code> [protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Request workspace in output buffer. </p>
<p>This returns a pointer to memory from the output buffer and advances the output position. This is sometimes used for a form of zero copy write. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>size</em> </td><td>of request area. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>data pointer or NULL if not available. </dd></dl>
</div>
</div>
<a class="anchor" id="a6aee71e03faf569b1e74415011f4c941"></a><!-- doxytag: member="ucc::IOBuffer::reset" ref="a6aee71e03faf569b1e74415011f4c941" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void ucc::IOBuffer::reset </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Reset input buffer state. </p>
<p>Drops any pending input. </p>
</div>
</div>
<a class="anchor" id="a8eeebeb2b534948cb45dabae7b7eebec"></a><!-- doxytag: member="ucc::IOBuffer::seteol" ref="a8eeebeb2b534948cb45dabae7b7eebec" args="(const char *string)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void ucc::IOBuffer::seteol </td>
<td>(</td>
<td class="paramtype">const char * </td>
<td class="paramname"> <em>string</em></td>
<td> ) </td>
<td><code> [inline, protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Set end of line marker. </p>
<p>Normally this is set to cr & lf, which actually supports both lf alone and cr/lf termination of lines. However, <a class="el" href="a00057.html#abeb5c89b1c72283acd093c1b8d0010aa" title="Put a string as a line of output to the buffer.">putline()</a> will always add the full cr/lf if this mode is used. This option only effects <a class="el" href="a00057.html#a690a7aa4232d218b76fc4497026fe04a" title="Get a string as a line of input from the buffer.">getline()</a> and <a class="el" href="a00057.html#abeb5c89b1c72283acd093c1b8d0010aa" title="Put a string as a line of output to the buffer.">putline()</a>. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>string</em> </td><td>for eol for getline and putline. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="a00189_source.html#l00095">95</a> of file <a class="el" href="a00189_source.html">buffer.h</a>.</p>
</div>
</div>
<a class="anchor" id="a3193a7d69a22e228845ddf519256d2a1"></a><!-- doxytag: member="ucc::IOBuffer::write" ref="a3193a7d69a22e228845ddf519256d2a1" args="(String &string)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">size_t ucc::IOBuffer::write </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00157.html">String</a> & </td>
<td class="paramname"> <em>string</em></td>
<td> ) </td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Method to write a string object. </p>
<p>This adds the current newline character sequence to the output. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>string</em> </td><td>to write. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>number of characters actually written. </dd></dl>
<p>Definition at line <a class="el" href="a00189_source.html#l00230">230</a> of file <a class="el" href="a00189_source.html">buffer.h</a>.</p>
</div>
</div>
<a class="anchor" id="af678f2b46cfb64414964c49dc5ac2acf"></a><!-- doxytag: member="ucc::IOBuffer::write" ref="af678f2b46cfb64414964c49dc5ac2acf" args="(const char *address, size_t size)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">size_t ucc::IOBuffer::write </td>
<td>(</td>
<td class="paramtype">const char * </td>
<td class="paramname"> <em>address</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"> <em>size</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Method to write memory to the buffer. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>address</em> </td><td>of memory to write. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>size</em> </td><td>of memory to write. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>number of character bytes written. </dd></dl>
<p>Definition at line <a class="el" href="a00189_source.html#l00212">212</a> of file <a class="el" href="a00189_source.html">buffer.h</a>.</p>
</div>
</div>
<a class="anchor" id="ad9ce673f267215a09b40a209e6ed047b"></a><!-- doxytag: member="ucc::IOBuffer::writeln" ref="ad9ce673f267215a09b40a209e6ed047b" args="(const char *string)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">size_t ucc::IOBuffer::writeln </td>
<td>(</td>
<td class="paramtype">const char * </td>
<td class="paramname"> <em>string</em></td>
<td> ) </td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Method to write a null terminated string. </p>
<p>This adds the current newline character sequence to the output. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>string</em> </td><td>to write. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>number of characters actually written. </dd></dl>
<p>Definition at line <a class="el" href="a00189_source.html#l00221">221</a> of file <a class="el" href="a00189_source.html">buffer.h</a>.</p>
</div>
</div>
<a class="anchor" id="a7fa1a785b4b27a70b7bb8b3e741b0579"></a><!-- doxytag: member="ucc::IOBuffer::writes" ref="a7fa1a785b4b27a70b7bb8b3e741b0579" args="(const char *string)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">size_t ucc::IOBuffer::writes </td>
<td>(</td>
<td class="paramtype">const char * </td>
<td class="paramname"> <em>string</em></td>
<td> ) </td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Method to write a null terminated string. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>string</em> </td><td>to write. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="a00189_source.html#l00203">203</a> of file <a class="el" href="a00189_source.html">buffer.h</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>ucommon/<a class="el" href="a00189_source.html">buffer.h</a></li>
</ul>
</div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue Jul 6 08:22:30 2010 for UCommon by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>
|