VTK  9.3.0
vtkUTF16TextCodec.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 vtkUTF16TextCodec_h
22 #define vtkUTF16TextCodec_h
23 
24 #include "vtkIOCoreModule.h" // For export macro
25 #include "vtkTextCodec.h"
26 
27 VTK_ABI_NAMESPACE_BEGIN
28 class VTKIOCORE_EXPORT vtkUTF16TextCodec : public vtkTextCodec
29 {
30 public:
33  void PrintSelf(ostream& os, vtkIndent indent) override;
34 
36 
39  const char* Name() override;
40  bool CanHandle(const char* NameString) override;
42 
46  void SetBigEndian(bool);
47 
51  void FindEndianness(istream& InputStream);
52 
57  void ToUnicode(istream& InputStream, vtkTextCodec::OutputIterator& output) override;
58 
63  vtkTypeUInt32 NextUTF32CodePoint(istream& inputStream) override;
64 
65 protected:
67  ~vtkUTF16TextCodec() override;
68 
70  bool _bigEndian;
71 
72 private:
73  vtkUTF16TextCodec(const vtkUTF16TextCodec&) = delete;
74  void operator=(const vtkUTF16TextCodec&) = delete;
75 };
76 
77 VTK_ABI_NAMESPACE_END
78 #endif
a simple class to control print indentation
Definition: vtkIndent.h:29
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 ascii text.
void ToUnicode(istream &InputStream, vtkTextCodec::OutputIterator &output) override
Iterate through the sequence represented by the begin and end iterators assigning the result to the o...
void SetBigEndian(bool)
Set the endianness - true if Big false is little.
vtkTypeUInt32 NextUTF32CodePoint(istream &inputStream) override
Return the next code point from the sequence represented by the begin, end iterators advancing begin ...
static vtkUTF16TextCodec * New()
const char * Name() override
The name this codec goes by - should match the string the factory will take to create it.
~vtkUTF16TextCodec() override
void PrintSelf(ostream &os, vtkIndent indent) override
The name this codec goes by - should match the string the factory will take to create it.
bool CanHandle(const char *NameString) override
The name this codec goes by - should match the string the factory will take to create it.
void FindEndianness(istream &InputStream)
Set the endianness - true if Big false is little.