1 /*============================================================================
2 KWSys - Kitware System Library
3 Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
5 Distributed under the OSI-approved BSD License (the "License");
6 see accompanying file Copyright.txt for details.
8 This software is distributed WITHOUT ANY WARRANTY; without even the
9 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 See the License for more information.
11 ============================================================================*/
12 #ifndef @KWSYS_NAMESPACE@_String_hxx
13 #define @KWSYS_NAMESPACE@_String_hxx
15 #include <@KWSYS_NAMESPACE@/stl/string>
17 namespace @KWSYS_NAMESPACE@
21 * \brief Short-name version of the STL basic_string class template.
23 * The standard library "string" type is actually a typedef for
24 * "basic_string<..long argument list..>". This string class is
25 * simply a subclass of this type with the same interface so that the
26 * name is shorter in debugging symbols and error messages.
28 class String: public @KWSYS_NAMESPACE@_stl::string
30 /** The original string type. */
31 typedef @KWSYS_NAMESPACE@_stl::string stl_string;
35 /** String member types. */
36 typedef stl_string::value_type value_type;
37 typedef stl_string::pointer pointer;
38 typedef stl_string::reference reference;
39 typedef stl_string::const_reference const_reference;
40 typedef stl_string::size_type size_type;
41 typedef stl_string::difference_type difference_type;
42 typedef stl_string::iterator iterator;
43 typedef stl_string::const_iterator const_iterator;
44 typedef stl_string::reverse_iterator reverse_iterator;
45 typedef stl_string::const_reverse_iterator const_reverse_iterator;
47 /** String constructors. */
48 String(): stl_string() {}
49 String(const value_type* s): stl_string(s) {}
50 String(const value_type* s, size_type n): stl_string(s, n) {}
51 String(const stl_string& s, size_type pos=0, size_type n=npos):
52 stl_string(s, pos, n) {}
53 }; // End Class: String
55 #if defined(__WATCOMC__)
56 inline bool operator<(String const& l, String const& r)
58 return (static_cast<@KWSYS_NAMESPACE@_stl::string const&>(l) <
59 static_cast<@KWSYS_NAMESPACE@_stl::string const&>(r));
63 } // namespace @KWSYS_NAMESPACE@