VTK  9.3.1
vtkTextCodecFactory.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
23 #ifndef vtkTextCodecFactory_h
24 #define vtkTextCodecFactory_h
25 
26 #include "vtkIOCoreModule.h" // For export macro
27 #include "vtkObject.h"
28 
29 VTK_ABI_NAMESPACE_BEGIN
30 class vtkTextCodec;
31 
32 class VTKIOCORE_EXPORT vtkTextCodecFactory : public vtkObject
33 {
34 public:
36  static vtkTextCodecFactory* New();
37  void PrintSelf(ostream& os, vtkIndent indent) override;
38 
42  typedef vtkTextCodec* (*CreateFunction)();
43 
45 
50  static void RegisterCreateCallback(CreateFunction callback);
51  static void UnRegisterCreateCallback(CreateFunction callback);
52  static void UnRegisterAllCreateCallbacks();
54 
61  static vtkTextCodec* CodecForName(const char* CodecName);
62 
68  static vtkTextCodec* CodecToHandle(istream& InputStream);
69 
73  static void Initialize();
74 
75 protected:
77  ~vtkTextCodecFactory() override;
78 
79 private:
81  void operator=(const vtkTextCodecFactory&) = delete;
82 
84 
87  class CallbackVector;
88  static CallbackVector* Callbacks;
90 };
91 
92 VTK_ABI_NAMESPACE_END
93 #endif // vtkTextCodecFactory_h
abstract base class for most VTK objects
Definition: vtkObject.h:51
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:28
a simple class to control print indentation
Definition: vtkIndent.h:28
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...