Namespaces
Variants

std::basic_syncbuf<CharT,Traits,Allocator>:: sync

From cppreference.net
protected :
int sync ( ) override ;

먼저, 적절한 비공개 플래그를 업데이트하여 플러시가 보류 중임을 기록합니다.

그런 다음, 현재의 동기화 시 방출 정책이 true 인 경우, emit() 를 호출합니다.

그렇지 않은 경우 (즉, 동기화 시 방출 정책이 false 인 경우, 기본값임), 플러시는 emit() 가 호출될 때까지 일시 중단됩니다. 예를 들어 std::basic_osyncstream::emit() 또는 std::basic_osyncstream::~basic_osyncstream 를 통해 호출될 때까지입니다.

목차

매개변수

(없음)

참고 사항

sync() 또는 이와 동등한 기능이 close() , seekoff() , 그리고 seekpos() 에 의해 암묵적으로 호출되며, std::basic_streambuf::pubsync() 에 의해 명시적으로 호출됩니다.

예제

참고 항목

[virtual]
연관된 문자 시퀀스와 버퍼를 동기화합니다
( std::basic_streambuf<CharT,Traits> 의 virtual protected 멤버 함수)
내부 데이터를 최종 목적지로 전송하기 위해 기본 basic_syncbuf emit() 을 호출합니다
( std::basic_osyncstream<CharT,Traits,Allocator> 의 public 멤버 함수)