VTK
dox/TextAnalysis/vtkMimeTypes.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkMimeTypes.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 -------------------------------------------------------------------------*/
00020 
00050 #ifndef _vtkMimeTypes_h
00051 #define _vtkMimeTypes_h
00052 
00053 #include <vtkObject.h>
00054 #include <vtkStdString.h> //Needed for lookup
00055 
00056 class vtkMimeTypeStrategy;
00057 
00058 class VTK_TEXT_ANALYSIS_EXPORT vtkMimeTypes :
00059   public vtkObject
00060 {
00061 public:
00062   static vtkMimeTypes* New();
00063   vtkTypeMacro(vtkMimeTypes, vtkObject);
00064   void PrintSelf(ostream& os, vtkIndent indent);
00065 
00067   void ClearStrategies();
00070   void PrependStrategy(vtkMimeTypeStrategy* strategy);
00073   void AppendStrategy(vtkMimeTypeStrategy* strategy);
00074 
00077   vtkStdString Lookup(const vtkStdString& uri);
00080   vtkStdString Lookup(const char* begin, const char* end);
00083   vtkStdString Lookup(const vtkTypeUInt8* begin, const vtkTypeUInt8* end);
00086   vtkStdString Lookup(const vtkStdString& uri, const char* begin, const char* end);
00089   vtkStdString Lookup(const vtkStdString& uri, const vtkTypeUInt8* begin, const vtkTypeUInt8* end);
00090 *" will match any type (including empty
00093       type), and "text/*" will match "text/plain", "text/html", "text/xml",
00094       etc. */
00095   static bool Match(const vtkStdString& pattern, const vtkStdString& type);
00096 
00097 //BTX
00098 private:
00099   vtkMimeTypes();
00100   ~vtkMimeTypes();
00101 
00102   vtkMimeTypes(const vtkMimeTypes&); //Not implemented.
00103   void operator=(const vtkMimeTypes&); //Not implemented.
00104 
00105   class Implementation;
00106   Implementation* const Internal;
00107 //ETX
00108 };
00109 
00110 #endif // !_vtkMimeTypes_h
00111