VTK
vtkUTF8TextCodec.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3 Program: Visualization Toolkit
4 Module: vtkUTF8TextCodec.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 vtkUTF8TextCodec_h
38 #define vtkUTF8TextCodec_h
39 
40 #include "vtkIOCoreModule.h" // For export macro
41 #include "vtkTextCodec.h"
42 
43 
44 class VTKIOCORE_EXPORT vtkUTF8TextCodec : public vtkTextCodec
45 {
46 public:
48  static vtkUTF8TextCodec* New() ;
49  void PrintSelf(ostream& os, vtkIndent indent);
50 
54  virtual const char* Name() {return "UTF-8" ;}
55  virtual bool CanHandle(const char* testStr);
56 
60  virtual bool IsValid(istream& InputStream) ;
61 
67  virtual void ToUnicode(istream& InputStream,
69 
74  virtual vtkUnicodeString::value_type NextUnicode(istream& inputStream) ;
75 
76 protected:
79 
80 private:
81  vtkUTF8TextCodec(const vtkUTF8TextCodec &) VTK_DELETE_FUNCTION;
82  void operator=(const vtkUTF8TextCodec &) VTK_DELETE_FUNCTION;
83 
84 };
85 
86 
87 #endif
vtkUTF8TextCodec::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
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
vtkUTF8TextCodec::CanHandle
virtual bool CanHandle(const char *testStr)
vtkUnicodeString::value_type
vtkUnicodeStringValueType value_type
Definition: vtkUnicodeString.h:75
vtkUTF8TextCodec::New
static vtkUTF8TextCodec * New()
vtkUTF8TextCodec::NextUnicode
virtual vtkUnicodeString::value_type NextUnicode(istream &inputStream)
Return the next code point from the sequence represented by the stream advancing the stream through h...
vtkTextCodec
Virtual class to act as an interface for all text codecs.
Definition: vtkTextCodec.h:45
vtkUTF8TextCodec::ToUnicode
virtual void ToUnicode(istream &InputStream, vtkTextCodec::OutputIterator &output)
Iterate through the sequence represented by the stream assigning the result to the output iterator.
vtkUTF8TextCodec::~vtkUTF8TextCodec
~vtkUTF8TextCodec()
vtkTextCodec.h
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkUTF8TextCodec::vtkUTF8TextCodec
vtkUTF8TextCodec()
vtkUTF8TextCodec
Class to read/write UTF-8 text.
Definition: vtkUTF8TextCodec.h:45
vtkUTF8TextCodec::Name
virtual const char * Name()
The name this codec goes by - should match the string the factory will take to create it.
Definition: vtkUTF8TextCodec.h:54
vtkUTF8TextCodec::IsValid
virtual bool IsValid(istream &InputStream)
is the given sample valid for this codec?