SourcePro® API Reference Guide

 
Loading...
Searching...
No Matches
RWTPortalStreambuf< charT, traits > Class Template Reference

Streambuf that uses an RWPortal as its source and sink of bytes. More...

#include <rw/network/RWTPortalStreambuf.h>

Inherits std::basic_streambuf< charT, traits >.

Public Types

typedef charT char_type
 
typedef traits_type::int_type int_type
 
typedef traits traits_type
 

Public Member Functions

 RWTPortalStreambuf (const RWPortal &portal)
 
 RWTPortalStreambuf (void)
 
void setPortal (const RWPortal &portal, bool force=false)
 

Protected Member Functions

virtual int_type overflow (int_type=traits_type::eof())
 
virtual int_type underflow (void)
 

Detailed Description

template<class charT, class traits>
class RWTPortalStreambuf< charT, traits >

RWTPortalStreambuf is a streambuf that uses an RWPortal as its source and sink of bytes.

Member Typedef Documentation

◆ char_type

template<class charT , class traits >
typedef charT RWTPortalStreambuf< charT, traits >::char_type

A typedef for the character type used by this stream buffer. This is an alias for the charT template parameter.

◆ int_type

template<class charT , class traits >
typedef traits_type::int_type RWTPortalStreambuf< charT, traits >::int_type

A typedef for an integer type that is able to store all possible values of type char_type, including end-of-file.

◆ traits_type

template<class charT , class traits >
typedef traits RWTPortalStreambuf< charT, traits >::traits_type

A typedef for the character traits used by this stream buffer. This is an alias for the traits template parameter.

Constructor & Destructor Documentation

◆ RWTPortalStreambuf() [1/2]

template<class charT , class traits >
RWTPortalStreambuf< charT, traits >::RWTPortalStreambuf ( void )

Constructs a streambuf without a source or sink of bytes. You need to set the source and sink using setPortal() before using self.

◆ RWTPortalStreambuf() [2/2]

template<class charT , class traits >
RWTPortalStreambuf< charT, traits >::RWTPortalStreambuf ( const RWPortal & portal)

Constructs a streambuf connected to the portal portal.

Member Function Documentation

◆ overflow()

template<class charT , class traits >
virtual int_type RWTPortalStreambuf< charT, traits >::overflow ( int_type = traits_type::eof())
protectedvirtual

Writes to the portal when the buffer overflows.

◆ setPortal()

template<class charT , class traits >
void RWTPortalStreambuf< charT, traits >::setPortal ( const RWPortal & portal,
bool force = false )

Sets the communications channel into which you are writing. If force is true, the underlying portal is reassigned, and any exceptions thrown by the assignment are caught and ignored.

◆ underflow()

template<class charT , class traits >
virtual int_type RWTPortalStreambuf< charT, traits >::underflow ( void )
protectedvirtual

Reads from the portal when the buffer underflows.

Copyright © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.