VTK  9.1.0
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=========================================================================*/
93#ifndef vtkStdString_h
94#define vtkStdString_h
95
96#include "vtkCommonCoreModule.h" // For export macro
97#include "vtkSystemIncludes.h" // For VTKCOMMONCORE_EXPORT.
98#include <string> // For the superclass.
99#include <utility> // For std::move
100
101class vtkStdString;
102VTKCOMMONCORE_EXPORT ostream& operator<<(ostream&, const vtkStdString&);
103
105{
106public:
108 typedef StdString::value_type value_type;
109 typedef StdString::pointer pointer;
111 typedef StdString::const_reference const_reference;
112 typedef StdString::size_type size_type;
113 typedef StdString::difference_type difference_type;
114 typedef StdString::iterator iterator;
115 typedef StdString::const_iterator const_iterator;
116 typedef StdString::reverse_iterator reverse_iterator;
117 typedef StdString::const_reverse_iterator const_reverse_iterator;
118
120 : std::string()
121 {
122 }
124 : std::string(s)
125 {
126 }
128 : std::string(s, n)
129 {
130 }
132 : std::string(s)
133 {
134 }
136 : std::string(std::move(s))
137 {
138 }
139 vtkStdString(const std::string& s, size_type pos, size_type n = std::string::npos)
140 : std::string(s, pos, n)
141 {
142 }
143
144 operator const char*() { return this->c_str(); }
145};
146
147#endif
148// VTK-HeaderTest-Exclude: vtkStdString.h
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:105
StdString::const_reference const_reference
Definition: vtkStdString.h:111
vtkStdString(const value_type *s, size_type n)
Definition: vtkStdString.h:127
StdString::size_type size_type
Definition: vtkStdString.h:112
StdString::reference reference
Definition: vtkStdString.h:110
vtkStdString(const value_type *s)
Definition: vtkStdString.h:123
vtkStdString(std::string &&s)
Definition: vtkStdString.h:135
StdString::const_iterator const_iterator
Definition: vtkStdString.h:115
StdString::const_reverse_iterator const_reverse_iterator
Definition: vtkStdString.h:117
std::string StdString
Definition: vtkStdString.h:107
StdString::reverse_iterator reverse_iterator
Definition: vtkStdString.h:116
vtkStdString(const std::string &s, size_type pos, size_type n=std::string::npos)
Definition: vtkStdString.h:139
StdString::pointer pointer
Definition: vtkStdString.h:109
StdString::value_type value_type
Definition: vtkStdString.h:108
StdString::difference_type difference_type
Definition: vtkStdString.h:113
StdString::iterator iterator
Definition: vtkStdString.h:114
vtkStdString(const std::string &s)
Definition: vtkStdString.h:131
@ reference
Definition: vtkX3D.h:470
@ string
Definition: vtkX3D.h:496
VTKCOMMONCORE_EXPORT ostream & operator<<(ostream &, const vtkStdString &)