|
|
|
1 |
|
// iosfwd standard header |
2 |
|
#pragma once |
3 |
|
#ifndef _IOSFWD_ |
4 |
|
#define _IOSFWD_ |
5 |
|
#ifndef RC_INVOKED |
6 |
|
#include <cstdio> |
7 |
|
#include <cstring> |
8 |
|
#include <cwchar> |
9 |
|
#include <xstddef> |
10 |
|
#include <crtdbg.h> |
11 |
|
|
12 |
|
#ifdef _MSC_VER |
13 |
|
#pragma pack(push,_CRT_PACKING) |
14 |
|
#pragma warning(push,3) |
15 |
|
#endif /* _MSC_VER */ |
16 |
|
_STD_BEGIN |
17 |
|
|
18 |
|
// STREAM POSITIONING TYPES (from <streambuf>) |
19 |
|
#ifdef _WIN64 |
20 |
|
typedef __int64 streamoff; |
21 |
|
typedef __int64 streamsize; |
22 |
|
|
23 |
|
#else /* _WIN64 */ |
24 |
|
typedef long streamoff; |
25 |
|
typedef int streamsize; |
26 |
|
#endif /* _WIN64 */ |
27 |
|
|
28 |
|
#if defined(_FSEEK_OFF) |
29 |
|
|
30 |
|
#elif defined(_WIN64) |
31 |
|
#define _FSEEK_OFF(str, off, way) fseek(str, off, way) |
32 |
|
|
33 |
|
#else /* _WIN64 */ |
34 |
|
#define _FSEEK_OFF(str, off, way) _fseeki64(str, off, way) |
35 |
|
#endif /* _WIN64 */ |
36 |
|
|
37 |
|
#ifdef _M_CEE_PURE |
38 |
|
extern fpos_t& _Fpz; |
39 |
|
extern const streamoff& _BADOFF; |
40 |
|
#else |
41 |
|
extern _CRTDATA2 _PGLOBAL fpos_t _Fpz; |
42 |
|
extern _CRTDATA2 _PGLOBAL const streamoff _BADOFF; |
43 |
|
#endif |
44 |
|
|
45 |
|
// TEMPLATE CLASS fpos (from <streambuf>) |
46 |
|
template<class _Statetype> |
47 |
|
class fpos |
48 |
|
{ // store arbitrary file position |
49 |
|
typedef fpos<_Statetype> _Myt; |
50 |
|
|
51 |
|
public: |
52 |
|
__CLR_OR_THIS_CALL fpos(streamoff _Off = 0) |
53 |
|
: _Myoff(_Off), _Fpos(0), _Mystate(_Stz) |
54 |
|
{ // construct with stream offset |
55 |
|
} |
56 |
|
|
57 |
|
__CLR_OR_THIS_CALL fpos(_Statetype _State, fpos_t _Fileposition) |
58 |
|
: _Myoff(0), _Fpos(_Fileposition), _Mystate(_State) |
59 |
|
{ // construct with conversion state and C file position |
60 |
|
} |
61 |
|
|
62 |
|
_Statetype __CLR_OR_THIS_CALL state() const |
63 |
|
{ // return conversion state |
64 |
|
return (_Mystate); |
65 |
|
} |
66 |
|
|
67 |
|
void __CLR_OR_THIS_CALL state(_Statetype _State) |
68 |
|
{ // set conversion state |
69 |
|
_Mystate = _State; |
70 |
|
} |
71 |
|
|
72 |
|
fpos_t __CLR_OR_THIS_CALL seekpos() const |
73 |
|
{ // return C file position |
74 |
|
return (_Fpos); |
75 |
|
} |
76 |
|
|
77 |
|
__CLR_OR_THIS_CALL operator streamoff() const |
78 |
|
{ // return offset |
79 |
|
return ((streamoff)(_Myoff + _FPOSOFF(_Fpos))); |
80 |
|
} |
81 |
|
|
82 |
|
streamoff __CLR_OR_THIS_CALL operator-(const _Myt& _Right) const |
83 |
|
{ // return difference of file positions as an offset |
84 |
|
return ((streamoff)*this - (streamoff)_Right); |
85 |
|
} |
86 |
|
|
87 |
|
_Myt& __CLR_OR_THIS_CALL operator+=(streamoff _Off) |
644 |
|
class _Traits = char_traits<_Elem> > |
645 |
|
class basic_ios; |
646 |
|
template<class _Elem, |
647 |
|
class _Traits = char_traits<_Elem> > |
648 |
|
class istreambuf_iterator; |
649 |
|
template<class _Elem, |
650 |
|
class _Traits = char_traits<_Elem> > |
651 |
|
class ostreambuf_iterator; |
652 |
|
template<class _Elem, |
653 |
|
class _Traits = char_traits<_Elem> > |
654 |
|
class basic_streambuf; |
655 |
|
template<class _Elem, |
656 |
|
class _Traits = char_traits<_Elem> > |
657 |
|
class basic_istream; |
658 |
|
template<class _Elem, |
659 |
|
class _Traits = char_traits<_Elem> > |
660 |
|
class basic_ostream; |
661 |
|
template<class _Elem, |
662 |
|
class _Traits = char_traits<_Elem> > |
663 |
|
class basic_iostream; |
664 |
|
template<class _Elem, |
665 |
|
class _Traits = char_traits<_Elem>, |
666 |
|
class _Alloc = allocator<_Elem> > |
667 |
|
class basic_stringbuf; |
668 |
|
template<class _Elem, |
669 |
|
class _Traits = char_traits<_Elem>, |
670 |
|
class _Alloc = allocator<_Elem> > |
671 |
|
class basic_istringstream; |
672 |
|
template<class _Elem, |
673 |
|
class _Traits = char_traits<_Elem>, |
674 |
|
class _Alloc = allocator<_Elem> > |
675 |
|
class basic_ostringstream; |
676 |
|
template<class _Elem, |
677 |
|
class _Traits = char_traits<_Elem>, |
678 |
|
class _Alloc = allocator<_Elem> > |
679 |
|
class basic_stringstream; |
680 |
|
template<class _Elem, |
681 |
|
class _Traits = char_traits<_Elem> > |
682 |
|
class basic_filebuf; |
683 |
|
template<class _Elem, |
684 |
|
class _Traits = char_traits<_Elem> > |
685 |
|
class basic_ifstream; |
686 |
|
template<class _Elem, |
687 |
|
class _Traits = char_traits<_Elem> > |
688 |
|
class basic_ofstream; |
689 |
|
template<class _Elem, |
690 |
|
class _Traits = char_traits<_Elem> > |
691 |
|
class basic_fstream; |
692 |
|
|
693 |
|
#if defined(_DLL_CPPLIB) && !defined(_M_CEE_PURE) |
694 |
|
template<class _Elem, |
695 |
|
class _InIt > |
696 |
|
class num_get; |
697 |
|
template<class _Elem, |
698 |
|
class _OutIt > |
699 |
|
class num_put; |
700 |
|
template<class _Elem> |
701 |
|
class collate; |
702 |
|
#endif /* _DLL_CPPLIB */ |
703 |
|
|
704 |
|
// char TYPEDEFS |
705 |
|
typedef basic_ios<char, char_traits<char> > ios; |
706 |
|
typedef basic_streambuf<char, char_traits<char> > streambuf; |
707 |
|
typedef basic_istream<char, char_traits<char> > istream; |
708 |
|
typedef basic_ostream<char, char_traits<char> > ostream; |
709 |
|
typedef basic_iostream<char, char_traits<char> > iostream; |
710 |
|
typedef basic_stringbuf<char, char_traits<char>, |
711 |
|
allocator<char> > stringbuf; |
712 |
|
typedef basic_istringstream<char, char_traits<char>, |
713 |
|
allocator<char> > istringstream; |
714 |
|
typedef basic_ostringstream<char, char_traits<char>, |
715 |
|
allocator<char> > ostringstream; |
716 |
|
typedef basic_stringstream<char, char_traits<char>, |
717 |
|
allocator<char> > stringstream; |
718 |
|
typedef basic_filebuf<char, char_traits<char> > filebuf; |
719 |
|
typedef basic_ifstream<char, char_traits<char> > ifstream; |
720 |
|
typedef basic_ofstream<char, char_traits<char> > ofstream; |
721 |
|
typedef basic_fstream<char, char_traits<char> > fstream; |
722 |
|
|
723 |
|
// wchat_t TYPEDEFS |
724 |
|
typedef basic_ios<wchar_t, char_traits<wchar_t> > wios; |
725 |
|
typedef basic_streambuf<wchar_t, char_traits<wchar_t> > |
726 |
|
wstreambuf; |
727 |
|
typedef basic_istream<wchar_t, char_traits<wchar_t> > wistream; |
728 |
|
typedef basic_ostream<wchar_t, char_traits<wchar_t> > wostream; |
729 |
|
typedef basic_iostream<wchar_t, char_traits<wchar_t> > wiostream; |
730 |
|
typedef basic_stringbuf<wchar_t, char_traits<wchar_t>, |
731 |
|
allocator<wchar_t> > wstringbuf; |
732 |
|
typedef basic_istringstream<wchar_t, char_traits<wchar_t>, |
733 |
|
allocator<wchar_t> > wistringstream; |
734 |
|
typedef basic_ostringstream<wchar_t, char_traits<wchar_t>, |
735 |
|
allocator<wchar_t> > wostringstream; |
736 |
|
typedef basic_stringstream<wchar_t, char_traits<wchar_t>, |
737 |
|
allocator<wchar_t> > wstringstream; |
738 |
|
typedef basic_filebuf<wchar_t, char_traits<wchar_t> > wfilebuf; |
739 |
|
typedef basic_ifstream<wchar_t, char_traits<wchar_t> > wifstream; |
740 |
|
typedef basic_ofstream<wchar_t, char_traits<wchar_t> > wofstream; |
741 |
|
typedef basic_fstream<wchar_t, char_traits<wchar_t> > wfstream; |
742 |
|
|
743 |
|
|
744 |
|
|
745 |
|
#if defined(_DLL_CPPLIB) && !defined(_M_CEE_PURE) |
746 |
|
typedef num_get<char, istreambuf_iterator<char, char_traits<char> > > |
747 |
|
numget; |
748 |
|
typedef num_get<wchar_t, istreambuf_iterator<wchar_t, char_traits<wchar_t> > > |
749 |
|
wnumget; |
750 |
|
typedef num_put<char, ostreambuf_iterator<char, char_traits<char> > > |
751 |
|
numput; |
752 |
|
typedef num_put<wchar_t, ostreambuf_iterator<wchar_t, char_traits<wchar_t> > > |
753 |
|
wnumput; |
754 |
|
typedef collate<char> ncollate; |
755 |
|
typedef collate<wchar_t> wcollate; |
756 |
|
#endif /* _DLL_CPPLIB */ |
757 |
|
|
758 |
|
_STD_END |
759 |
|
|
760 |
|
#ifdef _MSC_VER |
761 |
|
#pragma warning(pop) |
762 |
|
#pragma pack(pop) |
763 |
|
#endif /* _MSC_VER */ |
764 |
|
|
765 |
|
#endif /* RC_INVOKED */ |
766 |
|
#endif /* _IOSFWD_ */ |
767 |
|
|
768 |
|
/* |
769 |
|
* Copyright (c) 1992-2008 by P.J. Plauger. ALL RIGHTS RESERVED. |
770 |
|
* Consult your license regarding permissions and restrictions. |
771 |
|
V5.05:0009 */ |
772 |
|
|
773 |
|
|
774 |
|
|
|
|
|