STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Private Attributes | List of all members
basic_ofstream< _Elem, _Traits > Class Template Reference
Inheritance diagram for basic_ofstream< _Elem, _Traits >:
basic_ostream< _Elem, _Traits > basic_ios< _Elem, _Traits > ios_base _Iosb< int >

Public Types

typedef basic_ofstream< _Elem, _Traits > _Myt
 
typedef basic_ostream< _Elem, _Traits > _Mybase
 
typedef basic_filebuf< _Elem, _Traits > _Myfb
 
typedef basic_ios< _Elem, _Traits > _Myios
 
- Public Types inherited from basic_ostream< _Elem, _Traits >
typedef basic_ostream< _Elem, _Traits > _Myt
 
typedef basic_ios< _Elem, _Traits > _Myios
 
typedef basic_streambuf< _Elem, _Traits > _Mysb
 
typedef ostreambuf_iterator< _Elem, _Traits > _Iter
 
typedef num_put< _Elem, _Iter_Nput
 
typedef _Traits::int_type int_type
 
typedef _Traits::pos_type pos_type
 
typedef _Traits::off_type off_type
 
- Public Types inherited from basic_ios< _Elem, _Traits >
typedef basic_ios< _Elem, _Traits > _Myt
 
typedef basic_ostream< _Elem, _Traits > _Myos
 
typedef basic_streambuf< _Elem, _Traits > _Mysb
 
typedef ctype< _Elem > _Ctype
 
typedef _Elem char_type
 
typedef _Traits traits_type
 
typedef _Traits::int_type int_type
 
typedef _Traits::pos_type pos_type
 
typedef _Traits::off_type off_type
 
- Public Types inherited from ios_base
enum  event { erase_event, imbue_event, copyfmt_event }
 
typedef _STD streamoff streamoff
 
typedef _STD streampos streampos
 
typedef void(__CLRCALL_OR_CDECLevent_callback) (event, ios_base &, int)
 
typedef unsigned int io_state
 
typedef unsigned int open_mode
 
typedef unsigned int seek_dir
 
- Public Types inherited from _Iosb< int >
enum  _Dummy_enum
 
enum  _Fmtflags
 
enum  _Iostate
 
enum  _Openmode
 
enum  _Seekdir
 
enum  
 

Public Member Functions

 basic_ofstream ()
 
 basic_ofstream (const char *_Filename, ios_base::openmode _Mode=ios_base::out, int _Prot=(int) ios_base::_Openprot)
 
 basic_ofstream (const string &_Str, ios_base::openmode _Mode=ios_base::out, int _Prot=(int) ios_base::_Openprot)
 
 basic_ofstream (const wchar_t *_Filename, ios_base::openmode _Mode=ios_base::out, int _Prot=(int) ios_base::_Openprot)
 
 basic_ofstream (const wstring &_Str, ios_base::openmode _Mode=ios_base::out, int _Prot=(int) ios_base::_Openprot)
 
 basic_ofstream (_Filet *_File)
 
 basic_ofstream (_Myt &&_Right)
 
_Mytoperator= (_Myt &&_Right)
 
void _Assign_rv (_Myt &&_Right)
 
void swap (_Myt &_Right)
 
 basic_ofstream (const _Myt &)=delete
 
_Mytoperator= (const _Myt &)=delete
 
void open (const wchar_t *_Filename, ios_base::openmode _Mode=ios_base::out, int _Prot=(int) ios_base::_Openprot)
 
void open (const wstring &_Str, ios_base::openmode _Mode=ios_base::out, int _Prot=(int) ios_base::_Openprot)
 
void open (const wchar_t *_Filename, ios_base::open_mode _Mode)
 
virtual __CLR_OR_THIS_CALL ~basic_ofstream () _NOEXCEPT
 
_Myfbrdbuf () const
 
bool is_open () const
 
void open (const char *_Filename, ios_base::openmode _Mode=ios_base::out, int _Prot=(int) ios_base::_Openprot)
 
void open (const string &_Str, ios_base::openmode _Mode=ios_base::out, int _Prot=(int) ios_base::_Openprot)
 
void open (const char *_Filename, ios_base::open_mode _Mode)
 
void close ()
 
- Public Member Functions inherited from basic_ostream< _Elem, _Traits >
__CLR_OR_THIS_CALL basic_ostream (basic_streambuf< _Elem, _Traits > *_Strbuf, bool _Isstd=false)
 
__CLR_OR_THIS_CALL basic_ostream (_Uninitialized, bool _Addit=true)
 
__CLR_OR_THIS_CALL basic_ostream (const _Myt &)=delete
 
_Myt &__CLR_OR_THIS_CALL operator= (const _Myt &)=delete
 
virtual __CLR_OR_THIS_CALL ~basic_ostream () _NOEXCEPT
 
bool __CLR_OR_THIS_CALL opfx ()
 
void __CLR_OR_THIS_CALL osfx ()
 
void __CLR_OR_THIS_CALL _Osfx ()
 
_Myt &__CLR_OR_THIS_CALL operator<< (_Myt &(__cdecl *_Pfn)(_Myt &))
 
_Myt &__CLR_OR_THIS_CALL operator<< (_Myios &(__cdecl *_Pfn)(_Myios &))
 
_Myt &__CLR_OR_THIS_CALL operator<< (ios_base &(__cdecl *_Pfn)(ios_base &))
 
_Myt &__CLR_OR_THIS_CALL operator<< (_Bool _Val)
 
_Myt &__CLR_OR_THIS_CALL operator<< (short _Val)
 
_Myt &__CLR_OR_THIS_CALL operator<< (unsigned short _Val)
 
_Myt &__CLR_OR_THIS_CALL operator<< (int _Val)
 
_Myt &__CLR_OR_THIS_CALL operator<< (unsigned int _Val)
 
_Myt &__CLR_OR_THIS_CALL operator<< (long _Val)
 
_Myt &__CLR_OR_THIS_CALL operator<< (unsigned long _Val)
 
_Myt &__CLR_OR_THIS_CALL operator<< (float _Val)
 
_Myt &__CLR_OR_THIS_CALL operator<< (double _Val)
 
_Myt &__CLR_OR_THIS_CALL operator<< (long double _Val)
 
_Myt &__CLR_OR_THIS_CALL operator<< (const void *_Val)
 
_Myt &__CLR_OR_THIS_CALL operator<< (_Mysb *_Strbuf)
 
_Myt &__CLR_OR_THIS_CALL put (_Elem _Ch)
 
_Myt &__CLR_OR_THIS_CALL write (const _Elem *_Str, streamsize _Count)
 
_Myt &__CLR_OR_THIS_CALL flush ()
 
_Myt &__CLR_OR_THIS_CALL seekp (pos_type _Pos)
 
_Myt &__CLR_OR_THIS_CALL seekp (off_type _Off, ios_base::seekdir _Way)
 
pos_type __CLR_OR_THIS_CALL tellp ()
 
template<>
basic_ostream< unsigned short, char_traits< unsigned short > > &__CLR_OR_THIS_CALL operator<< (unsigned short _Ch)
 
- Public Member Functions inherited from basic_ios< _Elem, _Traits >
__CLR_OR_THIS_CALL basic_ios (_Mysb *_Strbuf)
 
virtual __CLR_OR_THIS_CALL ~basic_ios () _NOEXCEPT
 
void __CLR_OR_THIS_CALL clear (iostate _State=goodbit, bool _Reraise=false)
 
void __CLR_OR_THIS_CALL clear (io_state _State)
 
void __CLR_OR_THIS_CALL setstate (iostate _State, bool _Reraise=false)
 
void __CLR_OR_THIS_CALL setstate (io_state _State)
 
_Myt &__CLR_OR_THIS_CALL copyfmt (const _Myt &_Right)
 
_Myos *__CLR_OR_THIS_CALL tie () const
 
_Myos *__CLR_OR_THIS_CALL tie (_Myos *_Newtie)
 
_Mysb *__CLR_OR_THIS_CALL rdbuf () const
 
_Mysb *__CLR_OR_THIS_CALL rdbuf (_Mysb *_Strbuf)
 
locale __CLR_OR_THIS_CALL imbue (const locale &_Loc)
 
_Elem __CLR_OR_THIS_CALL fill () const
 
_Elem __CLR_OR_THIS_CALL fill (_Elem _Newfill)
 
char __CLR_OR_THIS_CALL narrow (_Elem _Ch, char _Dflt= '\0') const
 
_Elem __CLR_OR_THIS_CALL widen (char _Byte) const
 
void __CLR_OR_THIS_CALL move (_Myt &_Right)
 
void __CLR_OR_THIS_CALL move (_Myt &&_Right)
 
void __CLR_OR_THIS_CALL swap (_Myt &_Right) _NOEXCEPT
 
void __CLR_OR_THIS_CALL set_rdbuf (_Mysb *_Strbuf)
 
__CLR_OR_THIS_CALL basic_ios (const _Myt &)=delete
 
_Myt &__CLR_OR_THIS_CALL operator= (const _Myt &)=delete
 
- Public Member Functions inherited from ios_base
 _BITMASK (_Fmtflags, fmtflags)
 
 _BITMASK (_Iostate, iostate)
 
 _BITMASK (_Openmode, openmode)
 
 _BITMASK (_Seekdir, seekdir)
 
__CLR_OR_THIS_CALL operator bool () const
 
bool __CLR_OR_THIS_CALL operator! () const
 
void __CLR_OR_THIS_CALL clear (iostate _State, bool _Reraise)
 
void __CLR_OR_THIS_CALL clear (iostate _State=goodbit)
 
void __CLR_OR_THIS_CALL clear (io_state _State)
 
iostate __CLR_OR_THIS_CALL rdstate () const
 
void __CLR_OR_THIS_CALL setstate (iostate _State, bool _Exreraise)
 
void __CLR_OR_THIS_CALL setstate (iostate _State)
 
void __CLR_OR_THIS_CALL setstate (io_state _State)
 
bool __CLR_OR_THIS_CALL good () const
 
bool __CLR_OR_THIS_CALL eof () const
 
bool __CLR_OR_THIS_CALL fail () const
 
bool __CLR_OR_THIS_CALL bad () const
 
iostate __CLR_OR_THIS_CALL exceptions () const
 
void __CLR_OR_THIS_CALL exceptions (iostate _Newexcept)
 
void __CLR_OR_THIS_CALL exceptions (io_state _State)
 
fmtflags __CLR_OR_THIS_CALL flags () const
 
fmtflags __CLR_OR_THIS_CALL flags (fmtflags _Newfmtflags)
 
fmtflags __CLR_OR_THIS_CALL setf (fmtflags _Newfmtflags)
 
fmtflags __CLR_OR_THIS_CALL setf (fmtflags _Newfmtflags, fmtflags _Mask)
 
void __CLR_OR_THIS_CALL unsetf (fmtflags _Mask)
 
streamsize __CLR_OR_THIS_CALL precision () const
 
streamsize __CLR_OR_THIS_CALL precision (streamsize _Newprecision)
 
streamsize __CLR_OR_THIS_CALL width () const
 
streamsize __CLR_OR_THIS_CALL width (streamsize _Newwidth)
 
locale __CLR_OR_THIS_CALL getloc () const
 
locale __CLR_OR_THIS_CALL imbue (const locale &_Loc)
 
long &__CLR_OR_THIS_CALL iword (int _Idx)
 
void *&__CLR_OR_THIS_CALL pword (int _Idx)
 
void __CLR_OR_THIS_CALL register_callback (event_callback _Pfn, int _Idx)
 
ios_base &__CLR_OR_THIS_CALL copyfmt (const ios_base &_Other)
 
void __CLR_OR_THIS_CALL swap (ios_base &_Right)
 
virtual __CLR_OR_THIS_CALL ~ios_base () _NOEXCEPT
 
 ios_base (const ios_base &)=delete
 
ios_baseoperator= (const ios_base &)=delete
 

Private Attributes

_Myfb _Filebuffer
 

Additional Inherited Members

- Static Public Member Functions inherited from ios_base
static int __CLRCALL_OR_CDECL xalloc ()
 
static bool __CLRCALL_OR_CDECL sync_with_stdio (bool _Newsync=true)
 
static _MRTIMP2_PURE_NPURE void __CLRCALL_PURE_OR_CDECL _Addstd (ios_base *)
 
- Public Attributes inherited from ios_base
size_t _Stdstr
 
- Static Public Attributes inherited from _Iosb< int >
static const _Fmtflags skipws
 
static const _Fmtflags unitbuf
 
static const _Fmtflags uppercase
 
static const _Fmtflags showbase
 
static const _Fmtflags showpoint
 
static const _Fmtflags showpos
 
static const _Fmtflags left
 
static const _Fmtflags right
 
static const _Fmtflags internal
 
static const _Fmtflags dec
 
static const _Fmtflags oct
 
static const _Fmtflags hex
 
static const _Fmtflags scientific
 
static const _Fmtflags fixed
 
static const _Fmtflags hexfloat
 
static const _Fmtflags boolalpha
 
static const _Fmtflags _Stdio
 
static const _Fmtflags adjustfield
 
static const _Fmtflags basefield
 
static const _Fmtflags floatfield
 
static const _Iostate goodbit
 
static const _Iostate eofbit
 
static const _Iostate failbit
 
static const _Iostate badbit
 
static const _Iostate _Hardfail
 
static const _Openmode in
 
static const _Openmode out
 
static const _Openmode ate
 
static const _Openmode app
 
static const _Openmode trunc
 
static const _Openmode _Nocreate
 
static const _Openmode _Noreplace
 
static const _Openmode binary
 
static const _Seekdir beg
 
static const _Seekdir cur
 
static const _Seekdir end
 
- Protected Member Functions inherited from basic_ostream< _Elem, _Traits >
__CLR_OR_THIS_CALL basic_ostream (_Myt &&_Right)
 
_Myt &__CLR_OR_THIS_CALL operator= (_Myt &&_Right)
 
void __CLR_OR_THIS_CALL swap (_Myt &_Right)
 
- Protected Member Functions inherited from basic_ios< _Elem, _Traits >
void __CLR_OR_THIS_CALL init (_Mysb *_Strbuf=0, bool _Isstd=false)
 
__CLR_OR_THIS_CALL basic_ios ()
 
- Protected Member Functions inherited from ios_base
__CLR_OR_THIS_CALL ios_base ()
 
void __CLR_OR_THIS_CALL _Init ()
 

Member Typedef Documentation

template<class _Elem, class _Traits>
typedef basic_ostream<_Elem, _Traits> basic_ofstream< _Elem, _Traits >::_Mybase
template<class _Elem, class _Traits>
typedef basic_filebuf<_Elem, _Traits> basic_ofstream< _Elem, _Traits >::_Myfb
template<class _Elem, class _Traits>
typedef basic_ios<_Elem, _Traits> basic_ofstream< _Elem, _Traits >::_Myios
template<class _Elem, class _Traits>
typedef basic_ofstream<_Elem, _Traits> basic_ofstream< _Elem, _Traits >::_Myt

Constructor & Destructor Documentation

template<class _Elem, class _Traits>
basic_ofstream< _Elem, _Traits >::basic_ofstream ( )
inline
929  : _Mybase(&_Filebuffer)
930  { // construct unopened
931  }
basic_ostream< _Elem, _Traits > _Mybase
Definition: fstream:924
_Myfb _Filebuffer
Definition: fstream:1102
template<class _Elem, class _Traits>
basic_ofstream< _Elem, _Traits >::basic_ofstream ( const char *  _Filename,
ios_base::openmode  _Mode = ios_base::out,
int  _Prot = (int)ios_base::_Openprot 
)
inlineexplicit
936  : _Mybase(&_Filebuffer)
937  { // construct with named file and specified mode
938  if (_Filebuffer.open(_Filename, _Mode | ios_base::out, _Prot) == 0)
940  }
static const _Openmode out
Definition: xiosbase:98
static const _Iostate failbit
Definition: xiosbase:89
_Check_return_ _In_ int _Mode
Definition: io.h:338
basic_ostream< _Elem, _Traits > _Mybase
Definition: fstream:924
_Myt * open(const char *_Filename, ios_base::openmode _Mode, int _Prot=(int) ios_base::_Openprot)
Definition: fstream:262
_In_z_ const char * _Filename
Definition: process.h:211
_Myfb _Filebuffer
Definition: fstream:1102
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
template<class _Elem, class _Traits>
basic_ofstream< _Elem, _Traits >::basic_ofstream ( const string _Str,
ios_base::openmode  _Mode = ios_base::out,
int  _Prot = (int)ios_base::_Openprot 
)
inlineexplicit
945  : _Mybase(&_Filebuffer)
946  { // construct with named file and specified mode
947  if (_Filebuffer.open(_Str.c_str(), _Mode | ios_base::out, _Prot) == 0)
949  }
static const _Openmode out
Definition: xiosbase:98
static const _Iostate failbit
Definition: xiosbase:89
_Check_return_ _In_ int _Mode
Definition: io.h:338
basic_ostream< _Elem, _Traits > _Mybase
Definition: fstream:924
const _Elem * c_str() const _NOEXCEPT
Definition: xstring:1737
_Myt * open(const char *_Filename, ios_base::openmode _Mode, int _Prot=(int) ios_base::_Openprot)
Definition: fstream:262
_Myfb _Filebuffer
Definition: fstream:1102
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
template<class _Elem, class _Traits>
basic_ofstream< _Elem, _Traits >::basic_ofstream ( const wchar_t _Filename,
ios_base::openmode  _Mode = ios_base::out,
int  _Prot = (int)ios_base::_Openprot 
)
inlineexplicit
954  : _Mybase(&_Filebuffer)
955  { // construct with wide-named file -- EXTENSION
956  if (_Filebuffer.open(_Filename, _Mode | ios_base::out, _Prot) == 0)
958  }
static const _Openmode out
Definition: xiosbase:98
static const _Iostate failbit
Definition: xiosbase:89
_Check_return_ _In_ int _Mode
Definition: io.h:338
basic_ostream< _Elem, _Traits > _Mybase
Definition: fstream:924
_Myt * open(const char *_Filename, ios_base::openmode _Mode, int _Prot=(int) ios_base::_Openprot)
Definition: fstream:262
_In_z_ const char * _Filename
Definition: process.h:211
_Myfb _Filebuffer
Definition: fstream:1102
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
template<class _Elem, class _Traits>
basic_ofstream< _Elem, _Traits >::basic_ofstream ( const wstring _Str,
ios_base::openmode  _Mode = ios_base::out,
int  _Prot = (int)ios_base::_Openprot 
)
inlineexplicit
963  : _Mybase(&_Filebuffer)
964  { // construct with wide-named file -- EXTENSION
965  if (_Filebuffer.open(_Str.c_str(), _Mode | ios_base::out, _Prot) == 0)
967  }
static const _Openmode out
Definition: xiosbase:98
static const _Iostate failbit
Definition: xiosbase:89
_Check_return_ _In_ int _Mode
Definition: io.h:338
basic_ostream< _Elem, _Traits > _Mybase
Definition: fstream:924
const _Elem * c_str() const _NOEXCEPT
Definition: xstring:1737
_Myt * open(const char *_Filename, ios_base::openmode _Mode, int _Prot=(int) ios_base::_Openprot)
Definition: fstream:262
_Myfb _Filebuffer
Definition: fstream:1102
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
template<class _Elem, class _Traits>
basic_ofstream< _Elem, _Traits >::basic_ofstream ( _Filet _File)
inlineexplicit
981  : _Mybase(&_Filebuffer),
982  _Filebuffer(_File)
983  { // construct with specified C stream
984  }
basic_ostream< _Elem, _Traits > _Mybase
Definition: fstream:924
_Myfb _Filebuffer
Definition: fstream:1102
template<class _Elem, class _Traits>
basic_ofstream< _Elem, _Traits >::basic_ofstream ( _Myt &&  _Right)
inline
987  : _Mybase(&_Filebuffer)
988  { // construct by moving _Right
989  _Assign_rv(_STD forward<_Myt>(_Right));
990  }
void _Assign_rv(_Myt &&_Right)
Definition: fstream:998
basic_ostream< _Elem, _Traits > _Mybase
Definition: fstream:924
_Myfb _Filebuffer
Definition: fstream:1102
const _Ty & _Right
Definition: algorithm:4087
template<class _Elem, class _Traits>
basic_ofstream< _Elem, _Traits >::basic_ofstream ( const _Myt )
delete
template<class _Elem, class _Traits>
virtual __CLR_OR_THIS_CALL basic_ofstream< _Elem, _Traits >::~basic_ofstream ( )
inlinevirtual
1060  { // destroy the object
1061  }

Member Function Documentation

template<class _Elem, class _Traits>
void basic_ofstream< _Elem, _Traits >::_Assign_rv ( _Myt &&  _Right)
inline
999  { // assign by moving _Right
1000  if (this != &_Right)
1001  { // different, worth moving
1002  _Filebuffer.close();
1003  this->swap(_Right);
1004  }
1005  }
_Myt * close()
Definition: fstream:334
void swap(_Myt &_Right)
Definition: fstream:1007
_Myfb _Filebuffer
Definition: fstream:1102
const _Ty & _Right
Definition: algorithm:4087
template<class _Elem, class _Traits>
void basic_ofstream< _Elem, _Traits >::close ( )
inline
1096  { // close the C stream
1097  if (_Filebuffer.close() == 0)
1099  }
static const _Iostate failbit
Definition: xiosbase:89
_Myt * close()
Definition: fstream:334
_Myfb _Filebuffer
Definition: fstream:1102
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
template<class _Elem, class _Traits>
bool basic_ofstream< _Elem, _Traits >::is_open ( ) const
inline
1069  { // test if C stream has been opened
1070  return (_Filebuffer.is_open());
1071  }
bool is_open() const
Definition: fstream:257
_Myfb _Filebuffer
Definition: fstream:1102
template<class _Elem, class _Traits>
void basic_ofstream< _Elem, _Traits >::open ( const wchar_t _Filename,
ios_base::openmode  _Mode = ios_base::out,
int  _Prot = (int)ios_base::_Openprot 
)
inline
1022  { // open a wide-named C stream -- EXTENSION
1023  if (_Filebuffer.open(_Filename, _Mode | ios_base::out, _Prot) == 0)
1025  else
1026  _Myios::clear(); // added with C++11
1027  }
static const _Openmode out
Definition: xiosbase:98
static const _Iostate failbit
Definition: xiosbase:89
_Check_return_ _In_ int _Mode
Definition: io.h:338
void __CLR_OR_THIS_CALL clear(iostate _State=goodbit, bool _Reraise=false)
Definition: ios:42
_Myt * open(const char *_Filename, ios_base::openmode _Mode, int _Prot=(int) ios_base::_Openprot)
Definition: fstream:262
_In_z_ const char * _Filename
Definition: process.h:211
_Myfb _Filebuffer
Definition: fstream:1102
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
template<class _Elem, class _Traits>
void basic_ofstream< _Elem, _Traits >::open ( const wstring _Str,
ios_base::openmode  _Mode = ios_base::out,
int  _Prot = (int)ios_base::_Openprot 
)
inline
1032  { // open a wide-named C stream -- EXTENSION
1033  open(_Str.c_str(), _Mode, _Prot);
1034  }
_Check_return_ _In_ int _Mode
Definition: io.h:338
const _Elem * c_str() const _NOEXCEPT
Definition: xstring:1737
void open(const wchar_t *_Filename, ios_base::openmode _Mode=ios_base::out, int _Prot=(int) ios_base::_Openprot)
Definition: fstream:1019
template<class _Elem, class _Traits>
void basic_ofstream< _Elem, _Traits >::open ( const wchar_t _Filename,
ios_base::open_mode  _Mode 
)
inline
1037  { // open a wide-named C stream (old style) -- EXTENSION
1038  open(_Filename, (ios_base::openmode)_Mode);
1039  }
_Check_return_ _In_ int _Mode
Definition: io.h:338
_In_z_ const char * _Filename
Definition: process.h:211
void open(const wchar_t *_Filename, ios_base::openmode _Mode=ios_base::out, int _Prot=(int) ios_base::_Openprot)
Definition: fstream:1019
template<class _Elem, class _Traits>
void basic_ofstream< _Elem, _Traits >::open ( const char *  _Filename,
ios_base::openmode  _Mode = ios_base::out,
int  _Prot = (int)ios_base::_Openprot 
)
inline
1076  { // open a C stream with specified mode
1077  if (_Filebuffer.open(_Filename, _Mode | ios_base::out, _Prot) == 0)
1079  else
1080  _Myios::clear(); // added with C++11
1081  }
static const _Openmode out
Definition: xiosbase:98
static const _Iostate failbit
Definition: xiosbase:89
_Check_return_ _In_ int _Mode
Definition: io.h:338
void __CLR_OR_THIS_CALL clear(iostate _State=goodbit, bool _Reraise=false)
Definition: ios:42
_Myt * open(const char *_Filename, ios_base::openmode _Mode, int _Prot=(int) ios_base::_Openprot)
Definition: fstream:262
_In_z_ const char * _Filename
Definition: process.h:211
_Myfb _Filebuffer
Definition: fstream:1102
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
template<class _Elem, class _Traits>
void basic_ofstream< _Elem, _Traits >::open ( const string _Str,
ios_base::openmode  _Mode = ios_base::out,
int  _Prot = (int)ios_base::_Openprot 
)
inline
1086  { // open a C stream with specified mode
1087  open(_Str.c_str(), _Mode, _Prot);
1088  }
_Check_return_ _In_ int _Mode
Definition: io.h:338
const _Elem * c_str() const _NOEXCEPT
Definition: xstring:1737
void open(const wchar_t *_Filename, ios_base::openmode _Mode=ios_base::out, int _Prot=(int) ios_base::_Openprot)
Definition: fstream:1019
template<class _Elem, class _Traits>
void basic_ofstream< _Elem, _Traits >::open ( const char *  _Filename,
ios_base::open_mode  _Mode 
)
inline
1091  { // open a C stream with specified mode (old style)
1092  open(_Filename, (ios_base::openmode)_Mode);
1093  }
_Check_return_ _In_ int _Mode
Definition: io.h:338
_In_z_ const char * _Filename
Definition: process.h:211
void open(const wchar_t *_Filename, ios_base::openmode _Mode=ios_base::out, int _Prot=(int) ios_base::_Openprot)
Definition: fstream:1019
template<class _Elem, class _Traits>
_Myt& basic_ofstream< _Elem, _Traits >::operator= ( _Myt &&  _Right)
inline
993  { // move from _Right
994  _Assign_rv(_STD forward<_Myt>(_Right));
995  return (*this);
996  }
void _Assign_rv(_Myt &&_Right)
Definition: fstream:998
const _Ty & _Right
Definition: algorithm:4087
template<class _Elem, class _Traits>
_Myt& basic_ofstream< _Elem, _Traits >::operator= ( const _Myt )
delete
template<class _Elem, class _Traits>
_Myfb* basic_ofstream< _Elem, _Traits >::rdbuf ( ) const
inline
1064  { // return pointer to file buffer
1065  return ((_Myfb *)&_Filebuffer);
1066  }
basic_filebuf< _Elem, _Traits > _Myfb
Definition: fstream:925
_Myfb _Filebuffer
Definition: fstream:1102
template<class _Elem, class _Traits>
void basic_ofstream< _Elem, _Traits >::swap ( _Myt _Right)
inline
1008  { // swap with _Right
1009  if (this != &_Right)
1010  { // different, swap base and buffer
1012  _Filebuffer.swap(_Right._Filebuffer);
1013  }
1014  }
void __CLR_OR_THIS_CALL swap(_Myt &_Right)
Definition: ostream:77
void swap(_Myt &_Right)
Definition: fstream:189
_Myfb _Filebuffer
Definition: fstream:1102
const _Ty & _Right
Definition: algorithm:4087

Member Data Documentation

template<class _Elem, class _Traits>
_Myfb basic_ofstream< _Elem, _Traits >::_Filebuffer
private

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