Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::FileReaderSelector::Item Class Reference

Represents a single candidate file reader with associated metadata. More...

#include <mitkFileReaderSelector.h>

Public Member Functions

 Item (const Item &other)
 Copy constructor. More...
 
 ~Item ()
 
Item & operator= (const Item &other)
 Copy assignment operator. More...
 
IFileReader * GetReader () const
 Get the IFileReader instance for this item. More...
 
std::string GetDescription () const
 Get the human-readable description of this reader. More...
 
IFileReader::ConfidenceLevel GetConfidenceLevel () const
 Get the confidence level of this reader for the given file. More...
 
MimeType GetMimeType () const
 Get the mime-type associated with this reader item. More...
 
us::ServiceReference< IFileReader > GetReference () const
 Get the service reference for this reader. More...
 
long GetServiceId () const
 Get the service id for this reader. More...
 
bool operator< (const Item &other) const
 Compare two items for sorting. More...
 

Detailed Description

Represents a single candidate file reader with associated metadata.

Items are comparable and sorted by confidence level, mime-type rank, and service ranking. The best-matching item sorts last (highest).

Definition at line 54 of file mitkFileReaderSelector.h.

Constructor & Destructor Documentation

◆ Item()

mitk::FileReaderSelector::Item::Item ( const Item &  other)

Copy constructor.

Parameters
[in]otherThe Item to copy.

◆ ~Item()

mitk::FileReaderSelector::Item::~Item ( )

Member Function Documentation

◆ GetConfidenceLevel()

IFileReader::ConfidenceLevel mitk::FileReaderSelector::Item::GetConfidenceLevel ( ) const

Get the confidence level of this reader for the given file.

Returns
The confidence level.

◆ GetDescription()

std::string mitk::FileReaderSelector::Item::GetDescription ( ) const

Get the human-readable description of this reader.

Returns
The description string, or an empty string if not set.

◆ GetMimeType()

MimeType mitk::FileReaderSelector::Item::GetMimeType ( ) const

Get the mime-type associated with this reader item.

Returns
The MimeType for this reader.

◆ GetReader()

IFileReader* mitk::FileReaderSelector::Item::GetReader ( ) const

Get the IFileReader instance for this item.

Returns
Pointer to the reader, or nullptr if unavailable.

◆ GetReference()

us::ServiceReference<IFileReader> mitk::FileReaderSelector::Item::GetReference ( ) const

Get the service reference for this reader.

Returns
The CppMicroServices service reference.

◆ GetServiceId()

long mitk::FileReaderSelector::Item::GetServiceId ( ) const

Get the service id for this reader.

Returns
The unique service id.

◆ operator<()

bool mitk::FileReaderSelector::Item::operator< ( const Item &  other) const

Compare two items for sorting.

Parameters
[in]otherThe Item to compare with.
Returns
true if this item ranks lower than other.

Sorting order (ascending): confidence level, then mime-type rank, then service ranking. The best match sorts last.

◆ operator=()

Item& mitk::FileReaderSelector::Item::operator= ( const Item &  other)

Copy assignment operator.

Parameters
[in]otherThe Item to assign from.
Returns
Reference to this Item.

The documentation for this class was generated from the following file: