E-MailRelay

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

An output streambuf that writes to a fixed-size char buffer. More...

`#include <gomembuf.h>`

Inheritance diagram for G::basic_omembuf< Tchar >:
[legend]
Collaboration diagram for G::basic_omembuf< Tchar >:
[legend]

## Public Types
using | base_type = std::basic_streambuf< Tchar, std::char_traits< Tchar > >

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

## Detailed Description

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

An output streambuf that writes to a fixed-size char buffer.

Does not support seeking.

Eg:

std::array<char,10> buffer ;
G::basic_omembuf<char> sb( buffer.data() , buffer.size() ) ;
std::ostream out( &sb ) ;
G::basic_omembuf< char >

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

Definition at line 51 of file gomembuf.h.

## Member Typedef Documentation

## ◆ base_type

template<typename Tchar >

using G::basic_omembuf< Tchar >::base_type = std::basic_streambuf<Tchar,std::char_traits<Tchar> >

Definition at line 54 of file gomembuf.h.

## Constructor & Destructor Documentation

## ◆ basic_omembuf()

template<typename Tchar >

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

Constructor.

Definition at line 85 of file gomembuf.h.

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

- /tmp/slackdce/slackrepo.HKsbdz/build_emailrelay/emailrelay-2.6/src/glib/gomembuf.h