VTK
vtkASCIITextCodec.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3 Program: Visualization Toolkit
4 Module: vtkASCIITextCodec.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 vtkASCIITextCodec_h
38 #define vtkASCIITextCodec_h
39 
40 #include "vtkIOCoreModule.h" // For export macro
41 #include "vtkTextCodec.h"
42 
43 class VTKIOCORE_EXPORT vtkASCIITextCodec : public vtkTextCodec
44 {
45 public:
47  static vtkASCIITextCodec* New();
48  void PrintSelf(ostream& os, vtkIndent indent) override;
49 
51 
54  const char* Name() override;
55  bool CanHandle(const char* NameString) override;
57 
61  bool IsValid(istream& InputStream) override;
62 
68  void ToUnicode(istream& InputStream, vtkTextCodec::OutputIterator& output) override;
69 
74  vtkUnicodeString::value_type NextUnicode(istream& inputStream) override;
75 
76 protected:
78  ~vtkASCIITextCodec() override;
79 
80 private:
81  vtkASCIITextCodec(const vtkASCIITextCodec&) = delete;
82  void operator=(const vtkASCIITextCodec&) = delete;
83 };
84 
85 #endif
vtkTextCodec::CanHandle
virtual bool CanHandle(const char *NameString)
vtkTextCodec::NextUnicode
virtual vtkUnicodeString::value_type NextUnicode(istream &inputStream)=0
Return the next code point from the sequence represented by the stream advancing the stream through h...
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
vtkUnicodeString::value_type
vtkUnicodeStringValueType value_type
Definition: vtkUnicodeString.h:72
vtkTextCodec::Name
virtual const char * Name()
The name this codec goes by - should match the string the factory will take to create it.
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkTextCodec::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTextCodec
Virtual class to act as an interface for all text codecs.
Definition: vtkTextCodec.h:44
vtkTextCodec.h
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkTextCodec::IsValid
virtual bool IsValid(istream &InputStream)
is the given sample valid for this codec? The stream will not be advanced.
vtkTextCodec::ToUnicode
virtual void ToUnicode(istream &InputStream, vtkTextCodec::OutputIterator &output)=0
Iterate through the sequence represented by the stream assigning the result to the output iterator.
vtkASCIITextCodec
Class to read/write ascii text.
Definition: vtkASCIITextCodec.h:43