ReactOS  0.4.15-dev-5112-g22d8c0f
full_streambuf Class Reference

#include <full_streambuf.h>

Inheritance diagram for full_streambuf:
Collaboration diagram for full_streambuf:

Public Types

typedef std::streambuf _Base
typedef _Base::int_type int_type
typedef _Base::traits_type traits_type

Public Member Functions

 full_streambuf (size_t nb_output, bool do_throw=false)
std::string conststr () const

Protected Member Functions

int_type overflow (int_type c)

Private Attributes

size_t _nb_output
bool _do_throw
std::string _buf

Detailed Description

Definition at line 11 of file full_streambuf.h.

Member Typedef Documentation

◆ _Base

Definition at line 13 of file full_streambuf.h.

◆ int_type

typedef _Base::int_type full_streambuf::int_type

Definition at line 15 of file full_streambuf.h.

◆ traits_type

typedef _Base::traits_type full_streambuf::traits_type

Definition at line 16 of file full_streambuf.h.

Constructor & Destructor Documentation

◆ full_streambuf()

full_streambuf::full_streambuf ( size_t  nb_output,
bool  do_throw = false 

Definition at line 18 of file full_streambuf.h.

19  : _nb_output(nb_output), _do_throw(do_throw)
20  {}

Member Function Documentation

◆ overflow()

int_type full_streambuf::overflow ( int_type  c)

Definition at line 26 of file full_streambuf.h.

26  {
27  if (_nb_output == 0) {
28 #if !defined (STLPORT) || defined (_STLP_USE_EXCEPTIONS)
29  if (_do_throw) {
30  throw "streambuf full";
31  }
32 #endif
33  return traits_type::eof();
34  }
35  --_nb_output;
36  _buf += traits_type::to_char_type(c);
37  return c;
38  }
const GLubyte * c
Definition: glext.h:8905
_Check_return_ _CRTIMP int __cdecl __cdecl eof(_In_ int _FileHandle)
std::string _buf
#define c
Definition: ke_i.h:80

◆ str()

std::string const& full_streambuf::str ( ) const

Definition at line 22 of file full_streambuf.h.

23  { return _buf; }
std::string _buf

Referenced by SstreamTest::streambuf_output(), and FstreamTest::streambuf_output().

Member Data Documentation

◆ _buf

std::string full_streambuf::_buf

Definition at line 43 of file full_streambuf.h.

Referenced by overflow(), and str().

◆ _do_throw

bool full_streambuf::_do_throw

Definition at line 42 of file full_streambuf.h.

Referenced by overflow().

◆ _nb_output

size_t full_streambuf::_nb_output

Definition at line 41 of file full_streambuf.h.

Referenced by overflow().

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