27 Impl() : m_CustomMimeType(new CustomMimeType()), m_Rank(-1), m_Id(-1) {}
28 Impl(
const CustomMimeType &x,
int rank,
long id) : m_CustomMimeType(x.
Clone()), m_Rank(rank), m_Id(id) {}
29 std::unique_ptr<CustomMimeType> m_CustomMimeType;
41 m_Data = other.m_Data;
48 if (m_Data->m_Rank != other.m_Data->m_Rank)
50 return m_Data->m_Rank < other.m_Data->m_Rank;
52 return other.m_Data->m_Id < m_Data->m_Id;
61 return m_Data->m_CustomMimeType->GetFilenameWithoutExtension(path);
64 bool MimeType::AppliesTo(
const std::string &path)
const {
return m_Data->m_CustomMimeType->AppliesTo(path); }
67 return m_Data->m_CustomMimeType->MatchesExtension(path);
72 return m_Data.
Data() != NULL && m_Data->m_CustomMimeType.get() != NULL &&
73 !m_Data->m_CustomMimeType->GetName().empty();
81 std::vector<std::string> extensions = mimeType.
GetExtensions();
82 for (std::vector<std::string>::const_iterator iter = extensions.begin(), endIter = extensions.end();
86 if (iter != extensions.begin())
bool AppliesTo(const std::string &path) const
MITKCORE_EXPORT std::ostream & operator<<(std::ostream &o, DataNode::Pointer &dtn)
void Swap(SharedDataPointer &other)
DataCollection - Class to facilitate loading/accessing structured data.
std::vector< std::string > GetExtensions() const
std::string GetName() const
std::string GetFilenameWithoutExtension(const std::string &path) const
The CustomMimeType class represents a custom mime-type which may be registered as a service object...
MimeType & operator=(const MimeType &other)
bool operator<(const MimeType &other) const
void swap(CustomMimeType &l, CustomMimeType &r)
The MimeType class represens a registered mime-type. It is an immutable wrapper for mitk::CustomMimeT...
std::string GetComment() const
std::string GetCategory() const
bool operator==(const MimeType &other) const
bool MatchesExtension(const std::string &path) const