std::basic_syncbuf<CharT,Traits,Allocator>::basic_syncbuf (3) - Linux Manuals
std::basic_syncbuf<CharT,Traits,Allocator>::basic_syncbuf: std::basic_syncbuf<CharT,Traits,Allocator>::basic_syncbuf
Command to display std::basic_syncbuf<CharT,Traits,Allocator>::basic_syncbuf
manual in Linux: $ man 3 std::basic_syncbuf<CharT,Traits,Allocator>::basic_syncbuf
NAME
std::basic_syncbuf<CharT,Traits,Allocator>::basic_syncbuf - std::basic_syncbuf<CharT,Traits,Allocator>::basic_syncbuf
Synopsis
explicit basic_syncbuf( streambuf_type* obuf = nullptr ) (1)
: basic_syncbuf( obuf, Allocator() ) {}
basic_syncbuf( streambuf_type* obuf, const Allocator& a); (2)
basic_syncbuf( basic_syncbuf&& rhs); (3)
1,2) Creates an instance of std::basic_syncbuf with emit-on-sync policy set to false, wrapped streambuffer set to obuf, and using a as the allocator for temporary storage.
3) Move constructor: move-constructs a std::basic_syncbuf object by moving all contents from another std::basic_syncbuf object rhs, including the temporary storage, the wrapped stream pointer, policy, and all other state (such as the mutex pointer). After move, rhs is not associated with a stream, and rhs.get_wrapped()==nullptr. The put area member pointers of the base class std::basic_streambuf of rhs are guaranteed to be null. Destroying a moved-from rhs will not produce any output.
Parameters
obuf - pointer to the std::basic_streambuf to wrap
a - the allocator to use for temporary storage
rhs - another std::basic_syncbuf to move from
Exceptions
1,2) May throw std::bad_alloc from the constructor of the internal temporary storage or std::system_error from the mutex construction.
Notes
Typically called by the appropriate constructors of std::basic_osyncstream.
Example
This section is incomplete
Reason: no example
See also
sync synchronizes the buffers with the associated character sequence
(virtual protected member function of std::basic_streambuf<CharT,Traits>)
[virtual]
atomically transmits the entire internal buffer to the wrapped streambuf
emit (public member function)
Pages related to std::basic_syncbuf<CharT,Traits,Allocator>::basic_syncbuf
- std::basic_syncbuf<CharT,Traits,Allocator>::emit (3) - std::basic_syncbuf<CharT,Traits,Allocator>::emit
- std::basic_syncbuf<CharT,Traits,Allocator>::get_allocator (3) - std::basic_syncbuf<CharT,Traits,Allocator>::get_allocator
- std::basic_syncbuf<CharT,Traits,Allocator>::get_wrapped (3) - std::basic_syncbuf<CharT,Traits,Allocator>::get_wrapped
- std::basic_syncbuf<CharT,Traits,Allocator>::operator= (3) - std::basic_syncbuf<CharT,Traits,Allocator>::operator=
- std::basic_syncbuf<CharT,Traits,Allocator>::set_emit_on_sync (3) - std::basic_syncbuf<CharT,Traits,Allocator>::set_emit_on_sync
- std::basic_syncbuf<CharT,Traits,Allocator>::swap (3) - std::basic_syncbuf<CharT,Traits,Allocator>::swap
- std::basic_syncbuf<CharT,Traits,Allocator>::sync (3) - std::basic_syncbuf<CharT,Traits,Allocator>::sync
- std::basic_syncbuf<CharT,Traits,Allocator>::~basic_syncbuf (3) - std::basic_syncbuf<CharT,Traits,Allocator>::~basic_syncbuf
- std::basic_syncbuf (3) - std::basic_syncbuf
- std::basic_streambuf (3) - std::basic_streambuf
- std::basic_streambuf<CharT,Traits>::basic_streambuf (3) - std::basic_streambuf<CharT,Traits>::basic_streambuf
- std::basic_streambuf<CharT,Traits>::eback,gptr,egptr (3) - std::basic_streambuf<CharT,Traits>::eback,gptr,egptr
- std::basic_streambuf<CharT,Traits>::gbump (3) - std::basic_streambuf<CharT,Traits>::gbump
- std::basic_streambuf<CharT,Traits>::getloc (3) - std::basic_streambuf<CharT,Traits>::getloc
- std::basic_streambuf<CharT,Traits>::in_avail (3) - std::basic_streambuf<CharT,Traits>::in_avail
- std::basic_streambuf<CharT,Traits>::operator= (3) - std::basic_streambuf<CharT,Traits>::operator=