ENH: check in almost building VMS stuff with VMSBuild directory since the bootstrap...
[cmake.git] / VMSbuild / cmsys / String.hxx
blobc3eb7b78281056be1525cfe6e944efb8c5fd3282
1 /*=========================================================================
3 Program: KWSys - Kitware System Library
4 Module: $RCSfile: String.hxx,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 cmsys_String_hxx
15 #define cmsys_String_hxx
17 #include <cmsys/stl/string>
19 namespace cmsys
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 cmsys_EXPORT String: public cmsys_stl::string
32 /** The original string type. */
33 typedef cmsys_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<cmsys_stl::string const&>(l) <
61 static_cast<cmsys_stl::string const&>(r));
63 #endif
65 } // namespace cmsys
67 #endif