VTK  9.5.2
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
14
15#ifndef vtkStdString_h
16#define vtkStdString_h
17
18#include "vtkCommonCoreModule.h" // For export macro
19#include "vtkSystemIncludes.h" // For VTKCOMMONCORE_EXPORT.
20#include <string> // For the superclass.
21#include <utility> // For std::move
22
23VTK_ABI_NAMESPACE_BEGIN
24class vtkStdString;
25VTKCOMMONCORE_EXPORT ostream& operator<<(ostream&, const vtkStdString&);
26
27class vtkStdString : public std::string
28{
29public:
30 typedef std::string StdString;
31 typedef StdString::value_type value_type;
32 typedef StdString::pointer pointer;
33 typedef StdString::reference reference;
34 typedef StdString::const_reference const_reference;
35 typedef StdString::size_type size_type;
36 typedef StdString::difference_type difference_type;
37 typedef StdString::iterator iterator;
38 typedef StdString::const_iterator const_iterator;
39 typedef StdString::reverse_iterator reverse_iterator;
40 typedef StdString::const_reverse_iterator const_reverse_iterator;
41
42 vtkStdString() = default;
44 : std::string(s)
45 {
46 }
48 : std::string(s, n)
49 {
50 }
51 vtkStdString(const std::string& s)
52 : std::string(s)
53 {
54 }
55 vtkStdString(std::string&& s)
56 : std::string(std::move(s))
57 {
58 }
59 vtkStdString(const std::string& s, size_type pos, size_type n = std::string::npos)
60 : std::string(s, pos, n)
61 {
62 }
63};
64
65VTK_ABI_NAMESPACE_END
66#endif
67// 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 &)