vtkMimeTypes Class Reference

#include <vtkMimeTypes.h>

Inheritance diagram for vtkMimeTypes:

Inheritance graph
[legend]
Collaboration diagram for vtkMimeTypes:

Collaboration graph
[legend]

List of all members.


Detailed Description

Determines the MIME type of a resource.

vtkMimeTypes is a helper class for determining the MIME type of a resource at runtime. To use it, create an instance of vtkMimeTypes, then call the Lookup() method to determine the MIME type of each resource of-interest.

vtkMimeTypes relies on a set of strategy objects to perform the actual lookups. These strategy objects may determine the MIME type based on arbitrary methods, including looking at file extensions, examining the contents of the resource, or some combination thereof.

By default, vtkMimeTypes is configured with a simple cross-platform strategy that identifies resources based on a hard-coded list of filename extensions, but you can supplement this process with your own strategies. The list of strategies is executed in-order to determine the MIME type of a resource, so earlier strategies "override" later strategies.

See also:
vtkMimeTypeStrategy, vtkFileExtensionMimeTypeStrategy.
Thanks:
Developed by Timothy M. Shead (tshead@sandia.gov) at Sandia National Laboratories.
Tests:
vtkMimeTypes (Tests)

Definition at line 58 of file vtkMimeTypes.h.


Public Types

typedef vtkObject Superclass

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
*will match any type (including empty type)
void ClearStrategies ()
void PrependStrategy (vtkMimeTypeStrategy *strategy)
void AppendStrategy (vtkMimeTypeStrategy *strategy)
vtkStdString Lookup (const vtkStdString &uri)
vtkStdString Lookup (const char *begin, const char *end)
vtkStdString Lookup (const vtkTypeUInt8 *begin, const vtkTypeUInt8 *end)
vtkStdString Lookup (const vtkStdString &uri, const char *begin, const char *end)
vtkStdString Lookup (const vtkStdString &uri, const vtkTypeUInt8 *begin, const vtkTypeUInt8 *end)

Static Public Member Functions

static vtkMimeTypesNew ()
static int IsTypeOf (const char *type)
static vtkMimeTypesSafeDownCast (vtkObject *o)
*will match any and static
text bool 
Match (const vtkStdString &pattern, const vtkStdString &type)

Member Typedef Documentation

Reimplemented from vtkObject.

Definition at line 63 of file vtkMimeTypes.h.


Member Function Documentation

static vtkMimeTypes* vtkMimeTypes::New (  )  [static]

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkObject.

virtual const char* vtkMimeTypes::GetClassName (  )  [virtual]

Reimplemented from vtkObject.

static int vtkMimeTypes::IsTypeOf ( const char *  name  )  [static]

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkObject.

virtual int vtkMimeTypes::IsA ( const char *  name  )  [virtual]

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkObject.

static vtkMimeTypes* vtkMimeTypes::SafeDownCast ( vtkObject o  )  [static]

Reimplemented from vtkObject.

void vtkMimeTypes::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkObject.

void vtkMimeTypes::ClearStrategies (  ) 

Clear the list of strategies.

void vtkMimeTypes::PrependStrategy ( vtkMimeTypeStrategy strategy  ) 

Clear the list of strategies.

void vtkMimeTypes::AppendStrategy ( vtkMimeTypeStrategy strategy  ) 

Clear the list of strategies.

vtkStdString vtkMimeTypes::Lookup ( const vtkStdString uri  ) 

Given a resource URI, returns the MIME-type of the resource, or empty-string if the type cannot be identified.

vtkStdString vtkMimeTypes::Lookup ( const char *  begin,
const char *  end 
)

Given a resource URI, returns the MIME-type of the resource, or empty-string if the type cannot be identified.

vtkStdString vtkMimeTypes::Lookup ( const vtkTypeUInt8 *  begin,
const vtkTypeUInt8 *  end 
)

Given a resource URI, returns the MIME-type of the resource, or empty-string if the type cannot be identified.

vtkStdString vtkMimeTypes::Lookup ( const vtkStdString uri,
const char *  begin,
const char *  end 
)

Given a resource URI, returns the MIME-type of the resource, or empty-string if the type cannot be identified.

vtkStdString vtkMimeTypes::Lookup ( const vtkStdString uri,
const vtkTypeUInt8 *  begin,
const vtkTypeUInt8 *  end 
)

Given a resource URI, returns the MIME-type of the resource, or empty-string if the type cannot be identified.

* will match any vtkMimeTypes::type ( including empty  type  ) 

Returns true iff a Mime pattern matches the given type. Handles wildcards so the pattern "

* will match any and static text bool vtkMimeTypes::Match ( const vtkStdString pattern,
const vtkStdString type 
) [static]


The documentation for this class was generated from the following file:

Generated on Wed Aug 24 11:48:21 2011 for VTK by  doxygen 1.5.6