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 -------------------------------------------------------------------------*/
37 #ifndef vtkTextCodec_h
38 #define vtkTextCodec_h
39 
40 #include "vtkIOCoreModule.h" // For export macro
41 #include "vtkObject.h"
42 #include "vtkUnicodeString.h" // for the value type and for function return.
43 
44 class VTKIOCORE_EXPORT vtkTextCodec : public vtkObject
45 {
46 public:
47  vtkTypeMacro(vtkTextCodec, vtkObject);
48 
50 
54  virtual const char* Name();
55  void PrintSelf(ostream& os, vtkIndent indent);
57 
58  virtual bool CanHandle(const char* NameString);
59 
63  virtual bool IsValid(istream& InputStream);
64 
66 
73  {
74  public:
75  virtual OutputIterator& operator++(int) = 0;
76  virtual OutputIterator& operator*() = 0;
77  virtual OutputIterator& operator=(const vtkUnicodeString::value_type value) = 0;
79 
80  OutputIterator() {} virtual ~OutputIterator() {}
81 
82  private:
83  OutputIterator(const OutputIterator&) VTK_DELETE_FUNCTION;
84  const OutputIterator& operator=(const OutputIterator&) VTK_DELETE_FUNCTION;
85  };
86 
92  virtual void ToUnicode(istream& InputStream,
93  vtkTextCodec::OutputIterator& output) = 0;
94 
99  vtkUnicodeString ToUnicode(istream & inputStream);
100 
106  virtual vtkUnicodeString::value_type NextUnicode(istream& inputStream) = 0;
107 
108 protected:
109  vtkTextCodec();
110  ~vtkTextCodec();
111 
112 private:
113  vtkTextCodec(const vtkTextCodec &) VTK_DELETE_FUNCTION;
114  void operator=(const vtkTextCodec &) VTK_DELETE_FUNCTION;
115 
116 };
117 
118 #endif
a base class that any output iterators need to derive from to use the first signature of to_unicode...
Definition: vtkTextCodec.h:72
abstract base class for most VTK objects
Definition: vtkObject.h:59
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkUnicodeStringValueType value_type
Virtual class to act as an interface for all text codecs.
Definition: vtkTextCodec.h:44
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkVector< A, Size > operator*(const vtkVector< A, Size > &v1, const vtkVector< A, Size > &v2)
String class that stores Unicode text.