VTK  9.2.6
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=========================================================================*/
27#ifndef vtkStdString_h
28#define vtkStdString_h
29
30#include "vtkCommonCoreModule.h" // For export macro
31#include "vtkSystemIncludes.h" // For VTKCOMMONCORE_EXPORT.
32#include <string> // For the superclass.
33#include <utility> // For std::move
34
35class vtkStdString;
36VTKCOMMONCORE_EXPORT ostream& operator<<(ostream&, const vtkStdString&);
37
38class vtkStdString : public std::string
39{
40public:
41 typedef std::string StdString;
42 typedef StdString::value_type value_type;
43 typedef StdString::pointer pointer;
44 typedef StdString::reference reference;
45 typedef StdString::const_reference const_reference;
46 typedef StdString::size_type size_type;
47 typedef StdString::difference_type difference_type;
48 typedef StdString::iterator iterator;
49 typedef StdString::const_iterator const_iterator;
50 typedef StdString::reverse_iterator reverse_iterator;
51 typedef StdString::const_reverse_iterator const_reverse_iterator;
52
54 : std::string()
55 {
56 }
58 : std::string(s)
59 {
60 }
62 : std::string(s, n)
63 {
64 }
65 vtkStdString(const std::string& s)
66 : std::string(s)
67 {
68 }
69 vtkStdString(std::string&& s)
70 : std::string(std::move(s))
71 {
72 }
73 vtkStdString(const std::string& s, size_type pos, size_type n = std::string::npos)
74 : std::string(s, pos, n)
75 {
76 }
77
78 operator const char*() { return this->c_str(); }
79};
80
81#endif
82// VTK-HeaderTest-Exclude: vtkStdString.h
Wrapper around std::string to keep symbols short.
StdString::const_reference const_reference
vtkStdString(const value_type *s, size_type n)
StdString::size_type size_type
StdString::reference reference
vtkStdString(const value_type *s)
vtkStdString(std::string &&s)
StdString::const_iterator const_iterator
StdString::const_reverse_iterator const_reverse_iterator
std::string StdString
StdString::reverse_iterator reverse_iterator
vtkStdString(const std::string &s, size_type pos, size_type n=std::string::npos)
StdString::pointer pointer
StdString::value_type value_type
StdString::difference_type difference_type
StdString::iterator iterator
vtkStdString(const std::string &s)
VTKCOMMONCORE_EXPORT ostream & operator<<(ostream &, const vtkStdString &)