ReactOS  0.4.15-dev-1070-ge1a01de
basic_ofstream< _CharT, _Traits > Class Template Reference

#include <_fstream.h>

Inheritance diagram for basic_ofstream< _CharT, _Traits >:
Collaboration diagram for basic_ofstream< _CharT, _Traits >:

Public Types

typedef _CharT char_type
 
typedef _Traits::int_type int_type
 
typedef _Traits::pos_type pos_type
 
typedef _Traits::off_type off_type
 
typedef _Traits traits_type
 
typedef basic_ios< _CharT, _Traits > _Basic_ios
 
typedef basic_ostream< _CharT, _Traits > _Base
 
typedef basic_filebuf< _CharT, _Traits > _Buf
 
- Public Types inherited from basic_ostream< _CharT, _Traits >
typedef _CharT char_type
 
typedef _Traits::int_type int_type
 
typedef _Traits::pos_type pos_type
 
typedef _Traits::off_type off_type
 
typedef _Traits traits_type
 
typedef basic_ios< _CharT, _Traits > _Basic_ios
 
typedef basic_ios< _CharT, _Traits > &(_STLP_CALL__ios_fn) (basic_ios< _CharT, _Traits > &)
 
typedef ios_base &(_STLP_CALL__ios_base_fn) (ios_base &)
 
typedef _Self &(_STLP_CALL__ostream_fn) (_Self &)
 
- Public Types inherited from basic_ios< _CharT, _Traits >
typedef _CharT char_type
 
typedef _Traits::int_type int_type
 
typedef _Traits::pos_type pos_type
 
typedef _Traits::off_type off_type
 
typedef _Traits traits_type
 
- Public Types inherited from ios_base
enum  event { erase_event, imbue_event, copyfmt_event }
 
typedef int fmtflags
 
typedef int iostate
 
typedef int openmode
 
typedef int seekdir
 
typedef fmtflags fmt_flags
 
typedef void(* event_callback) (event, ios_base &, int __index)
 
typedef iostate io_state
 
typedef openmode open_mode
 
typedef seekdir seek_dir
 
typedef _STLP_STD::streamoff streamoff
 
typedef _STLP_STD::streampos streampos
 

Public Member Functions

 basic_ofstream ()
 
 basic_ofstream (const char *__s, ios_base::openmode __mod=ios_base::out)
 
 basic_ofstream (int __id, ios_base::openmode __mod=ios_base::out)
 
 basic_ofstream (const char *__s, ios_base::openmode __m, long __protection)
 
 ~basic_ofstream ()
 
basic_filebuf< _CharT, _Traits > * rdbuf () const
 
bool is_open ()
 
void open (const char *__s, ios_base::openmode __mod=ios_base::out)
 
void close ()
 
- Public Member Functions inherited from basic_ostream< _CharT, _Traits >
 basic_ostream (basic_streambuf< _CharT, _Traits > *__buf)
 
 ~basic_ostream ()
 
_Selfoperator<< (__ostream_fn __f)
 
_Selfoperator<< (__ios_base_fn __f)
 
_Selfoperator<< (__ios_fn __ff)
 
void _M_put_char (_CharT __c)
 
void _M_put_nowiden (const _CharT *__s)
 
void _M_put_widen (const char *__s)
 
bool _M_put_widen_aux (const char *__s, streamsize __n)
 
_Selfput (char_type __c)
 
_Selfwrite (const char_type *__s, streamsize __n)
 
_Selfoperator<< (basic_streambuf< _CharT, _Traits > *__buf)
 
_Selfoperator<< (unsigned char __x)
 
_Selfoperator<< (short __x)
 
_Selfoperator<< (unsigned short __x)
 
_Selfoperator<< (int __x)
 
_Selfoperator<< (unsigned int __x)
 
_Selfoperator<< (long __x)
 
_Selfoperator<< (unsigned long __x)
 
_Selfoperator<< (float __x)
 
_Selfoperator<< (double __x)
 
_Selfoperator<< (long double __x)
 
_Selfoperator<< (const void *__x)
 
_Selfoperator<< (bool __x)
 
_Selfflush ()
 
pos_type tellp ()
 
_Selfseekp (pos_type __pos)
 
_Selfseekp (off_type __off, ios_base::seekdir __dir)
 
- Public Member Functions inherited from basic_ios< _CharT, _Traits >
 basic_ios (basic_streambuf< _CharT, _Traits > *__streambuf)
 
virtual ~basic_ios ()
 
basic_ostream< _CharT, _Traits > * tie () const
 
basic_ostream< _CharT, _Traits > * tie (basic_ostream< char_type, traits_type > *__new_tied_ostream)
 
basic_streambuf< _CharT, _Traits > * rdbuf () const
 
basic_streambuf< _CharT, _Traits > * rdbuf (basic_streambuf< char_type, traits_type > *)
 
basic_ios< _CharT, _Traits > & copyfmt (const basic_ios< _CharT, _Traits > &__x)
 
char_type fill () const
 
char_type fill (char_type __fill)
 
void clear (iostate __state=goodbit)
 
void setstate (iostate __state)
 
iostate exceptions () const
 
void exceptions (iostate __mask)
 
locale imbue (const locale &)
 
char narrow (_CharT, char) const
 
_CharT widen (char) const
 
const ctype< char_type > * _M_ctype_facet () const
 
void _M_handle_exception (ios_base::iostate __flag)
 
- Public Member Functions inherited from ios_base
 _STLP_STATIC_CONSTANT (int, left=0x0001)
 
 _STLP_STATIC_CONSTANT (int, right=0x0002)
 
 _STLP_STATIC_CONSTANT (int, internal=0x0004)
 
 _STLP_STATIC_CONSTANT (int, dec=0x0008)
 
 _STLP_STATIC_CONSTANT (int, hex=0x0010)
 
 _STLP_STATIC_CONSTANT (int, oct=0x0020)
 
 _STLP_STATIC_CONSTANT (int, fixed=0x0040)
 
 _STLP_STATIC_CONSTANT (int, scientific=0x0080)
 
 _STLP_STATIC_CONSTANT (int, boolalpha=0x0100)
 
 _STLP_STATIC_CONSTANT (int, showbase=0x0200)
 
 _STLP_STATIC_CONSTANT (int, showpoint=0x0400)
 
 _STLP_STATIC_CONSTANT (int, showpos=0x0800)
 
 _STLP_STATIC_CONSTANT (int, skipws=0x1000)
 
 _STLP_STATIC_CONSTANT (int, unitbuf=0x2000)
 
 _STLP_STATIC_CONSTANT (int, uppercase=0x4000)
 
 _STLP_STATIC_CONSTANT (int, adjustfield=left|right|internal)
 
 _STLP_STATIC_CONSTANT (int, basefield=dec|hex|oct)
 
 _STLP_STATIC_CONSTANT (int, floatfield=scientific|fixed)
 
 _STLP_STATIC_CONSTANT (int, goodbit=0x00)
 
 _STLP_STATIC_CONSTANT (int, badbit=0x01)
 
 _STLP_STATIC_CONSTANT (int, eofbit=0x02)
 
 _STLP_STATIC_CONSTANT (int, failbit=0x04)
 
 _STLP_STATIC_CONSTANT (int, __default_mode=0x0)
 
 _STLP_STATIC_CONSTANT (int, app=0x01)
 
 _STLP_STATIC_CONSTANT (int, ate=0x02)
 
 _STLP_STATIC_CONSTANT (int, binary=0x04)
 
 _STLP_STATIC_CONSTANT (int, in=0x08)
 
 _STLP_STATIC_CONSTANT (int, out=0x10)
 
 _STLP_STATIC_CONSTANT (int, trunc=0x20)
 
 _STLP_STATIC_CONSTANT (int, beg=0x01)
 
 _STLP_STATIC_CONSTANT (int, cur=0x02)
 
 _STLP_STATIC_CONSTANT (int, end=0x04)
 
fmtflags flags () const
 
fmtflags flags (fmtflags __flags)
 
fmtflags setf (fmtflags __flag)
 
fmtflags setf (fmtflags __flag, fmtflags __mask)
 
void unsetf (fmtflags __mask)
 
streamsize precision () const
 
streamsize precision (streamsize __newprecision)
 
streamsize width () const
 
streamsize width (streamsize __newwidth)
 
locale imbue (const locale &)
 
locale getloc () const
 
longiword (int __index)
 
void *& pword (int __index)
 
virtual ~ios_base ()
 
void register_callback (event_callback __fn, int __index)
 
 operator void * () const
 
bool operator! () const
 
iostate rdstate () const
 
bool good () const
 
bool eof () const
 
bool fail () const
 
bool bad () const
 

Private Attributes

basic_filebuf< _CharT, _Traits > _M_buf
 

Additional Inherited Members

- Static Public Member Functions inherited from basic_ios< _CharT, _Traits >
static bool _STLP_CALL _S_eof (int_type __c)
 
- Static Public Member Functions inherited from ios_base
static int _STLP_CALL xalloc ()
 
static bool _STLP_CALL sync_with_stdio (bool __sync=true)
 
- Protected Member Functions inherited from basic_ios< _CharT, _Traits >
 basic_ios ()
 
void init (basic_streambuf< _CharT, _Traits > *__streambuf)
 
- Protected Member Functions inherited from ios_base
void _M_copy_state (const ios_base &__x)
 
void _M_setstate_nothrow (iostate __state)
 
void _M_clear_nothrow (iostate __state)
 
iostate _M_get_exception_mask () const
 
void _M_set_exception_mask (iostate __mask)
 
void _M_check_exception_mask ()
 
void _M_invoke_callbacks (event)
 
void _STLP_FUNCTION_THROWS _M_throw_failure ()
 
 ios_base ()
 
- Static Protected Member Functions inherited from ios_base
static void _STLP_CALL _S_initialize ()
 
static void _STLP_CALL _S_uninitialize ()
 
- Protected Attributes inherited from basic_ios< _CharT, _Traits >
const ctype< char_type > * _M_cached_ctype
 
- Static Protected Attributes inherited from ios_base
static bool _S_is_synced = true
 

Detailed Description

template<class _CharT, class _Traits>
class basic_ofstream< _CharT, _Traits >

Definition at line 533 of file _fstream.h.

Member Typedef Documentation

◆ _Base

template<class _CharT , class _Traits >
typedef basic_ostream<_CharT, _Traits> basic_ofstream< _CharT, _Traits >::_Base

Definition at line 542 of file _fstream.h.

◆ _Basic_ios

template<class _CharT , class _Traits >
typedef basic_ios<_CharT, _Traits> basic_ofstream< _CharT, _Traits >::_Basic_ios

Definition at line 541 of file _fstream.h.

◆ _Buf

template<class _CharT , class _Traits >
typedef basic_filebuf<_CharT, _Traits> basic_ofstream< _CharT, _Traits >::_Buf

Definition at line 543 of file _fstream.h.

◆ char_type

template<class _CharT , class _Traits >
typedef _CharT basic_ofstream< _CharT, _Traits >::char_type

Definition at line 535 of file _fstream.h.

◆ int_type

template<class _CharT , class _Traits >
typedef _Traits::int_type basic_ofstream< _CharT, _Traits >::int_type

Definition at line 536 of file _fstream.h.

◆ off_type

template<class _CharT , class _Traits >
typedef _Traits::off_type basic_ofstream< _CharT, _Traits >::off_type

Definition at line 538 of file _fstream.h.

◆ pos_type

template<class _CharT , class _Traits >
typedef _Traits::pos_type basic_ofstream< _CharT, _Traits >::pos_type

Definition at line 537 of file _fstream.h.

◆ traits_type

template<class _CharT , class _Traits >
typedef _Traits basic_ofstream< _CharT, _Traits >::traits_type

Definition at line 539 of file _fstream.h.

Constructor & Destructor Documentation

◆ basic_ofstream() [1/4]

template<class _CharT , class _Traits >
basic_ofstream< _CharT, _Traits >::basic_ofstream ( )
inline

Definition at line 546 of file _fstream.h.

546  :
549  this->init(&_M_buf);
550  }
Definition: _ios.h:48
basic_filebuf< _CharT, _Traits > _M_buf
Definition: _fstream.h:604
void init(basic_streambuf< _CharT, _Traits > *__streambuf)
Definition: _ios.c:97

◆ basic_ofstream() [2/4]

template<class _CharT , class _Traits >
basic_ofstream< _CharT, _Traits >::basic_ofstream ( const char __s,
ios_base::openmode  __mod = ios_base::out 
)
inlineexplicit

Definition at line 551 of file _fstream.h.

553  this->init(&_M_buf);
554  if (!_M_buf.open(__s, __mod | ios_base::out))
555  this->setstate(ios_base::failbit);
556  }
Definition: _ios.h:48
static FILE * out
Definition: regtests2xml.c:44
basic_filebuf< _CharT, _Traits > _M_buf
Definition: _fstream.h:604
void init(basic_streambuf< _CharT, _Traits > *__streambuf)
Definition: _ios.c:97
void setstate(iostate __state)
Definition: _ios.h:95

◆ basic_ofstream() [3/4]

template<class _CharT , class _Traits >
basic_ofstream< _CharT, _Traits >::basic_ofstream ( int  __id,
ios_base::openmode  __mod = ios_base::out 
)
inlineexplicit

Definition at line 559 of file _fstream.h.

561  _M_buf() {
562  this->init(&_M_buf);
563  if (!_M_buf.open(__id, __mod | ios_base::out))
564  this->setstate(ios_base::failbit);
565  }
Definition: _ios.h:48
static FILE * out
Definition: regtests2xml.c:44
basic_filebuf< _CharT, _Traits > _M_buf
Definition: _fstream.h:604
void init(basic_streambuf< _CharT, _Traits > *__streambuf)
Definition: _ios.c:97
void setstate(iostate __state)
Definition: _ios.h:95

◆ basic_ofstream() [4/4]

template<class _CharT , class _Traits >
basic_ofstream< _CharT, _Traits >::basic_ofstream ( const char __s,
ios_base::openmode  __m,
long  __protection 
)
inline

Definition at line 566 of file _fstream.h.

566  :
568  this->init(&_M_buf);
569  if (!_M_buf.open(__s, __m | ios_base::out, __protection))
570  this->setstate(ios_base::failbit);
571  }
Definition: _ios.h:48
static FILE * out
Definition: regtests2xml.c:44
basic_filebuf< _CharT, _Traits > _M_buf
Definition: _fstream.h:604
void init(basic_streambuf< _CharT, _Traits > *__streambuf)
Definition: _ios.c:97
void setstate(iostate __state)
Definition: _ios.h:95

◆ ~basic_ofstream()

template<class _CharT , class _Traits >
basic_ofstream< _CharT, _Traits >::~basic_ofstream ( )
inline

Definition at line 583 of file _fstream.h.

583 {}

Member Function Documentation

◆ close()

template<class _CharT , class _Traits >
void basic_ofstream< _CharT, _Traits >::close ( void  )
inline

Definition at line 598 of file _fstream.h.

598  {
599  if (!this->rdbuf()->close())
600  this->setstate(ios_base::failbit);
601  }
basic_filebuf< _CharT, _Traits > * rdbuf() const
Definition: _fstream.h:586
void setstate(iostate __state)
Definition: _ios.h:95
void close()
Definition: _fstream.h:598

◆ is_open()

template<class _CharT , class _Traits >
bool basic_ofstream< _CharT, _Traits >::is_open ( )
inline

Definition at line 589 of file _fstream.h.

589  {
590  return this->rdbuf()->is_open();
591  }
basic_filebuf< _CharT, _Traits > * rdbuf() const
Definition: _fstream.h:586

◆ open()

template<class _CharT , class _Traits >
void basic_ofstream< _CharT, _Traits >::open ( const char __s,
ios_base::openmode  __mod = ios_base::out 
)
inline

Definition at line 593 of file _fstream.h.

593  {
594  if (!this->rdbuf()->open(__s, __mod | ios_base::out))
595  this->setstate(ios_base::failbit);
596  }
basic_filebuf< _CharT, _Traits > * rdbuf() const
Definition: _fstream.h:586
void open(const char *__s, ios_base::openmode __mod=ios_base::out)
Definition: _fstream.h:593
static FILE * out
Definition: regtests2xml.c:44
void setstate(iostate __state)
Definition: _ios.h:95

◆ rdbuf()

template<class _CharT , class _Traits >
basic_filebuf<_CharT, _Traits>* basic_ofstream< _CharT, _Traits >::rdbuf ( ) const
inline

Definition at line 586 of file _fstream.h.

587  { return __CONST_CAST(_Buf*,&_M_buf); }
basic_filebuf< _CharT, _Traits > _M_buf
Definition: _fstream.h:604
#define __CONST_CAST(__x, __y)
Definition: features.h:584
basic_filebuf< _CharT, _Traits > _Buf
Definition: _fstream.h:543

Referenced by basic_ofstream< _CharT, _Traits >::close(), basic_ofstream< _CharT, _Traits >::is_open(), and basic_ofstream< _CharT, _Traits >::open().

Member Data Documentation

◆ _M_buf

template<class _CharT , class _Traits >
basic_filebuf<_CharT, _Traits> basic_ofstream< _CharT, _Traits >::_M_buf
private

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