13 #ifndef mitkMimeType_h
14 #define mitkMimeType_h
A custom mime-type that can be registered as a service object.
Immutable, value-type wrapper for a registered mime-type.
std::string GetName() const
Get the unique name of this mime-type.
std::string GetComment() const
Get a human-readable comment describing this mime-type.
bool MatchesExtension(const std::string &path) const
Check whether the extension of the given path matches this mime-type.
bool IsValid() const
Check whether this MimeType object is valid (has a non-empty name).
MimeType()
Construct a default (invalid) MimeType.
std::string GetFilenameWithoutExtension(const std::string &path) const
Extract the filename without the matching extension from a path.
void Swap(MimeType &m)
Swap the contents of this MimeType with another.
MimeType & operator=(const MimeType &other)
Copy assignment operator.
MimeType(const CustomMimeType &x, int rank, long id)
Construct a MimeType from a CustomMimeType with a service rank and id.
bool operator<(const MimeType &other) const
Less-than comparison based on rank and service id.
std::vector< std::string > GetExtensions() const
Get the list of file extensions this mime-type handles.
std::string GetCategory() const
Get the human-readable category (e.g. "Images", "Surfaces").
bool operator==(const MimeType &other) const
Equality comparison based on the mime-type name.
bool AppliesTo(const std::string &path) const
Check whether this mime-type can handle the given file path.
MimeType(const MimeType &other)
Copy constructor.
Find image slices visible on a given plane.
MITKCORE_EXPORT std::ostream & operator<<(std::ostream &o, DataNode::Pointer &dtn)
Stream output operator for DataNode smart pointers.
void swap(CustomMimeType &l, CustomMimeType &r)
Swap two CustomMimeType objects.