VTK  9.3.0
vtkUTF8TextCodec.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
21 #ifndef vtkUTF8TextCodec_h
22 #define vtkUTF8TextCodec_h
23 
24 #include "vtkIOCoreModule.h" // For export macro
25 #include "vtkTextCodec.h"
26 
27 VTK_ABI_NAMESPACE_BEGIN
28 class VTKIOCORE_EXPORT vtkUTF8TextCodec : public vtkTextCodec
29 {
30 public:
32  static vtkUTF8TextCodec* New();
33  void PrintSelf(ostream& os, vtkIndent indent) override;
34 
38  const char* Name() override { return "UTF-8"; }
39 
45  void ToUnicode(istream& InputStream, vtkTextCodec::OutputIterator& output) override;
46 
51  vtkTypeUInt32 NextUTF32CodePoint(istream& inputStream) override;
52 
53 protected:
55  ~vtkUTF8TextCodec() override;
56 
57 private:
58  vtkUTF8TextCodec(const vtkUTF8TextCodec&) = delete;
59  void operator=(const vtkUTF8TextCodec&) = delete;
60 };
61 
62 VTK_ABI_NAMESPACE_END
63 #endif
a simple class to control print indentation
Definition: vtkIndent.h:38
a base class that any output iterators need to derive from to use the first signature of to_unicode.
Definition: vtkTextCodec.h:57
Virtual class to act as an interface for all text codecs.
Definition: vtkTextCodec.h:29
Class to read/write UTF-8 text.
vtkTypeUInt32 NextUTF32CodePoint(istream &inputStream) override
Return the next code point from the sequence represented by the begin, end iterators advancing begin ...
void PrintSelf(ostream &os, vtkIndent indent) override
The name this codec goes by - should match the string the factory will take to create it.
static vtkUTF8TextCodec * New()
void ToUnicode(istream &InputStream, vtkTextCodec::OutputIterator &output) override
Iterate through the sequence represented by the stream assigning the result to the output iterator.
~vtkUTF8TextCodec() override
const char * Name() override
The name this codec goes by - should match the string the factory will take to create it.