_iosfwd.h 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. #ifndef _STLP_INTERNAL_IOSFWD
  2. #define _STLP_INTERNAL_IOSFWD
  3. #if defined (__sgi) && !defined (__GNUC__) && !defined (_STANDARD_C_PLUS_PLUS)
  4. # error This header file requires the -LANG:std option
  5. #endif
  6. // This file provides forward declarations of the most important I/O
  7. // classes. Note that almost all of those classes are class templates,
  8. // with default template arguments. According to the C++ standard,
  9. // if a class template is declared more than once in the same scope
  10. // then only one of those declarations may have default arguments.
  11. // <iosfwd> contains the same declarations as other headers, and including
  12. // both <iosfwd> and (say) <iostream> is permitted. This means that only
  13. // one header may contain those default template arguments.
  14. // In this implementation, the declarations in <iosfwd> contain default
  15. // template arguments. All of the other I/O headers include <iosfwd>.
  16. #ifndef _STLP_CHAR_TRAITS_H
  17. # include <stl/char_traits.h>
  18. #endif
  19. _STLP_BEGIN_NAMESPACE
  20. class ios_base;
  21. template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
  22. class basic_ios;
  23. template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
  24. class basic_streambuf;
  25. template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
  26. class basic_istream;
  27. template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
  28. class basic_ostream;
  29. template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
  30. class basic_iostream;
  31. template <class _CharT, _STLP_DFL_TMPL_PARAM( _Traits , char_traits<_CharT>),
  32. _STLP_DFL_TMPL_PARAM(_Allocator , allocator<_CharT>) >
  33. class basic_stringbuf;
  34. template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>),
  35. _STLP_DFL_TMPL_PARAM(_Allocator , allocator<_CharT>) >
  36. class basic_istringstream;
  37. template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>),
  38. _STLP_DFL_TMPL_PARAM(_Allocator , allocator<_CharT>) >
  39. class basic_ostringstream;
  40. template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>),
  41. _STLP_DFL_TMPL_PARAM(_Allocator , allocator<_CharT>) >
  42. class basic_stringstream;
  43. template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
  44. class basic_filebuf;
  45. template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
  46. class basic_ifstream;
  47. template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
  48. class basic_ofstream;
  49. template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
  50. class basic_fstream;
  51. template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
  52. class istreambuf_iterator;
  53. template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
  54. class ostreambuf_iterator;
  55. typedef basic_ios<char, char_traits<char> > ios;
  56. #if !defined (_STLP_NO_WCHAR_T)
  57. typedef basic_ios<wchar_t, char_traits<wchar_t> > wios;
  58. #endif
  59. // Forward declaration of class locale, and of the most important facets.
  60. class locale;
  61. template <class _Facet>
  62. #if defined (_STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS)
  63. struct _Use_facet {
  64. const locale& __loc;
  65. _Use_facet(const locale& __p_loc) : __loc(__p_loc) {}
  66. inline const _Facet& operator *() const;
  67. };
  68. # define use_facet *_Use_facet
  69. #else
  70. inline const _Facet& use_facet(const locale&);
  71. #endif
  72. template <class _CharT> class ctype;
  73. template <class _CharT> class ctype_byname;
  74. template <class _CharT> class collate;
  75. template <class _CharT> class collate_byname;
  76. _STLP_TEMPLATE_NULL class ctype<char>;
  77. _STLP_TEMPLATE_NULL class ctype_byname<char>;
  78. _STLP_TEMPLATE_NULL class collate<char>;
  79. _STLP_TEMPLATE_NULL class collate_byname<char>;
  80. #if !defined (_STLP_NO_WCHAR_T)
  81. _STLP_TEMPLATE_NULL class ctype<wchar_t>;
  82. _STLP_TEMPLATE_NULL class ctype_byname<wchar_t>;
  83. _STLP_TEMPLATE_NULL class collate<wchar_t>;
  84. _STLP_TEMPLATE_NULL class collate_byname<wchar_t>;
  85. #endif
  86. #if !(defined (__SUNPRO_CC) && __SUNPRO_CC < 0x500 )
  87. // Typedefs for ordinary (narrow-character) streams.
  88. //_STLP_TEMPLATE_NULL class basic_streambuf<char, char_traits<char> >;
  89. #endif
  90. typedef basic_istream<char, char_traits<char> > istream;
  91. typedef basic_ostream<char, char_traits<char> > ostream;
  92. typedef basic_iostream<char, char_traits<char> > iostream;
  93. typedef basic_streambuf<char,char_traits<char> > streambuf;
  94. typedef basic_stringbuf<char, char_traits<char>, allocator<char> > stringbuf;
  95. typedef basic_istringstream<char, char_traits<char>, allocator<char> > istringstream;
  96. typedef basic_ostringstream<char, char_traits<char>, allocator<char> > ostringstream;
  97. typedef basic_stringstream<char, char_traits<char>, allocator<char> > stringstream;
  98. typedef basic_filebuf<char, char_traits<char> > filebuf;
  99. typedef basic_ifstream<char, char_traits<char> > ifstream;
  100. typedef basic_ofstream<char, char_traits<char> > ofstream;
  101. typedef basic_fstream<char, char_traits<char> > fstream;
  102. #if !defined (_STLP_NO_WCHAR_T)
  103. // Typedefs for wide-character streams.
  104. typedef basic_streambuf<wchar_t, char_traits<wchar_t> > wstreambuf;
  105. typedef basic_istream<wchar_t, char_traits<wchar_t> > wistream;
  106. typedef basic_ostream<wchar_t, char_traits<wchar_t> > wostream;
  107. typedef basic_iostream<wchar_t, char_traits<wchar_t> > wiostream;
  108. typedef basic_stringbuf<wchar_t, char_traits<wchar_t>, allocator<wchar_t> > wstringbuf;
  109. typedef basic_istringstream<wchar_t, char_traits<wchar_t>, allocator<wchar_t> > wistringstream;
  110. typedef basic_ostringstream<wchar_t, char_traits<wchar_t>, allocator<wchar_t> > wostringstream;
  111. typedef basic_stringstream<wchar_t, char_traits<wchar_t>, allocator<wchar_t> > wstringstream;
  112. typedef basic_filebuf<wchar_t, char_traits<wchar_t> > wfilebuf;
  113. typedef basic_ifstream<wchar_t, char_traits<wchar_t> > wifstream;
  114. typedef basic_ofstream<wchar_t, char_traits<wchar_t> > wofstream;
  115. typedef basic_fstream<wchar_t, char_traits<wchar_t> > wfstream;
  116. #endif
  117. _STLP_END_NAMESPACE
  118. #endif
  119. // Local Variables:
  120. // mode:C++
  121. // End: