VTK  9.3.0
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:
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);
54 
61  static vtkTextCodec* CodecForName(const char* CodecName);
62 
68  static vtkTextCodec* CodecToHandle(istream& InputStream);
69 
73  static void Initialize();
74 
75 protected:
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
a simple class to control print indentation
Definition: vtkIndent.h:38
abstract base class for most VTK objects
Definition: vtkObject.h:61
maintain a list of text codecs and return instances
static void Initialize()
Initialize core text codecs - needed for the static compilation case.
~vtkTextCodecFactory() override
static void RegisterCreateCallback(CreateFunction callback)
Provides mechanism to register/unregister additional callbacks to create concrete subclasses of vtkTe...
static void UnRegisterAllCreateCallbacks()
Provides mechanism to register/unregister additional callbacks to create concrete subclasses of vtkTe...
static void UnRegisterCreateCallback(CreateFunction callback)
Provides mechanism to register/unregister additional callbacks to create concrete subclasses of vtkTe...
static vtkTextCodec * CodecForName(const char *CodecName)
Given a codec/storage name try to find one of our registered codecs that can handle it.
static vtkTextCodecFactory * New()
static vtkTextCodec * CodecToHandle(istream &InputStream)
Given a snippet of the stored data name try to find one of our registered codecs that can handle tran...
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:29