|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
Lightweight metadata container for DataStorage instances. More...
#include <mitkDataStorageReference.h>
Public Member Functions | |
| DataStorageReference () | |
| Default constructor. Creates an invalid reference with no storage. More... | |
| DataStorageReference (const std::string &label, DataStorage::Pointer storage, bool isDefault=false) | |
| Construct a DataStorageReference with the given label, storage, and default flag. More... | |
| std::string | GetLabel () const |
| Get the human-readable label for this DataStorage. More... | |
| void | SetLabel (const std::string &label) |
| Set the human-readable label for this DataStorage. More... | |
| DataStorage::Pointer | GetStorage () const |
| Get the DataStorage instance associated with this reference. More... | |
| void | SetStorage (DataStorage::Pointer storage) |
| Set the DataStorage instance associated with this reference. More... | |
| bool | IsDefault () const |
| Check whether this is the default/primary DataStorage. More... | |
| bool | IsValid () const |
| Check if this reference contains a valid (non-null) DataStorage. More... | |
| bool | operator== (const DataStorageReference &other) const |
| Equality comparison operator. More... | |
| bool | operator!= (const DataStorageReference &other) const |
| Inequality comparison operator. More... | |
Lightweight metadata container for DataStorage instances.
This class associates a DataStorage with a label and an immutable default flag.
The IsDefault property is set at construction time and cannot be changed, since default status is a property of how the storage was created.
Definition at line 31 of file mitkDataStorageReference.h.
| mitk::DataStorageReference::DataStorageReference | ( | ) |
Default constructor. Creates an invalid reference with no storage.
| mitk::DataStorageReference::DataStorageReference | ( | const std::string & | label, |
| DataStorage::Pointer | storage, | ||
| bool | isDefault = false |
||
| ) |
Construct a DataStorageReference with the given label, storage, and default flag.
| [in] | label | Human-readable label for the DataStorage. |
| [in] | storage | The DataStorage instance to associate. |
| [in] | isDefault | If true, marks this as the default/primary DataStorage. |
| std::string mitk::DataStorageReference::GetLabel | ( | ) | const |
Get the human-readable label for this DataStorage.
| DataStorage::Pointer mitk::DataStorageReference::GetStorage | ( | ) | const |
Get the DataStorage instance associated with this reference.
| bool mitk::DataStorageReference::IsDefault | ( | ) | const |
Check whether this is the default/primary DataStorage.
This property is immutable after construction.
| bool mitk::DataStorageReference::IsValid | ( | ) | const |
Check if this reference contains a valid (non-null) DataStorage.
| bool mitk::DataStorageReference::operator!= | ( | const DataStorageReference & | other | ) | const |
Inequality comparison operator.
| [in] | other | The other DataStorageReference to compare with. |
| bool mitk::DataStorageReference::operator== | ( | const DataStorageReference & | other | ) | const |
Equality comparison operator.
| [in] | other | The other DataStorageReference to compare with. |
| void mitk::DataStorageReference::SetLabel | ( | const std::string & | label | ) |
Set the human-readable label for this DataStorage.
| [in] | label | The new label string. |
| void mitk::DataStorageReference::SetStorage | ( | DataStorage::Pointer | storage | ) |
Set the DataStorage instance associated with this reference.
| [in] | storage | The DataStorage smart pointer. |