⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 streams.outstm.html

📁 PTypes (C++ Portable Types Library) is a simple alternative to the STL that includes multithreading
💻 HTML
字号:
<html><!-- #BeginTemplate "/Templates/tmpl.dwt" --><head><!-- #BeginEditable "doctitle" --> <title>PTypes: streams: outstm</title><!-- #EndEditable --> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link rel="stylesheet" href="styles.css"></head><body bgcolor="#FFFFFF" leftmargin="40" marginwidth="40"><p><a href="../index.html"><img src="title-1.7.gif" width="213" height="34" alt="C++ Portable Types Library (PTypes) Version 1.7" border="0"></a> <hr noshade><!-- #BeginEditable "body" --> <p class="hpath"><a href="index.html">Top</a>: <a href="streams.html">Streams</a>: outstm </p><blockquote> <pre class="lang">#include &lt;pstreams.h&gt;void outstm::putf(const char* fmt, ...);void outstm::put(char c);void outstm::put(const string& str);void outstm::puteol();int  outstm::write(const char* buf, int count);void outstm::flush();bool outstm::get/set_flusheol();</pre></blockquote><p>This class implements the basic functionality of output streams. <span class="lang">Outstm</span> is derived from <a href="streams.iobase.html">iobase</a> and inherits all its public methods and properties.</p><p>End-of-line sequences are not translated when you send data through the output methods. To write an end-of-line sequence appropriate to the given operating environment use <span class="lang">puteol()</span> instead.</p><p><span class="def">void outstm::putf(const char* fmt, ...)</span> is a printf-style output method. PTypes supports a subset of format specifiers common to all platforms. PTypes supports &lt;blank&gt;, '#', '+' and '-' formatting flags, 'L', 'h', 'l' and 'll' format modifiers, and the following format specifiers: <span class="lang">cdiouxXeEfgGps</span>.</p><p><span class="def">void outstm::put(char c)</span> writes the character <span class="lang">c</span> to the stream.</p><p><span class="def">void outstm::put(const string&amp; str)</span> writes the string <span class="lang">str</span> to the stream. </p><p><span class="def">void outstm::puteol()</span> writes an end-of-line sequence to the stream. The actual sequence depends on the platform the library was compiled on. May flush data if the property <span class="lang">flusheol</span> is set to <span class="lang">true</span>.</p><p><span class="def">int outstm::write(const char* buf, int count)</span> writes <span class="lang">count</span> bytes from the buffer <span class="lang">buf</span> to the stream.</p><p><span class="def">void outstm::flush()</span> writes the remaining data in the buffer to the media, if any. This method is called automatically when the stream is being closed.</p><p><span class="def"> bool outstm::get/set_flusheol()</span> -- set this property to true if you want each line to be written to the media or communication stream immediately. Default is <span class="lang">false</span>.</p><p class="seealso">See also: <a href="streams.iobase.html">iobase</a>, <a href="streams.instm.html">instm</a>, <a href="streams.errors.html">Error handling</a></p><!-- #EndEditable --><hr size="1"><a href="../index.html" class="ns">PTypes home</a></body><!-- #EndTemplate --></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -