VTK  9.4.20241218
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
29VTK_ABI_NAMESPACE_BEGIN
30class vtkTextCodec;
31
32class VTKIOCORE_EXPORT vtkTextCodecFactory : public vtkObject
33{
34public:
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
75protected:
78
79private:
81 void operator=(const vtkTextCodecFactory&) = delete;
82
84
87 class CallbackVector;
88 static CallbackVector* Callbacks;
90};
91
92VTK_ABI_NAMESPACE_END
93#endif // vtkTextCodecFactory_h
a simple class to control print indentation
Definition vtkIndent.h:108
abstract base class for most VTK objects
Definition vtkObject.h:162
maintain a list of text codecs and return instances
static void Initialize()
Initialize core text codecs - needed for the static compilation case.
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...
~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 vtkTextCodecFactory * New()
static vtkTextCodec * CodecForName(const char *CodecName)
Given a codec/storage name try to find one of our registered codecs that can handle it.
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.