다음을 통해 공유


basic_ios 클래스

The template class describes the storage and member functions common to both input streams (of template class basic_istream) and output streams (of template class basic_ostream) that depend on the template parameters. (The class ios_base describes what is common and not dependent on template parameters.) An object of class basic_ios<class Elem, class Traits> helps control a stream with elements of type Elem, whose character traits are determined by the class Traits.

template <class Elem, class Traits> 
   class basic_ios : public ios_base

매개 변수

  • Elem
    A type.

  • Traits
    A variable of type char_traits.

설명

An object of class basic_ios<class Elem, class Traits> stores:

생성자

basic_ios

Constructs the basic_ios class.

형식 정의

char_type

A synonym for the template parameter Elem.

int_type

Traits::int_type 의 동의어입니다.

off_type

Traits::off_type 의 동의어입니다.

pos_type

Traits::pos_type 의 동의어입니다.

특성 형식

A synonym for the template parameter Traits.

멤버 함수

bad

Indicates a loss of integrity of the stream buffer.

clear

Clears all error flags.

copyfmt

Copies flags from one stream to another.

eof

Indicates if the end of a stream has been reached.

예외

Indicates which exceptions will be thrown by the stream.

fail

Indicates failure to extract a valid field from a stream.

fill

Specifies or returns the character that will be used when the text is not as wide as the stream.

good

Indicates the stream is in good condition.

imbue

Changes the locale.

init

Called by basic_ios constructors.

move

Moves all values, except the pointer to the stream buffer, from the parameter to the current object.

narrow

Finds the equivalent char to a given char_type.

rdbuf

Routes stream to specified buffer.

rdstate

Reads the state of bits for flags.

set_rdbuf

Assigns a stream buffer to be the read buffer for this stream object.

setstate

Sets additional flags.

스왑

Exchanges the values in this basic_ios object for those of another basic_ios object. The pointers to the stream buffers are not swapped.

tie

Ensures that one stream is processed before another stream.

widen

Finds the equivalent char_type to a given char.

연산자

explicit operator bool

Allows use of a basic_ios object as a bool. Automatic type conversion is disabled to prevent common, unintended side effects.

operator void *

Indicates if the stream is still good.

operator!

Indicates if the stream is not bad.

요구 사항

Header: <ios>

네임스페이스: std

참고 항목

참조

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

iostream 프로그래밍

iostreams 규칙

기타 리소스

basic_ios 멤버

<ios> 멤버