1/* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
2   file Copyright.txt or https://cmake.org/licensing#kwsys for details.  */
3#ifndef @KWSYS_NAMESPACE@_String_hxx
4#define @KWSYS_NAMESPACE@_String_hxx
5
6#include <string>
7
8namespace @KWSYS_NAMESPACE@ {
9
10/** \class String
11 * \brief Short-name version of the STL basic_string class template.
12 *
13 * The standard library "string" type is actually a typedef for
14 * "basic_string<..long argument list..>".  This string class is
15 * simply a subclass of this type with the same interface so that the
16 * name is shorter in debugging symbols and error messages.
17 */
18class String : public std::string
19{
20  /** The original string type.  */
21  typedef std::string stl_string;
22
23public:
24  /** String member types.  */
25  typedef stl_string::value_type value_type;
26  typedef stl_string::pointer pointer;
27  typedef stl_string::reference reference;
28  typedef stl_string::const_reference const_reference;
29  typedef stl_string::size_type size_type;
30  typedef stl_string::difference_type difference_type;
31  typedef stl_string::iterator iterator;
32  typedef stl_string::const_iterator const_iterator;
33  typedef stl_string::reverse_iterator reverse_iterator;
34  typedef stl_string::const_reverse_iterator const_reverse_iterator;
35
36  /** String constructors.  */
37  String()
38    : stl_string()
39  {
40  }
41  String(const value_type* s)
42    : stl_string(s)
43  {
44  }
45  String(const value_type* s, size_type n)
46    : stl_string(s, n)
47  {
48  }
49  String(const stl_string& s, size_type pos = 0, size_type n = npos)
50    : stl_string(s, pos, n)
51  {
52  }
53}; // End Class: String
54
55} // namespace @KWSYS_NAMESPACE@
56
57#endif
58