System::IO::BasicSystemIOStreamBuf< Elem, Traits > Class Template Reference

Inherits basic_streambuf< Elem, Traits >.

Public Types

using char_type = Elem
 
using traits_type = Traits
 
using Mysb = std::basic_streambuf< char_type, traits_type >
 
using int_type = typename traits_type::int_type
 
using pos_type = typename traits_type::pos_type
 
using off_type = typename traits_type::off_type
 

Public Member Functions

virtual ~BasicSystemIOStreamBuf () override
 Destructor. More...
 
 BasicSystemIOStreamBuf ()
 Constructs a new instance of the BasicSystemIOStreamBuf. More...
 
 BasicSystemIOStreamBuf (const SharedPtr< Stream > &str, SystemIOStreamWrappingMode mode=SystemIOStreamWrappingMode::Binary, const std::locale &locale=std::locale())
 
 BasicSystemIOStreamBuf (const BasicSystemIOStreamBuf &)=delete
 Copy constructor. Deleted. More...
 
 BasicSystemIOStreamBuf (BasicSystemIOStreamBuf &&right) noexcept
 
BasicSystemIOStreamBufoperator= (const BasicSystemIOStreamBuf &)=delete
 Copy assignment operator. Deleted. More...
 
BasicSystemIOStreamBufoperator= (BasicSystemIOStreamBuf &&right) noexcept
 
void AssignRV (BasicSystemIOStreamBuf &&right)
 
void swap (BasicSystemIOStreamBuf &right)
 

Detailed Description

template<typename Elem, typename Traits = std::char_traits<Elem>>
class System::IO::BasicSystemIOStreamBuf< Elem, Traits >

Represents a buffer that wraps System::IO::Stream-like streams and allows them to be used as an std::iostream-like streams internal buffer.

Member Typedef Documentation

◆ char_type

template<typename Elem, typename Traits = std::char_traits<Elem>>
using System::IO::BasicSystemIOStreamBuf< Elem, Traits >::char_type = Elem

◆ int_type

template<typename Elem, typename Traits = std::char_traits<Elem>>
using System::IO::BasicSystemIOStreamBuf< Elem, Traits >::int_type = typename traits_type::int_type

◆ Mysb

template<typename Elem, typename Traits = std::char_traits<Elem>>
using System::IO::BasicSystemIOStreamBuf< Elem, Traits >::Mysb = std::basic_streambuf<char_type, traits_type>

◆ off_type

template<typename Elem, typename Traits = std::char_traits<Elem>>
using System::IO::BasicSystemIOStreamBuf< Elem, Traits >::off_type = typename traits_type::off_type

◆ pos_type

template<typename Elem, typename Traits = std::char_traits<Elem>>
using System::IO::BasicSystemIOStreamBuf< Elem, Traits >::pos_type = typename traits_type::pos_type

◆ traits_type

template<typename Elem, typename Traits = std::char_traits<Elem>>
using System::IO::BasicSystemIOStreamBuf< Elem, Traits >::traits_type = Traits

Constructor & Destructor Documentation

◆ ~BasicSystemIOStreamBuf()

template<typename Elem, typename Traits = std::char_traits<Elem>>
virtual System::IO::BasicSystemIOStreamBuf< Elem, Traits >::~BasicSystemIOStreamBuf ( )
inlineoverridevirtual

Destructor.

◆ BasicSystemIOStreamBuf() [1/4]

template<typename Elem, typename Traits = std::char_traits<Elem>>
System::IO::BasicSystemIOStreamBuf< Elem, Traits >::BasicSystemIOStreamBuf ( )
inlineexplicit

Constructs a new instance of the BasicSystemIOStreamBuf.

◆ BasicSystemIOStreamBuf() [2/4]

template<typename Elem, typename Traits = std::char_traits<Elem>>
System::IO::BasicSystemIOStreamBuf< Elem, Traits >::BasicSystemIOStreamBuf ( const SharedPtr< Stream > &  str,
SystemIOStreamWrappingMode  mode = SystemIOStreamWrappingMode::Binary,
const std::locale &  locale = std::locale() 
)
inlineexplicit

Constructs a new instance of the BasicSystemIOStreamBuf.

Parameters
strSmart pointer to the stream
modeWrapping mode
localeStream's locale

◆ BasicSystemIOStreamBuf() [3/4]

template<typename Elem, typename Traits = std::char_traits<Elem>>
System::IO::BasicSystemIOStreamBuf< Elem, Traits >::BasicSystemIOStreamBuf ( const BasicSystemIOStreamBuf< Elem, Traits > &  )
delete

Copy constructor. Deleted.

◆ BasicSystemIOStreamBuf() [4/4]

template<typename Elem, typename Traits = std::char_traits<Elem>>
System::IO::BasicSystemIOStreamBuf< Elem, Traits >::BasicSystemIOStreamBuf ( BasicSystemIOStreamBuf< Elem, Traits > &&  right)
inlinenoexcept

Move constructor.

Parameters
rightObject to be move

Member Function Documentation

◆ AssignRV()

template<typename Elem, typename Traits = std::char_traits<Elem>>
void System::IO::BasicSystemIOStreamBuf< Elem, Traits >::AssignRV ( BasicSystemIOStreamBuf< Elem, Traits > &&  right)
inline

Used in move constructor and move assignment operator to reset pointers and call swap().

Parameters
rightRvalue reference to object to be swap

◆ operator=() [1/2]

template<typename Elem, typename Traits = std::char_traits<Elem>>
BasicSystemIOStreamBuf& System::IO::BasicSystemIOStreamBuf< Elem, Traits >::operator= ( const BasicSystemIOStreamBuf< Elem, Traits > &  )
delete

Copy assignment operator. Deleted.

◆ operator=() [2/2]

template<typename Elem, typename Traits = std::char_traits<Elem>>
BasicSystemIOStreamBuf& System::IO::BasicSystemIOStreamBuf< Elem, Traits >::operator= ( BasicSystemIOStreamBuf< Elem, Traits > &&  right)
inlinenoexcept

Move assignment operator.

Parameters
rightObject to be move
Returns
*this

◆ swap()

template<typename Elem, typename Traits = std::char_traits<Elem>>
void System::IO::BasicSystemIOStreamBuf< Elem, Traits >::swap ( BasicSystemIOStreamBuf< Elem, Traits > &  right)
inline

Call to swap *this and right, if they are not equal.

Parameters
rightRvalue reference to object to be swap