forked from Kitware/VTK
/
vtkForceMimeTypeStrategy.h
65 lines (50 loc) · 2.13 KB
/
vtkForceMimeTypeStrategy.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*=========================================================================
Program: Visualization Toolkit
Module: vtkForceMimeTypeStrategy.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
/*-------------------------------------------------------------------------
Copyright 2008 Sandia Corporation.
Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
the U.S. Government retains certain rights in this software.
-------------------------------------------------------------------------*/
// .NAME vtkForceMimeTypeStrategy - Returns a specific mime type no matter what
//
// .SECTION Description
// vtkForceMimeTypeStrategy returns the same mime type for all files. The type
// can be specified by the caller, and defaults to text/plain.
//
// .SECTION See Also
// vtkMimeTypeStrategy, vtkMimeTypes.
//
// .SECTION Thanks
// Developed by Andy Wilson (atwilso@sandia.gov) at Sandia National Laboratories.
#ifndef _vtkForceMimeTypeStrategy_h
#define _vtkForceMimeTypeStrategy_h
#include <vtkMimeTypeStrategy.h>
class VTK_TEXT_ANALYSIS_EXPORT vtkForceMimeTypeStrategy :
public vtkMimeTypeStrategy
{
public:
static vtkForceMimeTypeStrategy* New();
vtkTypeMacro(vtkForceMimeTypeStrategy, vtkMimeTypeStrategy);
void PrintSelf(ostream& os, vtkIndent indent);
vtkGetStringMacro(MimeType);
vtkSetStringMacro(MimeType);
vtkStdString Lookup(const vtkStdString& uri, const vtkTypeUInt8* begin, const vtkTypeUInt8* end);
//BTX
protected:
vtkForceMimeTypeStrategy();
virtual ~vtkForceMimeTypeStrategy();
char* MimeType;
private:
vtkForceMimeTypeStrategy(const vtkForceMimeTypeStrategy&); //Not implemented.
void operator=(const vtkForceMimeTypeStrategy&); //Not implemented.
//ETX
};
#endif // !_vtkForceMimeTypeStrategy_h