VTK  9.1.0
vtkTextCodecFactory.h
Go to the documentation of this file.
1/*=========================================================================
2
3Program: Visualization Toolkit
4Module: vtkTextCodecFactory.h
5
6Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7All rights reserved.
8See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10This software is distributed WITHOUT ANY WARRANTY; without even
11the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12PURPOSE. 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
45class vtkTextCodec;
46
47class VTKIOCORE_EXPORT vtkTextCodecFactory : public vtkObject
48{
49public:
52 void PrintSelf(ostream& os, vtkIndent indent) override;
53
57 typedef vtkTextCodec* (*CreateFunction)();
58
60
65 static void RegisterCreateCallback(CreateFunction callback);
66 static void UnRegisterCreateCallback(CreateFunction callback);
69
76 static vtkTextCodec* CodecForName(const char* CodecName);
77
83 static vtkTextCodec* CodecToHandle(istream& InputStream);
84
88 static void Initialize();
89
90protected:
93
94private:
96 void operator=(const vtkTextCodecFactory&) = delete;
97
99
102 class CallbackVector;
103 static CallbackVector* Callbacks;
105};
106
107#endif // vtkTextCodecFactory_h
a simple class to control print indentation
Definition: vtkIndent.h:113
abstract base class for most VTK objects
Definition: vtkObject.h:73
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.
Definition: vtkTextCodec.h:45