00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkUTF8TextCodec.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00015 /*------------------------------------------------------------------------- 00016 Copyright 2008 Sandia Corporation. 00017 Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, 00018 the U.S. Government retains certain rights in this software. 00019 -------------------------------------------------------------------------*/ 00036 #ifndef __vtkUTF8TextCodec_h 00037 #define __vtkUTF8TextCodec_h 00038 00039 #include "vtkTextCodec.h" 00040 00041 00042 class VTK_IO_EXPORT vtkUTF8TextCodec : public vtkTextCodec 00043 { 00044 public: 00045 vtkTypeMacro(vtkUTF8TextCodec, vtkTextCodec); 00046 static vtkUTF8TextCodec* New() ; 00047 void PrintSelf(ostream& os, vtkIndent indent); 00048 00050 00052 virtual const char* Name() {return "UTF-8" ;} 00053 virtual bool CanHandle(const char* testStr); 00055 00057 virtual bool IsValid(istream& InputStream) ; 00058 00060 00063 virtual void ToUnicode(istream& InputStream, 00064 vtkTextCodec::OutputIterator& output) ; 00066 00070 virtual vtkUnicodeString::value_type NextUnicode(istream& inputStream) ; 00071 00072 //BTX 00073 protected: 00074 vtkUTF8TextCodec() ; 00075 ~vtkUTF8TextCodec() ; 00076 00077 private: 00078 vtkUTF8TextCodec(const vtkUTF8TextCodec &) ; // Not implemented. 00079 void operator=(const vtkUTF8TextCodec &) ; // Not implemented. 00080 00081 //ETX 00082 }; 00083 00084 00085 #endif