ReactOS 0.4.15-dev-8102-g108db8f
stdio_ostreambuf Class Reference

#include <stdio_streambuf.h>

Inheritance diagram for stdio_ostreambuf:
Collaboration diagram for stdio_ostreambuf:

Public Member Functions

 stdio_ostreambuf (FILE *__f)
 ~stdio_ostreambuf ()
- Public Member Functions inherited from stdio_streambuf_base
 stdio_streambuf_base (FILE *)
 ~stdio_streambuf_base ()
- Public Member Functions inherited from basic_streambuf< char, char_traits< char > >
virtual ~basic_streambuf ()
char_type_M_eback () const
char_type_M_gptr () const
char_type_M_egptr () const
void _M_gbump (int __n)
void _M_setg (char_type *__gbegin, char_type *__gnext, char_type *__gend)
basic_streambuf< char, char_traits< char > > * pubsetbuf (char_type *__s, streamsize __n)
pos_type pubseekoff (off_type __offset, ios_base::seekdir __way, ios_base::openmode __mod=ios_base::in|ios_base::out)
pos_type pubseekpos (pos_type __sp, ios_base::openmode __mod=ios_base::in|ios_base::out)
int pubsync ()
int_type sputc (char_type __c)
streamsize sputn (const char_type *__s, streamsize __n)
streamsize _M_sputnc (char_type __c, streamsize __n)
streamsize in_avail ()
int_type snextc ()
int_type sbumpc ()
int_type sgetc ()
streamsize sgetn (char_type *__s, streamsize __n)
int_type sputbackc (char_type __c)
int_type sungetc ()
locale pubimbue (const locale &)
locale getloc () const
void stossc ()

Protected Member Functions

streamsize showmanyc ()
int_type overflow (int_type c=traits_type::eof())
- Protected Member Functions inherited from stdio_streambuf_base
streambufsetbuf (char *, streamsize)
pos_type seekoff (off_type, ios_base::seekdir, ios_base::openmode=ios_base::in|ios_base::out)
pos_type seekpos (pos_type, ios_base::openmode=ios_base::in|ios_base::out)
int sync ()
- Protected Member Functions inherited from basic_streambuf< char, char_traits< char > >
 basic_streambuf ()
char_typeeback () const
char_typegptr () const
char_typeegptr () const
void gbump (int __n)
void setg (char_type *__gbegin, char_type *__gnext, char_type *__gend)
char_typepbase () const
char_typepptr () const
char_typeepptr () const
void pbump (int __n)
void setp (char_type *__pbegin, char_type *__pend)
virtual basic_streambuf< char, char_traits< char > > * setbuf (char_type *, streamsize)
virtual pos_type seekoff (off_type, ios_base::seekdir, ios_base::openmode=ios_base::in|ios_base::out)
virtual pos_type seekpos (pos_type, ios_base::openmode=ios_base::in|ios_base::out)
virtual int sync ()
virtual streamsize showmanyc ()
virtual streamsize xsgetn (char_type *__s, streamsize __n)
virtual int_type underflow ()
virtual int_type uflow ()
virtual int_type pbackfail (int_type=traits_type::eof())
virtual streamsize xsputn (const char_type *__s, streamsize __n)
virtual streamsize _M_xsputnc (char_type __c, streamsize __n)
virtual int_type overflow (int_type=traits_type::eof())
virtual void imbue (const locale &)

Additional Inherited Members

- Public Types inherited from basic_streambuf< char, char_traits< char > >
typedef char char_type
typedef _Traits::int_type int_type
typedef _Traits::pos_type pos_type
typedef _Traits::off_type off_type
typedef char_traits< chartraits_type
- Protected Attributes inherited from stdio_streambuf_base

Detailed Description

Definition at line 85 of file stdio_streambuf.h.

Constructor & Destructor Documentation

◆ stdio_ostreambuf()

stdio_ostreambuf::stdio_ostreambuf ( FILE __f)

Definition at line 87 of file stdio_streambuf.h.

◆ ~stdio_ostreambuf()

stdio_ostreambuf::~stdio_ostreambuf ( )

Definition at line 198 of file stdio_streambuf.cpp.


Member Function Documentation

◆ overflow()

stdio_ostreambuf::int_type stdio_ostreambuf::overflow ( int_type  c = traits_type::eof())

Definition at line 203 of file stdio_streambuf.cpp.

203 {
204 // Write the existing buffer, without writing any additional character.
205 if (c == traits_type::eof()) {
206 // Do we have a buffer to write?
207 ptrdiff_t unwritten = this->pptr() - this->pbase();
208 if (unwritten != 0) {
209 _STLP_VENDOR_CSTD::fflush(_M_file);
210 // Test if the write succeeded.
211 if (this->pptr() - this->pbase() < unwritten)
212 return traits_type::not_eof(c);
213 else
214 return traits_type::eof();
215 }
217 // We always succeed if we don't have to do anything.
218 else
219 return traits_type::not_eof(c);
220 }
222 // Write the character c, and whatever else might be in the buffer.
223 else {
224#ifdef _STLP_WCE
225 int result = fputc(c, _M_file);
227 int result = putc(c, _M_file);
229 return result != EOF ? result : traits_type::eof();
230 }
static int_type _STLP_CALL not_eof(const int_type &__c)
Definition: char_traits.h:181
static int_type _STLP_CALL eof()
Definition: char_traits.h:193
__kernel_ptrdiff_t ptrdiff_t
Definition: linux.h:247
const GLubyte * c
Definition: glext.h:8905
GLuint64EXT * result
Definition: glext.h:11304
#define EOF
Definition: stdio.h:24
_Check_return_opt_ _CRTIMP int __cdecl putc(_In_ int _Ch, _Inout_ FILE *_File)
_Check_return_opt_ _CRTIMP int __cdecl fputc(_In_ int _Ch, _Inout_ FILE *_File)

◆ showmanyc()

streamsize stdio_ostreambuf::showmanyc ( )

Reimplemented from basic_streambuf< char, char_traits< char > >.

Definition at line 200 of file stdio_streambuf.cpp.

201{ return -1; }

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