VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkTextCodec.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 __vtkTextCodec_h 00037 #define __vtkTextCodec_h 00038 00039 #include "vtkIOCoreModule.h" // For export macro 00040 #include "vtkObject.h" 00041 #include "vtkUnicodeString.h" // for the value type and for function return. 00042 00043 class VTKIOCORE_EXPORT vtkTextCodec : public vtkObject 00044 { 00045 public: 00046 vtkTypeMacro(vtkTextCodec, vtkObject); 00047 00049 00051 virtual const char* Name(); 00052 void PrintSelf(ostream& os, vtkIndent indent); 00054 00055 virtual bool CanHandle(const char* NameString); 00056 00059 virtual bool IsValid(istream& InputStream); 00060 00062 00066 class OutputIterator 00067 { 00068 public: 00069 virtual OutputIterator& operator++(int) = 0; 00070 virtual OutputIterator& operator*() = 0; 00071 virtual OutputIterator& operator=(const vtkUnicodeString::value_type value) = 0; 00073 00074 OutputIterator() {} virtual ~OutputIterator() {} 00075 00076 private: 00077 OutputIterator(const OutputIterator&); // Not implemented 00078 const OutputIterator& operator=(const OutputIterator&); // Not Implemented 00079 }; 00080 00082 00085 virtual void ToUnicode(istream& InputStream, 00086 vtkTextCodec::OutputIterator& output) = 0; 00088 00091 vtkUnicodeString ToUnicode(istream & inputStream); 00092 00096 virtual vtkUnicodeString::value_type NextUnicode(istream& inputStream) = 0; 00097 00098 //BTX 00099 protected: 00100 vtkTextCodec(); 00101 ~vtkTextCodec(); 00102 00103 private: 00104 vtkTextCodec(const vtkTextCodec &); // Not implemented. 00105 void operator=(const vtkTextCodec &); // Not implemented. 00106 00107 //ETX 00108 }; 00109 00110 #endif