STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Macros | Functions
fstream File Reference
#include <istream>

Classes

class  basic_filebuf< _Elem, _Traits >
 
class  basic_ifstream< _Elem, _Traits >
 
class  basic_ofstream< _Elem, _Traits >
 
class  basic_fstream< _Elem, _Traits >
 

Macros

#define _FSTREAM_
 
#define _IORCNT   _IOCNT /* read and write counts are the same */
 
#define _IOWCNT   _IOCNT
 

Functions

_STD_BEGIN _CRTIMP2_PURE _Filet *__CLRCALL_PURE_OR_CDECL _Fiopen (const char *, ios_base::openmode, int)
 
_CRTIMP2_PURE _Filet *__CLRCALL_PURE_OR_CDECL _Fiopen (const wchar_t *, ios_base::openmode, int)
 
template<class _Elem >
bool _Fgetc (_Elem &_Ch, _Filet *_File)
 
template<>
bool _Fgetc (char &_Byte, _Filet *_File)
 
template<>
bool _Fgetc (wchar_t &_Wchar, _Filet *_File)
 
template<class _Elem >
bool _Fputc (_Elem _Ch, _Filet *_File)
 
template<>
bool _Fputc (char _Byte, _Filet *_File)
 
template<>
bool _Fputc (wchar_t _Wchar, _Filet *_File)
 
template<class _Elem >
bool _Ungetc (const _Elem &_Ch, _Filet *_File)
 
template<>
bool _Ungetc (const char &_Byte, _Filet *_File)
 
template<>
bool _Ungetc (const signed char &_Byte, _Filet *_File)
 
template<>
bool _Ungetc (const unsigned char &_Byte, _Filet *_File)
 
template<>
bool _Ungetc (const wchar_t &_Wchar, _Filet *_File)
 
template<class _Elem , class _Traits >
void swap (basic_filebuf< _Elem, _Traits > &_Left, basic_filebuf< _Elem, _Traits > &_Right)
 
template<class _Elem , class _Traits >
void swap (basic_ifstream< _Elem, _Traits > &_Left, basic_ifstream< _Elem, _Traits > &_Right)
 
template<class _Elem , class _Traits >
void swap (basic_ofstream< _Elem, _Traits > &_Left, basic_ofstream< _Elem, _Traits > &_Right)
 
template<class _Elem , class _Traits >
void swap (basic_fstream< _Elem, _Traits > &_Left, basic_fstream< _Elem, _Traits > &_Right)
 

Macro Definition Documentation

#define _FSTREAM_
#define _IORCNT   _IOCNT /* read and write counts are the same */
#define _IOWCNT   _IOCNT

Function Documentation

template<class _Elem >
bool _Fgetc ( _Elem &  _Ch,
_Filet _File 
)
inline
32  { // get an element from a C stream
33  return (fread(&_Ch, sizeof (_Elem), 1, _File) == 1);
34  }
_Check_return_ _In_ wchar_t _Ch
Definition: vcruntime_string.h:89
template<>
bool _Fgetc ( char &  _Byte,
_Filet _File 
)
inline
37  { // get a char element from a C stream
38  int _Meta;
39  if ((_Meta = fgetc(_File)) == EOF)
40  return (false);
41  else
42  { // got one, convert to char
43  _Byte = (char)_Meta;
44  return (true);
45  }
46  }
template<>
bool _Fgetc ( wchar_t _Wchar,
_Filet _File 
)
inline
49  { // get a wchar_t element from a C stream
50  wint_t _Meta;
51  if ((_Meta = _CSTD fgetwc(_File)) == WEOF)
52  return (false);
53  else
54  { // got one, convert to wchar_t
55  _Wchar = (wchar_t)_Meta;
56  return (true);
57  }
58  }
unsigned short wchar_t
Definition: sourceannotations.h:25
#define _CSTD
Definition: yvals.h:570
_STD_BEGIN _CRTIMP2_PURE _Filet* __CLRCALL_PURE_OR_CDECL _Fiopen ( const char *  ,
ios_base::openmode  ,
int   
)
_CRTIMP2_PURE _Filet* __CLRCALL_PURE_OR_CDECL _Fiopen ( const wchar_t ,
ios_base::openmode  ,
int   
)
template<class _Elem >
bool _Fputc ( _Elem  _Ch,
_Filet _File 
)
inline
77  { // put an element to a C stream
78  return (fwrite(&_Ch, 1, sizeof (_Elem), _File) == sizeof (_Elem));
79  }
_Check_return_ _In_ wchar_t _Ch
Definition: vcruntime_string.h:89
template<>
bool _Fputc ( char  _Byte,
_Filet _File 
)
inline
82  { // put a char element to a C stream
83  return (fputc(_Byte, _File) != EOF);
84  }
template<>
bool _Fputc ( wchar_t  _Wchar,
_Filet _File 
)
inline
87  { // put a wchar_t element to a C stream
88  return (_CSTD fputwc(_Wchar, _File) != WEOF);
89  }
#define _CSTD
Definition: yvals.h:570
template<class _Elem >
bool _Ungetc ( const _Elem &  _Ch,
_Filet _File 
)
inline
101  { // put back an arbitrary element to a C stream (always fail)
102  return (false);
103  }
template<>
bool _Ungetc ( const char &  _Byte,
_Filet _File 
)
inline
106  { // put back a char element to a C stream
107  return (ungetc((unsigned char)_Byte, _File) != EOF);
108  }
template<>
bool _Ungetc ( const signed char &  _Byte,
_Filet _File 
)
inline
111  { // put back a signed char element to a C stream
112  return (ungetc((unsigned char)_Byte, _File) != EOF);
113  }
template<>
bool _Ungetc ( const unsigned char &  _Byte,
_Filet _File 
)
inline
116  { // put back an unsigned char element to a C stream
117  return (ungetc(_Byte, _File) != EOF);
118  }
template<>
bool _Ungetc ( const wchar_t _Wchar,
_Filet _File 
)
inline
121  { // put back a wchar_t element to a C stream
122  return (_CSTD ungetwc(_Wchar, _File) != WEOF);
123  }
#define _CSTD
Definition: yvals.h:570
template<class _Elem , class _Traits >
void swap ( basic_filebuf< _Elem, _Traits > &  _Left,
basic_filebuf< _Elem, _Traits > &  _Right 
)
inline
727  { // swap _Left and _Right basic_filebufs
728  _Left.swap(_Right);
729  }
void swap(_Myt &_Right)
Definition: fstream:189
template<class _Elem , class _Traits >
void swap ( basic_ifstream< _Elem, _Traits > &  _Left,
basic_ifstream< _Elem, _Traits > &  _Right 
)
inline
931  { // swap _Left and _Right basic_ifstreams
932  _Left.swap(_Right);
933  }
void swap(_Myt &_Right)
Definition: fstream:822
template<class _Elem , class _Traits >
void swap ( basic_ofstream< _Elem, _Traits > &  _Left,
basic_ofstream< _Elem, _Traits > &  _Right 
)
inline
1135  { // swap _Left and _Right basic_ofstreams
1136  _Left.swap(_Right);
1137  }
void swap(_Myt &_Right)
Definition: fstream:1026
template<class _Elem , class _Traits >
void swap ( basic_fstream< _Elem, _Traits > &  _Left,
basic_fstream< _Elem, _Traits > &  _Right 
)
inline
1344  { // swap _Left and _Right basic_fstreams
1345  _Left.swap(_Right);
1346  }
void swap(_Myt &_Right)
Definition: fstream:1235