VTK
vtkTextCodecFactory.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3 Program: Visualization Toolkit
4 Module: vtkTextCodecFactory.h
5 
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. 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 -------------------------------------------------------------------------*/
38 #ifndef vtkTextCodecFactory_h
39 #define vtkTextCodecFactory_h
40 
41 #include "vtkIOCoreModule.h" // For export macro
42 #include "vtkObject.h"
43 
44 class vtkTextCodec;
45 
47 {
48 public:
51  void PrintSelf(ostream& os, vtkIndent indent);
52 
54  typedef vtkTextCodec* (*CreateFunction)();
55 
57 
61  static void RegisterCreateCallback(CreateFunction callback);
62  static void UnRegisterCreateCallback(CreateFunction callback);
65 
70  static vtkTextCodec* CodecForName(const char* CodecName);
71 
75  static vtkTextCodec* CodecToHandle(istream& InputStream);
76 
78  static void Initialize();
79 
80 //BTX
81 protected:
84 
85 private:
86  vtkTextCodecFactory(const vtkTextCodecFactory &); // Not implemented.
87  void operator=(const vtkTextCodecFactory &); // Not implemented.
88 
90 
91  class CallbackVector;
92  static CallbackVector* Callbacks;
94 
95 //ETX
96 };
97 
98 #endif // vtkTextCodecFactory_h
vtkTextCodecFactory
maintain a list of text codecs and return instances
Definition: vtkTextCodecFactory.h:47
VTKIOCORE_EXPORT
#define VTKIOCORE_EXPORT
Definition: vtkIOCoreModule.h:15
vtkTextCodecFactory::CodecForName
static vtkTextCodec * CodecForName(const char *CodecName)
vtkIOCoreModule.h
vtkTextCodec
Virtual class to act as an interface for all text codecs.
Definition: vtkTextCodec.h:44
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkTextCodecFactory::UnRegisterAllCreateCallbacks
static void UnRegisterAllCreateCallbacks()
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:62
vtkTextCodecFactory::CodecToHandle
static vtkTextCodec * CodecToHandle(istream &InputStream)
vtkTextCodecFactory::vtkTextCodecFactory
vtkTextCodecFactory()
vtkTextCodecFactory::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkTextCodecFactory::New
static vtkTextCodecFactory * New()
vtkTextCodecFactory::UnRegisterCreateCallback
static void UnRegisterCreateCallback(CreateFunction callback)
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkTextCodecFactory::Initialize
static void Initialize()
vtkObject.h
vtkTextCodecFactory::RegisterCreateCallback
static void RegisterCreateCallback(CreateFunction callback)
vtkTextCodecFactory::~vtkTextCodecFactory
~vtkTextCodecFactory()