VTK
vtkStdString.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkStdString.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
30 #ifndef vtkStdString_h
31 #define vtkStdString_h
32 
33 #include "vtkCommonCoreModule.h" // For export macro
34 #include "vtkSystemIncludes.h" // For VTKCOMMONCORE_EXPORT.
35 #include <string> // For the superclass.
36 
37 class vtkStdString;
38 VTKCOMMONCORE_EXPORT ostream& operator<<(ostream&, const vtkStdString&);
39 
40 class vtkStdString : public std::string
41 {
42 public:
44  typedef StdString::value_type value_type;
45  typedef StdString::pointer pointer;
47  typedef StdString::const_reference const_reference;
48  typedef StdString::size_type size_type;
49  typedef StdString::difference_type difference_type;
50  typedef StdString::iterator iterator;
51  typedef StdString::const_iterator const_iterator;
52  typedef StdString::reverse_iterator reverse_iterator;
53  typedef StdString::const_reverse_iterator const_reverse_iterator;
54 
55  vtkStdString(): StdString() {}
56  vtkStdString(const value_type* s): StdString(s) {}
57  vtkStdString(const value_type* s, size_type n): StdString(s, n) {}
58  vtkStdString(const StdString& s, size_type pos=0, size_type n=npos):
59  StdString(s, pos, n) {}
60 
61  operator const char *() { return this->c_str(); }
62 };
63 
64 #endif
65 // VTK-HeaderTest-Exclude: vtkStdString.h
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:40
vtkStdString(const value_type *s)
Definition: vtkStdString.h:56
VTKCOMMONCORE_EXPORT ostream & operator<<(ostream &, const vtkStdString &)
StdString::const_reverse_iterator const_reverse_iterator
Definition: vtkStdString.h:53
StdString::const_iterator const_iterator
Definition: vtkStdString.h:51
vtkStdString(const value_type *s, size_type n)
Definition: vtkStdString.h:57
StdString::difference_type difference_type
Definition: vtkStdString.h:49
StdString::reference reference
Definition: vtkStdString.h:46
StdString::pointer pointer
Definition: vtkStdString.h:45
StdString::size_type size_type
Definition: vtkStdString.h:48
StdString::const_reference const_reference
Definition: vtkStdString.h:47
std::string StdString
Definition: vtkStdString.h:43
StdString::value_type value_type
Definition: vtkStdString.h:44
vtkStdString(const StdString &s, size_type pos=0, size_type n=npos)
Definition: vtkStdString.h:58
StdString::reverse_iterator reverse_iterator
Definition: vtkStdString.h:52
StdString::iterator iterator
Definition: vtkStdString.h:50