다음을 통해 공유


strstreambuf 클래스

Describes a stream buffer that controls the transmission of elements to and from a sequence of elements stored in a char array object.

class strstreambuf : public streambuf

설명

Depending on how the object is constructed, it can be allocated, extended, and freed as necessary to accommodate changes in the sequence.

An object of class strstreambuf stores several bits of mode information as its strstreambuf mode. These bits indicate whether the controlled sequence:

  • Has been allocated and needs to be freed eventually.

  • Is modifiable.

  • Is extendable by reallocating storage.

  • Has been frozen and hence needs to be unfrozen before the object is destroyed, or freed (if allocated) by an agency other than the object.

A controlled sequence that is frozen cannot be modified or extended, regardless of the state of these separate mode bits.

The object also stores pointers to two functions that control strstreambuf allocation. If these are null pointers, the object devises its own method of allocating and freeing storage for the controlled sequence.

참고

이 클래스는 더 이상 사용되지 않습니다.Consider using stringbuf or wstringbuf instead.

생성자

strstreambuf

'strstreambuf' 형식의 개체를 생성합니다.

멤버 함수

freeze

Causes a stream buffer to be unavailable through stream buffer operations.

오버플로(overflow)

A protected virtual function that can be called when a new character is inserted into a full buffer.

pbackfail

A protected virtual member function that tries to put back an element into the input stream, and then make it the current element (pointed to by the next pointer).

pcount

Returns a count of the number of elements written to the controlled sequence.

seekoff

A protected virtual member function that tries to alter the current positions for the controlled streams.

seekpos

A protected virtual member function that tries to alter the current positions for the controlled streams.

str

Calls freeze, and then returns a pointer to the beginning of the controlled sequence.

underflow

A protected virtual function to extract the current element from the input stream.

요구 사항

Header: <strstream>

네임스페이스: std

참고 항목

참조

streambuf

C++ 표준 라이브러리의 스레드 보안

iostream 프로그래밍

iostreams 규칙

기타 리소스

strstreambuf 멤버

<strstream> 멤버