VTK: IO/Core/vtkTextCodecFactory.h Source File

| 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:
35 vtkTypeMacro(vtkTextCodecFactory, vtkObject);
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:
76 vtkTextCodecFactory();
77 ~vtkTextCodecFactory() override;
78
79 private:
80 vtkTextCodecFactory(const vtkTextCodecFactory&) = delete;
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
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:61
vtkTextCodecFactory
maintain a list of text codecs and return instances
Definition: vtkTextCodecFactory.h:33
vtkTextCodecFactory::Initialize
static void Initialize()
Initialize core text codecs - needed for the static compilation case.
vtkTextCodecFactory::vtkTextCodecFactory
vtkTextCodecFactory()
vtkTextCodecFactory::~vtkTextCodecFactory
~vtkTextCodecFactory() override
vtkTextCodecFactory::RegisterCreateCallback
static void RegisterCreateCallback(CreateFunction callback)
Provides mechanism to register/unregister additional callbacks to create concrete subclasses of vtkTe...
vtkTextCodecFactory::UnRegisterAllCreateCallbacks
static void UnRegisterAllCreateCallbacks()
Provides mechanism to register/unregister additional callbacks to create concrete subclasses of vtkTe...
vtkTextCodecFactory::UnRegisterCreateCallback
static void UnRegisterCreateCallback(CreateFunction callback)
Provides mechanism to register/unregister additional callbacks to create concrete subclasses of vtkTe...
vtkTextCodecFactory::CodecForName
static vtkTextCodec * CodecForName(const char *CodecName)
Given a codec/storage name try to find one of our registered codecs that can handle it.
vtkTextCodecFactory::New
static vtkTextCodecFactory * New()
vtkTextCodecFactory::CodecToHandle
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::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:29
vtkObject.h