E-MailRelay

Public Member Functions | Protected Member Functions | List of all members
G::basic_imembuf< Tchar > Class Template Reference

An input streambuf that takes its data from a fixed-size const buffer. More...

`#include <gimembuf.h>`

Inheritance diagram for G::basic_imembuf< Tchar >:

## Public Member Functions
| basic_imembuf (const Tchar *p, std::size_t n)
| Constructor. More...
| basic_imembuf (basic_string_view< Tchar >)
| Constructor. More...
| basic_imembuf (const basic_imembuf< Tchar > &)=delete
| basic_imembuf (basic_imembuf< Tchar > &&)=delete
void | operator= (const basic_imembuf< Tchar > &)=delete
void | operator= (basic_imembuf< Tchar > &&)=delete

## Protected Member Functions
std::streamsize | xsgetn (Tchar *s, std::streamsize n) override
std::streampos | seekpos (std::streampos pos, std::ios_base::openmode which) override
std::streampos | seekoff (std::streamoff off, std::ios_base::seekdir way, std::ios_base::openmode which) override

## Detailed Description

template<typename Tchar>
class G::basic_imembuf< Tchar >

An input streambuf that takes its data from a fixed-size const buffer.

Eg:

std::array<char,10> buffer ;
G::imembuf sb( &buffer[0] , buffer.size() ) ;
std::istream in( &sb ) ;
G::basic_imembuf
An input streambuf that takes its data from a fixed-size const buffer.
Definition: gimembuf.h:53

An alternative approach is to use std::istringstream with pubsetbuf() but there is no guarantee that the std::stringbuf implementation has a useful override of setbuf() (ie. msvc).

Definition at line 52 of file gimembuf.h.

## Constructor & Destructor Documentation

## ◆ basic_imembuf() [1/2]

template<typename Tchar >

G::basic_imembuf< Tchar >::basic_imembuf | ( | const Tchar * | p,
|  | std::size_t | n
| ) |  |

Constructor.

Definition at line 98 of file gimembuf.h.

## ◆ basic_imembuf() [2/2]

template<typename Tchar >

G::basic_imembuf< Tchar >::basic_imembuf | ( | basic_string_view< Tchar > | s | ) |
| explicit

Constructor.

Definition at line 88 of file gimembuf.h.

## Member Function Documentation

## ◆ seekoff()

template<typename Tchar >

std::streampos G::basic_imembuf< Tchar >::seekoff | ( | std::streamoff | off,
|  | std::ios_base::seekdir | way,
|  | std::ios_base::openmode | which
| ) |  |
| override protected

Definition at line 140 of file gimembuf.h.

## ◆ seekpos()

template<typename Tchar >

std::streampos G::basic_imembuf< Tchar >::seekpos | ( | std::streampos | pos,
|  | std::ios_base::openmode | which
| ) |  |
| override protected

Definition at line 122 of file gimembuf.h.

## ◆ xsgetn()

template<typename Tchar >

std::streamsize G::basic_imembuf< Tchar >::xsgetn | ( | Tchar * | s,
|  | std::streamsize | n
| ) |  |
| override protected

Definition at line 108 of file gimembuf.h.

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

- /usr/src/slapt-src-x86_64/network/emailrelay/emailrelay-2.3/src/glib/gimembuf.h