VTK
vtkTextCodecFactory.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3 Program: Visualization Toolkit
4 Module: vtkTextCodecFactory.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 -------------------------------------------------------------------------*/
39 #ifndef vtkTextCodecFactory_h
40 #define vtkTextCodecFactory_h
41 
42 #include "vtkIOCoreModule.h" // For export macro
43 #include "vtkObject.h"
44 
45 class vtkTextCodec;
46 
47 class VTKIOCORE_EXPORT vtkTextCodecFactory : public vtkObject
48 {
49 public:
51  static vtkTextCodecFactory* New() ;
52  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
53 
57  typedef vtkTextCodec* (*CreateFunction)();
58 
60 
65  static void RegisterCreateCallback(CreateFunction callback);
66  static void UnRegisterCreateCallback(CreateFunction callback);
67  static void UnRegisterAllCreateCallbacks();
69 
76  static vtkTextCodec* CodecForName(const char* CodecName);
77 
83  static vtkTextCodec* CodecToHandle(istream& InputStream);
84 
88  static void Initialize();
89 
90 protected:
92  ~vtkTextCodecFactory() VTK_OVERRIDE;
93 
94 private:
95  vtkTextCodecFactory(const vtkTextCodecFactory &) VTK_DELETE_FUNCTION;
96  void operator=(const vtkTextCodecFactory &) VTK_DELETE_FUNCTION;
97 
99 
102  class CallbackVector;
103  static CallbackVector* Callbacks;
105 
106 };
107 
108 #endif // vtkTextCodecFactory_h
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.
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
maintain a list of text codecs and return instances
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...