VTK  9.3.20240418
vtkOStrStreamWrapper.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
18 #ifndef vtkOStrStreamWrapper_h
19 #define vtkOStrStreamWrapper_h
20 
21 #include "vtkCommonCoreModule.h"
22 
23 #ifndef VTK_SYSTEM_INCLUDES_INSIDE
25 #endif
26 
27 VTK_ABI_NAMESPACE_BEGIN
28 class VTKCOMMONCORE_EXPORT vtkOStrStreamWrapper : public vtkOStreamWrapper
29 {
30 public:
35 
40 
46  char* str();
47 
53 
55 
59  void freeze();
60  void freeze(int);
62 
63 protected:
64  // The pointer returned by str().
65  char* Result;
66 
67  // Whether the caller of str() owns the memory.
68  int Frozen;
69 
70 private:
71  vtkOStrStreamWrapper(const vtkOStrStreamWrapper& r) = delete;
72  vtkOStrStreamWrapper& operator=(const vtkOStrStreamWrapper&) = delete;
73 };
74 
75 VTK_ABI_NAMESPACE_END
76 #endif
77 // VTK-HeaderTest-Exclude: vtkOStrStreamWrapper.h
Wrapper for ostrstream.
vtkOStrStreamWrapper * rdbuf()
Returns a pointer to this class.
~vtkOStrStreamWrapper() override
Destructor frees all used memory.
void freeze(int)
Set whether the memory is frozen.
void freeze()
Set whether the memory is frozen.
vtkOStrStreamWrapper()
Constructor.
char * str()
Get the string that has been written.
Wrapper for C++ ostream.
Do_not_include_vtkOStrStreamWrapper_directly_vtkSystemIncludes_includes_it