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

📄 streams.outmem.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: outmemory</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>: outmemory </p><blockquote> <pre class="lang">#include &lt;pstreams.h&gt;outmemory::outmemory(int limit = -1, int increment = 1024);const char* outmemory::get_data();string outmemory::get_strdata();</pre></blockquote><p>Use <span class="lang">outmemory</span> to write data to a dynamic memory buffer by means of the streaming interface. <span class="lang">Outmemory</span> is derived from <a href="streams.outstm.html">outstm</a>.</p><p><span class="def">outmemory::outmemory(int limit = -1, int increment = 1024)</span> creates an <span class="lang">outmemory</span> object. The memory buffer grows as data is written to the stream. You can optionally assign the reallocation delta for the memory buffer through <span class="lang">increment</span> and also limit its size to <span class="lang">limit</span> (-1 means unlimited).</p><p><span class="def">const char* outmemory::get_data()</span> returns a pointer to the memory buffer. Note that this buffer is NOT null-terminated unless you explicitly write a null character to the stream at the end. Use <span class="lang">iobase::tell()</span> to determine the actual data size, i.e. bytes written to an <span class="lang">outmemory</span> object.</p><p><span class="def">string outmemory::get_strdata()</span> returns data written to the stream as a dynamic string and closes the stream. Unlike <span class="lang">get_data()</span>, this function returns the exact number of bytes written to the stream.</p><p class="seealso">See also: <a href="streams.iobase.html">iobase</a>, <a href="streams.outstm.html">outstm</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 + -