Commit 840ceb34 by Phil Edwards

TODO: Note change in clause 27 docs.

2002-11-21  Phil Edwards  <pme@gcc.gnu.org>

	* docs/doxygen/TODO:  Note change in clause 27 docs.
	* include/bits/basic_ios.h, include/bits/fpos.h,
	include/bits/ios_base.h, include/bits/stl_deque.h,
	include/bits/stl_iterator_base_types.h, include/std/std_fstream.h,
	include/std/std_iomanip.h, include/std/std_iosfwd.h,
	include/std/std_iostream.h, include/std/std_istream.h,
	include/std/std_ostream.h, include/std/std_sstream.h,
	include/std/std_streambuf.h:  Doxygenate all I/O entities.

From-SVN: r59325
parent 02f0f531
2002-11-21 Phil Edwards <pme@gcc.gnu.org>
* docs/doxygen/TODO: Note change in clause 27 docs.
* include/bits/basic_ios.h, include/bits/fpos.h,
include/bits/ios_base.h, include/bits/stl_deque.h,
include/bits/stl_iterator_base_types.h, include/std/std_fstream.h,
include/std/std_iomanip.h, include/std/std_iosfwd.h,
include/std/std_iostream.h, include/std/std_istream.h,
include/std/std_ostream.h, include/std/std_sstream.h,
include/std/std_streambuf.h: Doxygenate all I/O entities.
2002-11-20 Benjamin Kosnik <bkoz@redhat.com> 2002-11-20 Benjamin Kosnik <bkoz@redhat.com>
Jonathan Lennox <lennox@cs.columbia.edu> Jonathan Lennox <lennox@cs.columbia.edu>
......
...@@ -31,7 +31,11 @@ c24 stl_iterator.h (__normal_iterator, other small TODO bits) ...@@ -31,7 +31,11 @@ c24 stl_iterator.h (__normal_iterator, other small TODO bits)
stream iterators stream iterators
c25 stl_algo.h (lots of stuff) c25 stl_algo.h (lots of stuff)
c26 <complex>, <valarray>, stl_numeric.h[26.4], Note A c26 <complex>, <valarray>, stl_numeric.h[26.4], Note A
c27 Untouched c27 ios_base callbacks and local storage
basic_ios::copyfmt()
std_streambuf.h's __copy_streambufs()
" " _M_* protected memfns (data has been done)
fstream and sstream protected members
backward/* Not scanned by doxygen. Should it be? Doubtful. backward/* Not scanned by doxygen. Should it be? Doubtful.
......
...@@ -48,7 +48,10 @@ namespace std ...@@ -48,7 +48,10 @@ namespace std
{ {
// 27.4.1 Types // 27.4.1 Types
// 27.4.3 Template class fpos // [27.4.3] template class fpos
/**
* @doctodo
*/
template<typename _StateT> template<typename _StateT>
class fpos class fpos
{ {
...@@ -113,9 +116,10 @@ namespace std ...@@ -113,9 +116,10 @@ namespace std
_M_position(streamoff __off) { _M_off = __off; } _M_position(streamoff __off) { _M_off = __off; }
}; };
// 27.2, paragraph 10 about fpos/char_traits circularity /// 27.2, paragraph 10 about fpos/char_traits circularity
typedef fpos<mbstate_t> streampos; typedef fpos<mbstate_t> streampos;
# ifdef _GLIBCPP_USE_WCHAR_T # ifdef _GLIBCPP_USE_WCHAR_T
/// 27.2, paragraph 10 about fpos/char_traits circularity
typedef fpos<mbstate_t> wstreampos; typedef fpos<mbstate_t> wstreampos;
# endif # endif
} // namespace std } // namespace std
......
...@@ -1280,7 +1280,8 @@ namespace std ...@@ -1280,7 +1280,8 @@ namespace std
} }
// called by the second initialize_dispatch above // called by the second initialize_dispatch above
/** @{ //@{
/**
* @if maint * @if maint
* @brief Fills the deque with whatever is in [first,last). * @brief Fills the deque with whatever is in [first,last).
* @param first An input iterator. * @param first An input iterator.
...@@ -1302,7 +1303,7 @@ namespace std ...@@ -1302,7 +1303,7 @@ namespace std
void void
_M_range_initialize(_ForwardIterator __first, _ForwardIterator __last, _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last,
forward_iterator_tag); forward_iterator_tag);
/** @} */ //@}
/** /**
* @if maint * @if maint
...@@ -1383,7 +1384,8 @@ namespace std ...@@ -1383,7 +1384,8 @@ namespace std
} }
/** @{ //@{
/**
* @if maint * @if maint
* @brief Helper functions for push_* and pop_*. * @brief Helper functions for push_* and pop_*.
* @endif * @endif
...@@ -1396,7 +1398,7 @@ namespace std ...@@ -1396,7 +1398,7 @@ namespace std
#endif #endif
void _M_pop_back_aux(); void _M_pop_back_aux();
void _M_pop_front_aux(); void _M_pop_front_aux();
/** @} */ //@}
// Internal insert functions follow. The *_aux functions do the actual // Internal insert functions follow. The *_aux functions do the actual
...@@ -1462,7 +1464,8 @@ namespace std ...@@ -1462,7 +1464,8 @@ namespace std
iterator _M_insert_aux(iterator __pos); iterator _M_insert_aux(iterator __pos);
#endif #endif
/** @{ //@{
/**
* @if maint * @if maint
* @brief Memory-handling helpers for the previous internal insert * @brief Memory-handling helpers for the previous internal insert
* functions. * functions.
...@@ -1491,10 +1494,11 @@ namespace std ...@@ -1491,10 +1494,11 @@ namespace std
void void
_M_new_elements_at_back(size_type __new_elements); _M_new_elements_at_back(size_type __new_elements);
/** @} */ //@}
/** @{ //@{
/**
* @if maint * @if maint
* @brief Memory-handling helpers for the major %map. * @brief Memory-handling helpers for the major %map.
* *
...@@ -1519,7 +1523,7 @@ namespace std ...@@ -1519,7 +1523,7 @@ namespace std
void void
_M_reallocate_map(size_type __nodes_to_add, bool __add_at_front); _M_reallocate_map(size_type __nodes_to_add, bool __add_at_front);
/** @} */ //@}
}; };
......
...@@ -68,7 +68,8 @@ ...@@ -68,7 +68,8 @@
namespace std namespace std
{ {
/** @{ //@{
/**
* @defgroup iterator_tags Iterator Tags * @defgroup iterator_tags Iterator Tags
* These are empty types, used to distinguish different iterators. The * These are empty types, used to distinguish different iterators. The
* distinction is not made by what they contain, but simply by what they * distinction is not made by what they contain, but simply by what they
......
...@@ -47,8 +47,18 @@ ...@@ -47,8 +47,18 @@
namespace std namespace std
{ {
// [27.6.3] standard manipulators
// Also see DR 183.
struct _Resetiosflags { ios_base::fmtflags _M_mask; }; struct _Resetiosflags { ios_base::fmtflags _M_mask; };
/**
* @brief Manipulator for @c setf.
* @param mask A format flags mask.
*
* Sent to a stream object, this manipulator resets the specified flags,
* via @e stream.setf(0,mask).
*/
inline _Resetiosflags inline _Resetiosflags
resetiosflags(ios_base::fmtflags __mask) resetiosflags(ios_base::fmtflags __mask)
{ {
...@@ -76,6 +86,13 @@ namespace std ...@@ -76,6 +86,13 @@ namespace std
struct _Setiosflags { ios_base::fmtflags _M_mask; }; struct _Setiosflags { ios_base::fmtflags _M_mask; };
/**
* @brief Manipulator for @c setf.
* @param mask A format flags mask.
*
* Sent to a stream object, this manipulator sets the format flags
* to @a mask.
*/
inline _Setiosflags inline _Setiosflags
setiosflags(ios_base::fmtflags __mask) setiosflags(ios_base::fmtflags __mask)
{ {
...@@ -103,6 +120,14 @@ namespace std ...@@ -103,6 +120,14 @@ namespace std
struct _Setbase { int _M_base; }; struct _Setbase { int _M_base; };
/**
* @brief Manipulator for @c setf.
* @param base A numeric base.
*
* Sent to a stream object, this manipulator changes the
* @c ios_base::basefield flags to @c oct, @c dec, or @c hex when @a base
* is 8, 10, or 16, accordingly, and to 0 if @a base is any other value.
*/
inline _Setbase inline _Setbase
setbase(int __base) setbase(int __base)
{ {
...@@ -137,6 +162,13 @@ namespace std ...@@ -137,6 +162,13 @@ namespace std
template<typename _CharT> template<typename _CharT>
struct _Setfill { _CharT _M_c; }; struct _Setfill { _CharT _M_c; };
/**
* @brief Manipulator for @c fill.
* @param c The new fill character.
*
* Sent to a stream object, this manipulator calls @c fill(c) for that
* object.
*/
template<typename _CharT> template<typename _CharT>
inline _Setfill<_CharT> inline _Setfill<_CharT>
setfill(_CharT __c) setfill(_CharT __c)
...@@ -165,6 +197,13 @@ namespace std ...@@ -165,6 +197,13 @@ namespace std
struct _Setprecision { int _M_n; }; struct _Setprecision { int _M_n; };
/**
* @brief Manipulator for @c precision.
* @param n The new precision.
*
* Sent to a stream object, this manipulator calls @c precision(n) for
* that object.
*/
inline _Setprecision inline _Setprecision
setprecision(int __n) setprecision(int __n)
{ {
...@@ -192,6 +231,13 @@ namespace std ...@@ -192,6 +231,13 @@ namespace std
struct _Setw { int _M_n; }; struct _Setw { int _M_n; };
/**
* @brief Manipulator for @c width.
* @param n The new width.
*
* Sent to a stream object, this manipulator calls @c width(n) for
* that object.
*/
inline _Setw inline _Setw
setw(int __n) setw(int __n)
{ {
......
...@@ -102,35 +102,64 @@ namespace std ...@@ -102,35 +102,64 @@ namespace std
class ios_base; class ios_base;
#endif #endif
typedef basic_ios<char> ios; /**
typedef basic_streambuf<char> streambuf; * @defgroup s27_2_iosfwd I/O Forward Declarations
typedef basic_istream<char> istream; *
typedef basic_ostream<char> ostream; * Nearly all of the I/O classes are parameterized on the type of
typedef basic_iostream<char> iostream; * characters they read and write. (The major exception is ios_base at
typedef basic_stringbuf<char> stringbuf; * the top of the hierarchy.) This is a change from pre-Standard
typedef basic_istringstream<char> istringstream; * streams, which were not templates.
typedef basic_ostringstream<char> ostringstream; *
typedef basic_stringstream<char> stringstream; * For ease of use and compatibility, all of the basic_* I/O-related
typedef basic_filebuf<char> filebuf; * classes are given typedef names for both of the builtin character
typedef basic_ifstream<char> ifstream; * widths (wide and narrow). The typedefs are the same as the
typedef basic_ofstream<char> ofstream; * pre-Standard names, for example:
typedef basic_fstream<char> fstream; *
* @code
* typedef basic_ifstream<char> ifstream;
* @endcode
*
* Because properly forward-declaring these classes can be difficult, you
* should not do it yourself. Instead, include the &lt;iosfwd&gt;
* header, which contains only declarations of all the I/O classes as
* well as the typedefs. Trying to forward-declare the typedefs
* themselves (e.g., "class ostream;") is not valid ISO C++.
*
* For more specific declarations, see
* http://gcc.gnu.org/onlinedocs/libstdc++/27_io/howto.html#10
*
* @{
*/
typedef basic_ios<char> ios; ///< @isiosfwd
typedef basic_streambuf<char> streambuf; ///< @isiosfwd
typedef basic_istream<char> istream; ///< @isiosfwd
typedef basic_ostream<char> ostream; ///< @isiosfwd
typedef basic_iostream<char> iostream; ///< @isiosfwd
typedef basic_stringbuf<char> stringbuf; ///< @isiosfwd
typedef basic_istringstream<char> istringstream; ///< @isiosfwd
typedef basic_ostringstream<char> ostringstream; ///< @isiosfwd
typedef basic_stringstream<char> stringstream; ///< @isiosfwd
typedef basic_filebuf<char> filebuf; ///< @isiosfwd
typedef basic_ifstream<char> ifstream; ///< @isiosfwd
typedef basic_ofstream<char> ofstream; ///< @isiosfwd
typedef basic_fstream<char> fstream; ///< @isiosfwd
#ifdef _GLIBCPP_USE_WCHAR_T #ifdef _GLIBCPP_USE_WCHAR_T
typedef basic_ios<wchar_t> wios; typedef basic_ios<wchar_t> wios; ///< @isiosfwd
typedef basic_streambuf<wchar_t> wstreambuf; typedef basic_streambuf<wchar_t> wstreambuf; ///< @isiosfwd
typedef basic_istream<wchar_t> wistream; typedef basic_istream<wchar_t> wistream; ///< @isiosfwd
typedef basic_ostream<wchar_t> wostream; typedef basic_ostream<wchar_t> wostream; ///< @isiosfwd
typedef basic_iostream<wchar_t> wiostream; typedef basic_iostream<wchar_t> wiostream; ///< @isiosfwd
typedef basic_stringbuf<wchar_t> wstringbuf; typedef basic_stringbuf<wchar_t> wstringbuf; ///< @isiosfwd
typedef basic_istringstream<wchar_t> wistringstream; typedef basic_istringstream<wchar_t> wistringstream; ///< @isiosfwd
typedef basic_ostringstream<wchar_t> wostringstream; typedef basic_ostringstream<wchar_t> wostringstream; ///< @isiosfwd
typedef basic_stringstream<wchar_t> wstringstream; typedef basic_stringstream<wchar_t> wstringstream; ///< @isiosfwd
typedef basic_filebuf<wchar_t> wfilebuf; typedef basic_filebuf<wchar_t> wfilebuf; ///< @isiosfwd
typedef basic_ifstream<wchar_t> wifstream; typedef basic_ifstream<wchar_t> wifstream; ///< @isiosfwd
typedef basic_ofstream<wchar_t> wofstream; typedef basic_ofstream<wchar_t> wofstream; ///< @isiosfwd
typedef basic_fstream<wchar_t> wfstream; typedef basic_fstream<wchar_t> wfstream; ///< @isiosfwd
#endif #endif
/** @} */
} // namespace std } // namespace std
#endif #endif
...@@ -47,17 +47,31 @@ ...@@ -47,17 +47,31 @@
namespace std namespace std
{ {
extern istream cin; /**
extern ostream cout; * @name Standard Stream Objects
extern ostream cerr; *
extern ostream clog; * The &lt;iostream&gt; header declares the eight <em>standard stream
* objects</em>. For other declarations, see
* http://gcc.gnu.org/onlinedocs/libstdc++/27_io/howto.html#10 and the
* @link s27_2_iosfwd I/O forward declarations @endlink
*
* They are required by default to cooperate with the global C library's
* @c FILE streams, and to be available during program startup and
* termination. For more information, see the HOWTO linked to above.
*/
//@{
extern istream cin; ///< Linked to standard input
extern ostream cout; ///< Linked to standard output
extern ostream cerr; ///< Linked to standard error (unbuffered)
extern ostream clog; ///< Linked to standard error (buffered)
#ifdef _GLIBCPP_USE_WCHAR_T #ifdef _GLIBCPP_USE_WCHAR_T
extern wistream wcin; extern wistream wcin; ///< Linked to standard input
extern wostream wcout; extern wostream wcout; ///< Linked to standard output
extern wostream wcerr; extern wostream wcerr; ///< Linked to standard error (unbuffered)
extern wostream wclog; extern wostream wclog; ///< Linked to standard error (buffered)
#endif #endif
//@}
// For construction of filebuffers for cout, cin, cerr, clog et. al. // For construction of filebuffers for cout, cin, cerr, clog et. al.
static ios_base::Init __ioinit; static ios_base::Init __ioinit;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment