Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
std::basic_...asic_syncbuf(3) C++ Standard Libarystd::basic_...asic_syncbuf(3)

NAME
       std::basic_syncbuf::basic_syncbuf - std::basic_syncbuf::basic_syncbuf

Synopsis
	  basic_syncbuf()					     (1)
	      :	basic_syncbuf( nullptr )
	  explicit basic_syncbuf( streambuf_type* obuf )	     (2)
	      :	basic_syncbuf( obuf, Allocator() ) {}
	  basic_syncbuf( streambuf_type* obuf, const Allocator&	a ); (3)
	  basic_syncbuf( basic_syncbuf&& rhs );			     (4)

	  1)  Default  constructor:  creates an	instance of std::basic_syncbuf
       with emit-on-sync
	  policy set to	false, wrapped streambuffer set	to nullptr, and	using
	  default-constructed Allocator	as the allocator for  temporary	 stor-
       age.
	  2,3)	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  alloca-
       tor for temporary
	  storage.
	  4)  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::ba-
       sic_streambuf of	rhs
	  are guaranteed to be null. Destroying	a moved-from rhs will not pro-
       duce 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
	  2,3) 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::ba-
       sic_osyncstream.

Example
	   This	section	is incomplete
	   Reason: no example

See also
	  sync	    synchronizes the buffers with the associated character se-
       quence
	  [virtual] (virtual protected member function	of  std::basic_stream-
       buf<CharT,Traits>)

	  emit	     atomically	 transmits  the	 entire	internal buffer	to the
       wrapped streambuf
		    (public member function)

Category:
	    * Todo no example

http://cppreference.com		  2024.06.10	 std::basic_...asic_syncbuf(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=std::basic_syncbuf::basic_syncbuf&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help