VTK
vtkUTF16TextCodec.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3 Program: Visualization Toolkit
4 Module: vtkUTF16TextCodec.h
5 
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 /*-------------------------------------------------------------------------
16  Copyright 2008 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19 -------------------------------------------------------------------------*/
37 #ifndef vtkUTF16TextCodec_h
38 #define vtkUTF16TextCodec_h
39 
40 #include "vtkIOCoreModule.h" // For export macro
41 #include "vtkTextCodec.h"
42 
43 
44 class VTKIOCORE_EXPORT vtkUTF16TextCodec : public vtkTextCodec
45 {
46 public:
48  static vtkUTF16TextCodec* New() ;
49  void PrintSelf(ostream& os, vtkIndent indent);
50 
52 
55  virtual const char* Name() ;
56  virtual bool CanHandle(const char* NameString) ;
58 
62  void SetBigEndian(bool) ;
63 
67  void FindEndianness(istream& InputStream) ;
68 
72  virtual bool IsValid(istream& InputStream) ;
73 
78  virtual void ToUnicode(istream& InputStream,
80 
85  virtual vtkUnicodeString::value_type NextUnicode(istream& inputStream) ;
86 
87 protected:
90 
92  bool _bigEndian ;
93 
94 private:
95  vtkUTF16TextCodec(const vtkUTF16TextCodec &) VTK_DELETE_FUNCTION;
96  void operator=(const vtkUTF16TextCodec &) VTK_DELETE_FUNCTION;
97 
98 };
99 
100 
101 #endif
vtkUTF16TextCodec::New
static vtkUTF16TextCodec * New()
vtkTextCodec::OutputIterator
a base class that any output iterators need to derive from to use the first signature of to_unicode.
Definition: vtkTextCodec.h:73
vtkUnicodeString::value_type
vtkUnicodeStringValueType value_type
Definition: vtkUnicodeString.h:75
vtkTextCodec
Virtual class to act as an interface for all text codecs.
Definition: vtkTextCodec.h:45
vtkUTF16TextCodec::_endianExplicitlySet
bool _endianExplicitlySet
Definition: vtkUTF16TextCodec.h:91
vtkUTF16TextCodec::Name
virtual const char * Name()
The name this codec goes by - should match the string the factory will take to create it.
vtkUTF16TextCodec::IsValid
virtual bool IsValid(istream &InputStream)
is the given sample valid for this codec? - will take endianness into account
vtkUTF16TextCodec::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkUTF16TextCodec::~vtkUTF16TextCodec
~vtkUTF16TextCodec()
vtkUTF16TextCodec::FindEndianness
void FindEndianness(istream &InputStream)
Set the endianness - true if Big false is little.
vtkUTF16TextCodec::_bigEndian
bool _bigEndian
Definition: vtkUTF16TextCodec.h:92
vtkTextCodec.h
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkUTF16TextCodec::SetBigEndian
void SetBigEndian(bool)
Set the endianness - true if Big false is little.
vtkUTF16TextCodec::vtkUTF16TextCodec
vtkUTF16TextCodec()
vtkUTF16TextCodec::ToUnicode
virtual void ToUnicode(istream &InputStream, vtkTextCodec::OutputIterator &output)
Iterate through the sequence represented by the begin and end iterators assigning the result to the o...
vtkUTF16TextCodec::NextUnicode
virtual vtkUnicodeString::value_type NextUnicode(istream &inputStream)
Return the next code point from the sequence represented by the begin, end iterators advancing begin ...
vtkUTF16TextCodec
Class to read/write ascii text.
Definition: vtkUTF16TextCodec.h:45
vtkUTF16TextCodec::CanHandle
virtual bool CanHandle(const char *NameString)