VTK  9.4.20250114
vtkStdString.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
64#ifndef vtkStdString_h
65#define vtkStdString_h
66
67#include "vtkCommonCoreModule.h" // For export macro
68#include "vtkSystemIncludes.h" // For VTKCOMMONCORE_EXPORT.
69#include <string> // For the superclass.
70#include <utility> // For std::move
71
72VTK_ABI_NAMESPACE_BEGIN
73class vtkStdString;
74VTKCOMMONCORE_EXPORT ostream& operator<<(ostream&, const vtkStdString&);
75
76class vtkStdString : public std::string
77{
78public:
79 typedef std::string StdString;
80 typedef StdString::value_type value_type;
81 typedef StdString::pointer pointer;
82 typedef StdString::reference reference;
83 typedef StdString::const_reference const_reference;
84 typedef StdString::size_type size_type;
85 typedef StdString::difference_type difference_type;
86 typedef StdString::iterator iterator;
87 typedef StdString::const_iterator const_iterator;
88 typedef StdString::reverse_iterator reverse_iterator;
89 typedef StdString::const_reverse_iterator const_reverse_iterator;
90
91 vtkStdString() = default;
93 : std::string(s)
94 {
95 }
97 : std::string(s, n)
98 {
99 }
100 vtkStdString(const std::string& s)
101 : std::string(s)
102 {
103 }
104 vtkStdString(std::string&& s)
105 : std::string(std::move(s))
106 {
107 }
108 vtkStdString(const std::string& s, size_type pos, size_type n = std::string::npos)
109 : std::string(s, pos, n)
110 {
111 }
112};
113
114VTK_ABI_NAMESPACE_END
115#endif
116// 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()=default
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 &)