E-MailRelay

Public Member Functions | List of all members
G::omembuf Class Reference

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

`#include <gomembuf.h>`

Inheritance diagram for G::omembuf:

## Public Member Functions
| omembuf (char *p, std::size_t n)
| Constructor. More...
| omembuf (const omembuf &)=delete
| omembuf (omembuf &&)=delete
void | operator= (const omembuf &)=delete
void | operator= (omembuf &&)=delete

## Detailed Description

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

Does not support seeking.

Eg:

std::array<char,10> buffer ;
G::omembuf sb( &buffer[0] , buffer.size() ) ;
std::ostream out( &sb ) ;
G::omembuf
An output streambuf that writes to a fixed-size char buffer.
Definition: gomembuf.h:50

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 49 of file gomembuf.h.

## Constructor & Destructor Documentation

## ◆ omembuf()

G::omembuf::omembuf | ( | char * | p,
|  | std::size_t | n
| ) |  |
| inline

Constructor.

Definition at line 81 of file gomembuf.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/gomembuf.h