VTK
vtkTextCodec.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3 Program: Visualization Toolkit
4 Module: vtkTextCodec.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 -------------------------------------------------------------------------*/
36 #ifndef __vtkTextCodec_h
37 #define __vtkTextCodec_h
38 
39 #include "vtkObject.h"
40 #include "vtkUnicodeString.h" // for the value type and for function return.
41 
43 {
44 public:
45  vtkTypeMacro(vtkTextCodec, vtkObject);
46 
48 
50  virtual const char* Name();
51  void PrintSelf(ostream& os, vtkIndent indent);
53 
54  virtual bool CanHandle(const char* NameString);
55 
58  virtual bool IsValid(istream& InputStream);
59 
61 
66  {
67  public:
68  virtual OutputIterator& operator++(int) = 0;
69  virtual OutputIterator& operator*() = 0;
70  virtual OutputIterator& operator=(const vtkUnicodeString::value_type value) = 0;
72 
73  OutputIterator() {} virtual ~OutputIterator() {}
74 
75  private:
76  OutputIterator(const OutputIterator&); // Not implemented
77  const OutputIterator& operator=(const OutputIterator&); // Not Implemented
78  };
79 
81 
84  virtual void ToUnicode(istream& InputStream,
85  vtkTextCodec::OutputIterator& output) = 0;
87 
90  vtkUnicodeString ToUnicode(istream & inputStream);
91 
95  virtual vtkUnicodeString::value_type NextUnicode(istream& inputStream) = 0;
96 
97 //BTX
98 protected:
99  vtkTextCodec();
100  ~vtkTextCodec();
101 
102 private:
103  vtkTextCodec(const vtkTextCodec &); // Not implemented.
104  void operator=(const vtkTextCodec &); // Not implemented.
105 
106 //ETX
107 };
108 
109 #endif