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

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

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

Public Types

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

Public Member Functions

 BasicSystemIStreamWrapper (SharedPtr< Stream > str, SystemIOStreamWrappingMode mode=SystemIOStreamWrappingMode::Binary)
 Constructs a new instance of the BasicSystemIStreamWrapper. More...
 
 BasicSystemIStreamWrapper (const BasicSystemIStreamWrapper &)=delete
 Copy constructor. Deleted. More...
 
 BasicSystemIStreamWrapper (BasicSystemIStreamWrapper &&right)
 Move constructor. More...
 
BasicSystemIStreamWrapperoperator= (const BasicSystemIStreamWrapper &)=delete
 Copy assignment operator. Deleted. More...
 
BasicSystemIStreamWrapperoperator= (BasicSystemIStreamWrapper &&right)
 Move assignment operator. More...
 
void AssignRV (BasicSystemIStreamWrapper &&right)
 Used in move constructor and move assignment operator to reset pointers and call swap(). More...
 
void swap (BasicSystemIStreamWrapper &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::BasicSystemIStreamWrapper< Elem, Traits >

Represents a std::istream-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::BasicSystemIStreamWrapper< Elem, Traits >::char_type = Elem

◆ Mybase

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

◆ Mysb

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

◆ traits_type

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

Constructor & Destructor Documentation

◆ BasicSystemIStreamWrapper() [1/3]

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

Constructs a new instance of the BasicSystemIStreamWrapper.

Parameters
strThe pointer to the stream
modeWrapping mode

◆ BasicSystemIStreamWrapper() [2/3]

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

Copy constructor. Deleted.

◆ BasicSystemIStreamWrapper() [3/3]

template<typename Elem , typename Traits = std::char_traits<Elem>>
System::IO::BasicSystemIStreamWrapper< Elem, Traits >::BasicSystemIStreamWrapper ( BasicSystemIStreamWrapper< 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::BasicSystemIStreamWrapper< Elem, Traits >::AssignRV ( BasicSystemIStreamWrapper< 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>>
BasicSystemIStreamWrapper& System::IO::BasicSystemIStreamWrapper< Elem, Traits >::operator= ( BasicSystemIStreamWrapper< 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>>
BasicSystemIStreamWrapper& System::IO::BasicSystemIStreamWrapper< Elem, Traits >::operator= ( const BasicSystemIStreamWrapper< Elem, Traits > &  )
delete

Copy assignment operator. Deleted.

◆ swap()

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

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

Parameters
rightRvalue reference to object to be swap