Asposecpplib
System::IO::BasicSystemIOStreamWrapper< Elem, Traits > Class Template Reference

Represents a std::iostream-like wrapper that used BasicSystemIOStreamBuf as internal buffer. More...

Inherits std::basic_iostream< Elem, std::char_traits< Elem > >.

Public Types

using char_type = Elem
 
using traits_type = Traits
 
using Mybase = std::basic_iostream< char_type, traits_type >
 
using Mysb = BasicSystemIOStreamBuf< char_type, traits_type >
 

Public Member Functions

 BasicSystemIOStreamWrapper (SharedPtr< Stream > str, SystemIOStreamWrappingMode mode=SystemIOStreamWrappingMode::Binary)
 Constructs a new instance of the BasicSystemIOStreamWrapper. More...
 
 BasicSystemIOStreamWrapper (const BasicSystemIOStreamWrapper &)=delete
 Copy constructor. Deleted. More...
 
 BasicSystemIOStreamWrapper (BasicSystemIOStreamWrapper &&right)
 Move constructor. More...
 
BasicSystemIOStreamWrapperoperator= (const BasicSystemIOStreamWrapper &)=delete
 Copy assignment operator. Deleted. More...
 
BasicSystemIOStreamWrapperoperator= (BasicSystemIOStreamWrapper &&right)
 Move assignment operator. More...
 
void AssignRV (BasicSystemIOStreamWrapper &&right)
 Used in move constructor and move assignment operator to reset pointers and call swap(). More...
 
void swap (BasicSystemIOStreamWrapper &right)
 Call to swap *this and right, if they are not equal. More...
 

Detailed Description

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

Represents a std::iostream-like wrapper that used BasicSystemIOStreamBuf as internal buffer.

Member Typedef Documentation

◆ char_type

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

◆ Mybase

template<typename Elem , typename Traits = std::char_traits<Elem>>
using System::IO::BasicSystemIOStreamWrapper< Elem, Traits >::Mybase = std::basic_iostream<char_type, traits_type>

◆ Mysb

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

◆ traits_type

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

Constructor & Destructor Documentation

◆ BasicSystemIOStreamWrapper() [1/3]

template<typename Elem , typename Traits = std::char_traits<Elem>>
System::IO::BasicSystemIOStreamWrapper< Elem, Traits >::BasicSystemIOStreamWrapper ( SharedPtr< Stream str,
SystemIOStreamWrappingMode  mode = SystemIOStreamWrappingMode::Binary 
)
inline

Constructs a new instance of the BasicSystemIOStreamWrapper.

Parameters
strThe pointer to the stream
modeWrapping mode

◆ BasicSystemIOStreamWrapper() [2/3]

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

Copy constructor. Deleted.

◆ BasicSystemIOStreamWrapper() [3/3]

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

Move constructor.

Parameters
rightObject to be move

Member Function Documentation

◆ AssignRV()

template<typename Elem , typename Traits = std::char_traits<Elem>>
void System::IO::BasicSystemIOStreamWrapper< Elem, Traits >::AssignRV ( BasicSystemIOStreamWrapper< 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>>
BasicSystemIOStreamWrapper& System::IO::BasicSystemIOStreamWrapper< Elem, Traits >::operator= ( BasicSystemIOStreamWrapper< Elem, Traits > &&  right)
inline

Move assignment operator.

Parameters
rightObject to be move
Returns
*this

◆ operator=() [2/2]

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

Copy assignment operator. Deleted.

◆ swap()

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

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

Parameters
rightRvalue reference to object to be swap