mod_servlet
C++Servlets
 All Classes Files Functions Variables Typedefs Macros Pages
servlet::basic_instream< Source, Buffering, CharT, Traits > Class Template Reference

Implementation of input stream object. More...

#include <io.h>

Inheritance diagram for servlet::basic_instream< Source, Buffering, CharT, Traits >:

Public Types

typedef CharT char_type
 Cacracter type to be used by this stream.
 
typedef Traits traits_type
 Type of character traits class to be used by this stream.
 
typedef traits_type::int_type int_type
 traits_type::int_type
 
typedef traits_type::pos_type pos_type
 traits_type::pos_type
 
typedef traits_type::off_type off_type
 traits_type::off_type
 

Public Member Functions

template<typename... Args>
 basic_instream (Args &&...args)
 Main constructor. More...
 
 basic_instream (const basic_instream &)=delete
 Sopying is prohibited.
 
 basic_instream (basic_instream &&other)
 Move constructor. More...
 
basic_instreamoperator= (basic_instream &&other)
 Move assignment operator. More...
 
 ~basic_instream () noexceptoverride
 Destructor.
 
Source & operator* ()
 Provides access to the reference to the Source instance associated with this stream. More...
 
Source * operator-> ()
 Provides access to the pointer to the Source instance associated with this stream. More...
 
const Source & operator* () const
 Provides access to the constant reference to the Source instance associated with this stream. More...
 
const Source * operator-> () const
 Provides access to the constant pointer to the Source instance associated with this stream. More...
 

Detailed Description

template<typename Source, typename Buffering, typename CharT, typename Traits = std::char_traits<CharT>>
class servlet::basic_instream< Source, Buffering, CharT, Traits >

Implementation of input stream object.

This class inherits from std::basic_istream and can be used as one.

This object uses the Source provided as a template parameter to write data to. The Source can be either source or buffer_provider.

Template Parameters
Sourcesource type to use to read data from.
BufferingBuffer size to be used.
CharTcharacter type for this stream
Traitscahracter traits type to be used in this stream.
See Also
source
buffer_provider

Constructor & Destructor Documentation

template<typename Source , typename Buffering , typename CharT , typename Traits = std::char_traits<CharT>>
template<typename... Args>
servlet::basic_instream< Source, Buffering, CharT, Traits >::basic_instream ( Args &&...  args)
inlineexplicit

Main constructor.

This generic constructor will pass received arguments to its buffer, which in turn will pass them to Source. Thus, generally, these arguments should be the ones to create the Source

Template Parameters
Argstypes of the arguments to forward to Source constructor
Parameters
argsArguments to be forwarded to construct the Source
template<typename Source , typename Buffering , typename CharT , typename Traits = std::char_traits<CharT>>
servlet::basic_instream< Source, Buffering, CharT, Traits >::basic_instream ( basic_instream< Source, Buffering, CharT, Traits > &&  other)
inline

Move constructor.

Parameters
otherbasic_instream which contents and state will be acquired by created object.

Member Function Documentation

template<typename Source , typename Buffering , typename CharT , typename Traits = std::char_traits<CharT>>
Source& servlet::basic_instream< Source, Buffering, CharT, Traits >::operator* ( )
inline

Provides access to the reference to the Source instance associated with this stream.

Returns
reference to the Source instance.
template<typename Source , typename Buffering , typename CharT , typename Traits = std::char_traits<CharT>>
const Source& servlet::basic_instream< Source, Buffering, CharT, Traits >::operator* ( ) const
inline

Provides access to the constant reference to the Source instance associated with this stream.

Returns
const reference to the Source instance.
template<typename Source , typename Buffering , typename CharT , typename Traits = std::char_traits<CharT>>
Source* servlet::basic_instream< Source, Buffering, CharT, Traits >::operator-> ( )
inline

Provides access to the pointer to the Source instance associated with this stream.

Returns
pointer to the Source instance.
template<typename Source , typename Buffering , typename CharT , typename Traits = std::char_traits<CharT>>
const Source* servlet::basic_instream< Source, Buffering, CharT, Traits >::operator-> ( ) const
inline

Provides access to the constant pointer to the Source instance associated with this stream.

Returns
const pointer to the Source instance.
template<typename Source , typename Buffering , typename CharT , typename Traits = std::char_traits<CharT>>
basic_instream& servlet::basic_instream< Source, Buffering, CharT, Traits >::operator= ( basic_instream< Source, Buffering, CharT, Traits > &&  other)
inline

Move assignment operator.

Parameters
otherbasic_instream which contents and state will be acquired by created object.
Returns
reference to self

The documentation for this class was generated from the following file: