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