00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkTextCodecFactory.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00015 /*------------------------------------------------------------------------- 00016 Copyright 2008 Sandia Corporation. 00017 Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, 00018 the U.S. Government retains certain rights in this software. 00019 -------------------------------------------------------------------------*/ 00038 #ifndef __vtkTextCodecFactory_h 00039 #define __vtkTextCodecFactory_h 00040 00041 #include "vtkObject.h" 00042 00043 class vtkTextCodec; 00044 00045 class VTK_IO_EXPORT vtkTextCodecFactory : public vtkObject 00046 { 00047 public: 00048 vtkTypeMacro(vtkTextCodecFactory, vtkObject); 00049 static vtkTextCodecFactory* New() ; 00050 void PrintSelf(ostream& os, vtkIndent indent); 00051 00053 typedef vtkTextCodec* (*CreateFunction)(); 00054 00056 00060 static void RegisterCreateCallback(CreateFunction callback); 00061 static void UnRegisterCreateCallback(CreateFunction callback); 00062 static void UnRegisterAllCreateCallbacks(); 00064 00069 static vtkTextCodec* CodecForName(const char* CodecName); 00070 00074 static vtkTextCodec* CodecToHandle(istream& InputStream); 00075 00077 static void Initialize(); 00078 00079 //BTX 00080 protected: 00081 vtkTextCodecFactory(); 00082 ~vtkTextCodecFactory(); 00083 00084 private: 00085 vtkTextCodecFactory(const vtkTextCodecFactory &); // Not implemented. 00086 void operator=(const vtkTextCodecFactory &); // Not implemented. 00087 00089 00090 class CallbackVector; 00091 static CallbackVector* Callbacks; 00093 00094 //ETX 00095 }; 00096 00097 #endif // __vtkTextCodecFactory_h