13 #ifndef mitkFileWriterSelector_h
14 #define mitkFileWriterSelector_h
151 const std::string &destMimeType = std::string(),
152 const std::string &path = std::string());
182 std::vector<Item>
Get(
const std::string &mimeType)
const;
188 std::vector<Item>
Get()
const;
226 bool Select(
const std::string &mimeType);
Base class of all data objects.
Represents a single candidate file writer with associated metadata.
long GetServiceId() const
Get the service id for this writer.
Item & operator=(const Item &other)
Copy assignment operator.
MimeType GetMimeType() const
Get the mime-type associated with this writer item.
std::string GetDescription() const
Get the human-readable description of this writer.
bool operator<(const Item &other) const
Compare two items for sorting.
IFileWriter::ConfidenceLevel GetConfidenceLevel() const
Get the confidence level of this writer for the given data.
IFileWriter * GetWriter() const
Get the IFileWriter instance for this item.
us::ServiceReference< IFileWriter > GetReference() const
Get the service reference for this writer.
Item(const Item &other)
Copy constructor.
std::string GetBaseDataType() const
Get the BaseData type name this writer supports.
Selects the most suitable IFileWriter for a given BaseData object.
void Swap(FileWriterSelector &fws)
Swap the contents of this selector with another.
Item GetSelected() const
Get the currently selected writer item.
std::vector< Item > Get() const
Get a sorted list of writer items matching the currently selected mime-type.
long GetSelectedId() const
Get the service id of the currently selected writer.
bool Select(const std::string &mimeType)
Select the best writer for the given mime-type.
FileWriterSelector(const BaseData *baseData, const std::string &destMimeType=std::string(), const std::string &path=std::string())
Construct a selector for the given BaseData and optional mime-type/path.
Item Get(long id) const
Get a writer item by its service id.
std::vector< Item > Get(const std::string &mimeType) const
Get a sorted list of writer items filtered by mime-type.
bool IsEmpty() const
Check whether any suitable writers were found.
bool Select(const Item &item)
Select a writer by Item.
Item GetDefault() const
Get the best-matching (highest-ranked) writer item.
FileWriterSelector(const FileWriterSelector &other)
Copy constructor.
FileWriterSelector & operator=(const FileWriterSelector &other)
Copy assignment operator.
std::vector< MimeType > GetMimeTypes() const
Get all mime-types for which at least one writer was found.
bool Select(long id)
Select a writer by its service id.
long GetDefaultId() const
Get the service id of the best-matching writer.
Immutable, value-type wrapper for a registered mime-type.
Find image slices visible on a given plane.
void swap(CustomMimeType &l, CustomMimeType &r)
Swap two CustomMimeType objects.
ConfidenceLevel
A confidence level describing the reader's or writer's ability to handle the given data or file forma...
The common interface of all MITK file writers.