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

📄 strbuf.htm

📁 这是关于VC++中的STL容器的资料,包括了STL容器各个类之间关系以及类的说明
💻 HTM
字号:
<html>
<head>
<title> The basic_stringbuf Class</title>
</head>

<body bgcolor="#FFFFFF">

<img src="sgbufban.gif">

<pre>
<font size=5>Class Name</font>            basic_stringbuf

<font size=5>Header File</font>           &lt;sstream&gt;

<font size=5>Classification</font>      Input/Output (Format Class)
</pre>

<a href="strbuf.htm#diagram">Class Relationship Diagram</a><br>
<br>
<a href="strbuf.htm#desc">Class Description</a><br>
<h1>Member Classes</h1>


 <i>none</i>

<h1>Methods</h1> 

<a href="strbuf.htm#stringbuf1">explicit basic_stringbuf(ios_base::openmode OMode = ios_base::in | ios_base::out)</a><br>
<a href="strbuf.htm#stringbuf2">explicit basic_stringbuf( const basic_string&lt;charT,traits,Allocator&gt;& Str, ios_base::openmode OMode = ios_base::in | ios_base::out)</a><br>
<a href="streabuf.htm#pbackfail">virtual int_type pbackfail(int_type c = traits::eof())</a><br>
<a href="streabuf.htm#overflow">virtual int_type overflow (int_type c = traits::eof())</a><br>
<a href="streabuf.htm#seekoff">virtual pos_type seekoff(off_type off, ios_base::seekdir way, ios_base::openmode which = ios_base::in | ios_base::out)</a><br>
<a href="streabuf.htm#seekpos">virtual pos_type seekpos(pos_type sp, ios_base::openmode which = ios_base::in | ios_base::out)</a><br>
<a href="strbuf.htm#setbuf">virtual basic_streambuf&lt;charT,traits&gt;* setbuf(charT* Str, streamsize Num)</a><br>
<a href="streabuf.htm#str1">basic_string&lt;charT,traits,Allocator&gt; str() const</a><br> Public
<a href="streabuf.htm#str2">void str(const basic_string&lt;charT,traits,Allocator&gt;& s)</a><br> Public
<a href="streabuf.htm#underflow">virtual int_type underflow()</a><br>

<hr>
<a name="desc"><h3>Class Description</h3></a>
<p>

The stringbuf component is a specialized basic_streambuf.  It is derived from basic_streambuf.
The stringbuf component is connected to a character array, as opposed to a file.  The source of a
stringbuf is intended to be a memory device.  The programmer can have direct access to the
istringstream/ostringstream memory device through the stringbuf component.  The stringbuf 
component can be reached by the <a href="streabuf.htm#rdbuf">rdbuf()</a> member function.
The standard typedef for basic_stringbuf is <i>stringbuf</i>.
</p>                      
<hr>


<pre>                                
<a name="stringbuf1">Method            basic_stringbuf()</a>

Access            Public

Classification    Constructor

Syntax            explicit basic_stringbuf(ios_base::openmode OMode = ios_base::in | ios_base::out)

Parameters        OMode is the mode that the buffer is opened in.

Return            None

</pre>

<h3>Description</h3>       
<p>
This basic_stringbuf() method constructs an object of basic_stringbuf in mode OMode. A basic_stringbuf
object constructed with this method will be initialized with a basic_streambuf object.
</p>
<hr>

<pre>                                
<a name="stringbuf2">Method            basic_stringbuf()</a>

Access            Public

Classification    Constructor

Syntax            explicit basic_stringbuf( const basic_string&lt;charT,traits,Allocator&gt;& Str, ios_base::openmode OMode = ios_base::in | ios_base::out)

Parameters        OMode is the mode that the buffer is opened in. Str is a character buffer that will
                  be used to initialize the stringbuf object.

Return            None

</pre>

<h3>Description</h3>       
<p>
This basic_stringbuf() method constructs an object of basic_stringbuf in mode OMode. A basic_stringbuf
object constructed with this method will be initialized with the character buffer referred to
by Str.
</p>
<hr>

<pre>                                
<a name="setbuf">Method            setbuf()</a>

Access            Protected

Classification    Accessor

Syntax            virtual basic_streambuf&lt;charT,traits&gt;* setbuf(charT* Str, streamsize Num)

Parameters        Str points to a Str that a new buffer for the stringbuf object.  Num is the
                  size in characters the buffer can hold

Return            This method returns the *this pointer for the stringbuf object.

</pre>

<h3>Description</h3>       
<p>
The setbuf() method updates the buffer for the stringbuf object.  setbuf(0,0) has no effect
for a stringbuf object.
</p>
<hr>

<p>
<a name="diagram"><h2>The Class Relationship Diagram of basic_stringbuf</h2></a>
<img src="stringbf.gif">
</p>
<hr>

</body>
</html>



⌨️ 快捷键说明

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