VTK
vtkMimeTypes.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkMimeTypes.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 -------------------------------------------------------------------------*/
20 
50 #ifndef _vtkMimeTypes_h
51 #define _vtkMimeTypes_h
52 
53 #include <vtkObject.h>
54 #include <vtkStdString.h> //Needed for lookup
55 
57 
59  public vtkObject
60 {
61 public:
62  static vtkMimeTypes* New();
63  vtkTypeMacro(vtkMimeTypes, vtkObject);
64  void PrintSelf(ostream& os, vtkIndent indent);
65 
67  void ClearStrategies();
70  void PrependStrategy(vtkMimeTypeStrategy* strategy);
73  void AppendStrategy(vtkMimeTypeStrategy* strategy);
74 
77  vtkStdString Lookup(const vtkStdString& uri);
80  vtkStdString Lookup(const char* begin, const char* end);
83  vtkStdString Lookup(const vtkTypeUInt8* begin, const vtkTypeUInt8* end);
86  vtkStdString Lookup(const vtkStdString& uri, const char* begin, const char* end);
89  vtkStdString Lookup(const vtkStdString& uri, const vtkTypeUInt8* begin, const vtkTypeUInt8* end);
90 *" will match any type (including empty
93  type), and "text/*" will match "text/plain", "text/html", "text/xml",
94  etc. */
95  static bool Match(const vtkStdString& pattern, const vtkStdString& type);
96 
97 //BTX
98 private:
99  vtkMimeTypes();
100  ~vtkMimeTypes();
101 
102  vtkMimeTypes(const vtkMimeTypes&); //Not implemented.
103  void operator=(const vtkMimeTypes&); //Not implemented.
104 
105  class Implementation;
106  Implementation* const Internal;
107 //ETX
108 };
109 
110 #endif // !_vtkMimeTypes_h
111