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) override;
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&) = delete;
84  OutputIterator& operator=(const OutputIterator&) = delete;
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() override;
111 
112 private:
113  vtkTextCodec(const vtkTextCodec &) = delete;
114  void operator=(const vtkTextCodec &) = delete;
115 
116 };
117 
118 #endif
vtkTextCodec::OutputIterator
a base class that any output iterators need to derive from to use the first signature of to_unicode.
Definition: vtkTextCodec.h:72
vtkX3D::value
Definition: vtkX3D.h:220
vtkUnicodeString::value_type
vtkUnicodeStringValueType value_type
Definition: vtkUnicodeString.h:75
vtkUnicodeString.h
vtkTextCodec
Virtual class to act as an interface for all text codecs.
Definition: vtkTextCodec.h:44
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:59
operator*
vtkVector< A, Size > operator*(const vtkVector< A, Size > &v1, const vtkVector< A, Size > &v2)
Definition: vtkVectorOperators.h:67
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkUnicodeString
String class that stores Unicode text.
Definition: vtkUnicodeString.h:72
vtkObject::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkObject.h