Initial commit.
[CMakeLuaTailorHgBridge.git] / CMakeLua / Source / kwsys / String.hxx.in
blob164a2ae27486e7c06a939a34544c44120d54a60a
1 /*=========================================================================
3 Program: KWSys - Kitware System Library
4 Module: $RCSfile: String.hxx.in,v $
6 Copyright (c) Kitware, Inc., Insight Consortium. All rights reserved.
7 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the above copyright notices for more information.
13 =========================================================================*/
14 #ifndef @KWSYS_NAMESPACE@_String_hxx
15 #define @KWSYS_NAMESPACE@_String_hxx
17 #include <@KWSYS_NAMESPACE@/stl/string>
19 namespace @KWSYS_NAMESPACE@
22 /** \class String
23 * \brief Short-name version of the STL basic_string class template.
25 * The standard library "string" type is actually a typedef for
26 * "basic_string<..long argument list..>". This string class is
27 * simply a subclass of this type with the same interface so that the
28 * name is shorter in debugging symbols and error messages.
30 class @KWSYS_NAMESPACE@_EXPORT String: public @KWSYS_NAMESPACE@_stl::string
32 /** The original string type. */
33 typedef @KWSYS_NAMESPACE@_stl::string stl_string;
35 public:
37 /** String member types. */
38 typedef stl_string::value_type value_type;
39 typedef stl_string::pointer pointer;
40 typedef stl_string::reference reference;
41 typedef stl_string::const_reference const_reference;
42 typedef stl_string::size_type size_type;
43 typedef stl_string::difference_type difference_type;
44 typedef stl_string::iterator iterator;
45 typedef stl_string::const_iterator const_iterator;
46 typedef stl_string::reverse_iterator reverse_iterator;
47 typedef stl_string::const_reverse_iterator const_reverse_iterator;
49 /** String constructors. */
50 String(): stl_string() {}
51 String(const value_type* s): stl_string(s) {}
52 String(const value_type* s, size_type n): stl_string(s, n) {}
53 String(const stl_string& s, size_type pos=0, size_type n=npos):
54 stl_string(s, pos, n) {}
55 }; // End Class: String
57 #if defined(__WATCOMC__)
58 inline bool operator<(String const& l, String const& r)
60 return (static_cast<@KWSYS_NAMESPACE@_stl::string const&>(l) <
61 static_cast<@KWSYS_NAMESPACE@_stl::string const&>(r));
63 #endif
65 } // namespace @KWSYS_NAMESPACE@
67 #endif