[patch] libstdc++/44014 - improved doxygen for std::string

Jonathan Wakely jwakely.gcc@gmail.com
Thu May 6 20:01:00 GMT 2010


2010-05-06  Jonathan Wakely  <jwakely.gcc@gmail.com>

        PR libstdc++/44014
        * include/bits/stringfwd.h: Add doxygen comments and new group.
        * include/bits/basic_string.h: Add to new doxygen group.
        * doc/doxygen/user.cfg.in (ALIASES): Link to correct group.

tested with 'make doc-html-doxygen'
committed to trunk and 4.5 branch
-------------- next part --------------
Index: doc/doxygen/user.cfg.in
===================================================================
--- doc/doxygen/user.cfg.in	(revision 159088)
+++ doc/doxygen/user.cfg.in	(working copy)
@@ -180,7 +180,7 @@ TAB_SIZE               = 4
 # You can put \n's in the value part of an alias to insert newlines.
 
 ALIASES                = "doctodo=@todo\nDoc me!  See doc/doxygen/TODO and http://gcc.gnu.org/ml/libstdc++/2002-02/msg00003.html for more.  " \
-			 "isiosfwd=One of the @link ios I/O @endlink  "
+			 "isiosfwd=One of the @link io I/O @endlink typedefs"
 
 # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
 # sources only. Doxygen will then generate output that is more tailored for C.
Index: include/bits/basic_string.h
===================================================================
--- include/bits/basic_string.h	(revision 159088)
+++ include/bits/basic_string.h	(working copy)
@@ -48,13 +48,14 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
    *  @class basic_string basic_string.h <string>
    *  @brief  Managing sequences of characters and character-like objects.
    *
+   *  @ingroup strings
    *  @ingroup sequences
    *
    *  Meets the requirements of a <a href="tables.html#65">container</a>, a
    *  <a href="tables.html#66">reversible container</a>, and a
    *  <a href="tables.html#67">sequence</a>.  Of the
    *  <a href="tables.html#68">optional sequence requirements</a>, only
-   *  @c push_back, @c at, and array access are supported.
+   *  @c push_back, @c at, and @c %array access are supported.
    *
    *  @doctodo
    *
Index: include/bits/stringfwd.h
===================================================================
--- include/bits/stringfwd.h	(revision 159088)
+++ include/bits/stringfwd.h	(working copy)
@@ -1,6 +1,7 @@
 // String support -*- C++ -*-
 
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
+// 2010
 // Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
@@ -44,6 +45,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
   template<typename _Alloc>
     class allocator;
 
+  /**
+   *  @defgroup strings Strings
+   *
+   *  @{
+  */
+
   template<class _CharT>
     struct char_traits;
 
@@ -53,12 +60,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
 
   template<> struct char_traits<char>;
 
-  typedef basic_string<char>    string;
+  typedef basic_string<char>    string;   ///< A string of @c char
 
 #ifdef _GLIBCXX_USE_WCHAR_T
   template<> struct char_traits<wchar_t>;
 
-  typedef basic_string<wchar_t> wstring;
+  typedef basic_string<wchar_t> wstring;   ///< A string of @c wchar_t
 #endif
 
 #if (defined(__GXX_EXPERIMENTAL_CXX0X__) \
@@ -67,10 +74,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
   template<> struct char_traits<char16_t>;
   template<> struct char_traits<char32_t>;
 
-  typedef basic_string<char16_t> u16string;
-  typedef basic_string<char32_t> u32string;
+  typedef basic_string<char16_t> u16string; ///< A string of @c char16_t
+  typedef basic_string<char32_t> u32string; ///< A string of @c char32_t
 
 #endif
+  /** @}  */
 
 _GLIBCXX_END_NAMESPACE
 


More information about the Libstdc++ mailing list