13 #ifndef mitkCustomMimeType_h
14 #define mitkCustomMimeType_h
197 bool ParsePathForExtension(
const std::string &path, std::string &extension, std::string &filename)
const;
A custom mime-type that can be registered as a service object.
bool MatchesExtension(const std::string &path) const
Check whether the file extension of the given path matches this mime-type.
CustomMimeType(const CustomMimeType &other)
Copy constructor.
std::vector< std::string > GetExtensions() const
Get all file extensions this mime-type can handle.
virtual CustomMimeType * Clone() const
Create a heap-allocated copy of this CustomMimeType.
std::string GetComment() const
Get a human-readable description of this mime-type.
void SetExtension(const std::string &extension)
Set a single file extension, replacing all existing extensions.
CustomMimeType(const MimeType &other)
Construct from an immutable MimeType wrapper.
CustomMimeType()
Construct a default CustomMimeType with an empty name.
virtual ~CustomMimeType()
void SetCategory(const std::string &category)
Set the category for grouping this mime-type.
std::string GetFilenameWithoutExtension(const std::string &path) const
Get the filename from the given path, without the matching extension.
void AddExtension(const std::string &extension)
Add a file extension to the list if not already present (case-insensitive).
std::string GetCategory() const
Get the human-readable category of this mime-type.
CustomMimeType & operator=(const CustomMimeType &other)
Copy assignment operator.
void SetName(const std::string &name)
Set the unique name of this mime-type.
void Swap(CustomMimeType &r)
Swap the contents of this CustomMimeType with another.
std::string GetExtension(const std::string &path) const
Get the first matching extension found at the end of the given path.
CustomMimeType(const std::string &name)
Construct a CustomMimeType with the given unique name.
void SetComment(const std::string &comment)
Set the human-readable comment for this mime-type.
std::string GetName() const
Get the unique name for this mime-type.
CustomMimeType & operator=(const MimeType &other)
Assignment from an immutable MimeType wrapper.
virtual bool AppliesTo(const std::string &path) const
Check whether this mime-type can handle the file at the given path.
Immutable, value-type wrapper for a registered mime-type.
Provides the MITK_DECLARE_SERVICE_INTERFACE macro for registering C++ interfaces with both the CppMic...
#define MITK_DECLARE_SERVICE_INTERFACE(IFace, IId)
Declare a C++ interface for use with CppMicroServices (Qt not available).
Find image slices visible on a given plane.
void swap(CustomMimeType &l, CustomMimeType &r)
Swap two CustomMimeType objects.