Medical Imaging Interaction Toolkit  2024.12.99-0da743f6
Medical Imaging Interaction Toolkit
mitkMimeType.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef mitkMimeType_h
14 #define mitkMimeType_h
15 
16 #include <MitkCoreExports.h>
17 
18 #include <usSharedData.h>
19 
20 #include <vector>
21 
22 namespace mitk
23 {
24  class CustomMimeType;
25 
37  {
38  public:
39  MimeType();
40  MimeType(const MimeType &other);
41  MimeType(const CustomMimeType &x, int rank, long id);
42 
43  ~MimeType();
44 
45  MimeType &operator=(const MimeType &other);
46  bool operator==(const MimeType &other) const;
47 
48  bool operator<(const MimeType &other) const;
49 
51  std::string GetName() const;
52 
54  std::string GetCategory() const;
55 
57  std::vector<std::string> GetExtensions() const;
58 
60  std::string GetComment() const;
61 
63  std::string GetFilenameWithoutExtension(const std::string &path) const;
64 
66  bool AppliesTo(const std::string &path) const;
67 
69  bool MatchesExtension(const std::string &path) const;
70 
72  bool IsValid() const;
73 
75  void Swap(MimeType &m);
76 
77  private:
78  struct Impl;
79 
80  // Use C++11 shared_ptr instead
82  };
83 
84  MITKCORE_EXPORT void swap(MimeType &m1, MimeType &m2);
85 
86  MITKCORE_EXPORT std::ostream &operator<<(std::ostream &os, const MimeType &mimeType);
87 }
88 
89 #endif
mitk::swap
void swap(CustomMimeType &l, CustomMimeType &r)
mitk::CustomMimeType
The CustomMimeType class represents a custom mime-type which may be registered as a service object....
Definition: mitkCustomMimeType.h:44
mitk::modelFit::operator<
bool operator<(const StaticParameterMap::ValueType &a, const StaticParameterMap::ValueType &b)
Compares two var lists and returns true if the first list's first item is lower than the second one's...
Definition: mitkModelFitStaticParameterMap.h:139
mitk::operator<<
MITKCORE_EXPORT std::ostream & operator<<(std::ostream &o, DataNode::Pointer &dtn)
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::operator==
MITKCORE_EXPORT bool operator==(const InteractionEvent &a, const InteractionEvent &b)
MitkCoreExports.h
MITKCORE_EXPORT
#define MITKCORE_EXPORT
Definition: MitkCoreExports.h:15
usSharedData.h
us::SharedDataPointer< const Impl >
mitk::MimeType
The MimeType class represents a registered mime-type. It is an immutable wrapper for mitk::CustomMime...
Definition: mitkMimeType.h:36