VTK
dox/IO/Core/vtkTextCodecFactory.h
Go to the documentation of this file.
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 "vtkIOCoreModule.h" // For export macro
00042 #include "vtkObject.h"
00043 
00044 class vtkTextCodec;
00045 
00046 class VTKIOCORE_EXPORT vtkTextCodecFactory : public vtkObject
00047 {
00048 public:
00049   vtkTypeMacro(vtkTextCodecFactory, vtkObject);
00050   static vtkTextCodecFactory* New() ;
00051   void PrintSelf(ostream& os, vtkIndent indent);
00052 
00054   typedef vtkTextCodec* (*CreateFunction)();
00055 
00057 
00061   static void RegisterCreateCallback(CreateFunction callback);
00062   static void UnRegisterCreateCallback(CreateFunction callback);
00063   static void UnRegisterAllCreateCallbacks();
00065 
00070   static vtkTextCodec* CodecForName(const char* CodecName);
00071 
00075   static vtkTextCodec* CodecToHandle(istream& InputStream);
00076 
00078   static void Initialize();
00079 
00080 //BTX
00081 protected:
00082   vtkTextCodecFactory();
00083   ~vtkTextCodecFactory();
00084 
00085 private:
00086   vtkTextCodecFactory(const vtkTextCodecFactory &); // Not implemented.
00087   void operator=(const vtkTextCodecFactory &); // Not implemented.
00088 
00090 
00091   class CallbackVector;
00092   static CallbackVector* Callbacks;
00094 
00095 //ETX
00096 };
00097 
00098 #endif // __vtkTextCodecFactory_h