|
VTK
|
Determines the MIME type of a resource. More...
#include <vtkMimeTypes.h>
Public Types | |
| typedef vtkObject | Superclass |
Public Types inherited from vtkObject | |
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) |
Public Member Functions inherited from vtkObject | |
| virtual void | DebugOn () |
| virtual void | DebugOff () |
| unsigned char | GetDebug () |
| void | SetDebug (unsigned char debugFlag) |
| virtual void | Modified () |
| virtual unsigned long | GetMTime () |
| unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
| unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
| vtkCommand * | GetCommand (unsigned long tag) |
| void | RemoveObserver (vtkCommand *) |
| void | RemoveObservers (unsigned long event, vtkCommand *) |
| void | RemoveObservers (const char *event, vtkCommand *) |
| int | HasObserver (unsigned long event, vtkCommand *) |
| int | HasObserver (const char *event, vtkCommand *) |
| void | RemoveObserver (unsigned long tag) |
| void | RemoveObservers (unsigned long event) |
| void | RemoveObservers (const char *event) |
| void | RemoveAllObservers () |
| int | HasObserver (unsigned long event) |
| int | HasObserver (const char *event) |
| template<class U , class T > | |
| unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
| template<class U , class T > | |
| unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
| int | InvokeEvent (unsigned long event, void *callData) |
| int | InvokeEvent (const char *event, void *callData) |
| int | InvokeEvent (unsigned long event) |
| int | InvokeEvent (const char *event) |
Public Member Functions inherited from vtkObjectBase | |
| const char * | GetClassName () const |
| virtual void | Delete () |
| virtual void | FastDelete () |
| void | Print (ostream &os) |
| virtual void | Register (vtkObjectBase *o) |
| virtual void | UnRegister (vtkObjectBase *o) |
| void | SetReferenceCount (int) |
| void | PrintRevisions (ostream &os) |
| virtual void | PrintHeader (ostream &os, vtkIndent indent) |
| virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
| int | GetReferenceCount () |
Static Public Member Functions | |
| static vtkMimeTypes * | New () |
| static int | IsTypeOf (const char *type) |
| static vtkMimeTypes * | SafeDownCast (vtkObject *o) |
| *will match any and static text bool | Match (const vtkStdString &pattern, const vtkStdString &type) |
Static Public Member Functions inherited from vtkObject | |
| static void | BreakOnError () |
| static void | SetGlobalWarningDisplay (int val) |
| static void | GlobalWarningDisplayOn () |
| static void | GlobalWarningDisplayOff () |
| static int | GetGlobalWarningDisplay () |
Additional Inherited Members | |
Protected Member Functions inherited from vtkObject | |
| vtkObject () | |
| virtual | ~vtkObject () |
| virtual void | RegisterInternal (vtkObjectBase *, int check) |
| virtual void | UnRegisterInternal (vtkObjectBase *, int check) |
| void | InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL) |
| void | InternalReleaseFocus () |
Protected Member Functions inherited from vtkObjectBase | |
| vtkObjectBase () | |
| virtual | ~vtkObjectBase () |
| virtual void | CollectRevisions (ostream &os) |
| virtual void | ReportReferences (vtkGarbageCollector *) |
| vtkObjectBase (const vtkObjectBase &) | |
| void | operator= (const vtkObjectBase &) |
Protected Attributes inherited from vtkObject | |
| unsigned char | Debug |
| vtkTimeStamp | MTime |
| vtkSubjectHelper * | SubjectHelper |
Protected Attributes inherited from vtkObjectBase | |
| int | ReferenceCount |
| vtkWeakPointerBase ** | WeakPointers |
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.
Definition at line 58 of file vtkMimeTypes.h.
| typedef vtkObject vtkMimeTypes::Superclass |
Reimplemented from vtkObject.
Definition at line 63 of file vtkMimeTypes.h.
|
static |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
Reimplemented from vtkObject.
|
virtual |
Reimplemented from vtkObject.
|
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 |
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 |
Reimplemented from vtkObject.
|
virtual |
| 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 "
|
static |
1.8.1