00001 /*========================================================================= 00002 00003 Program: Medical Imaging & Interaction Toolkit 00004 Language: C++ 00005 Date: $Date$ 00006 Version: $Revision$ 00007 00008 Copyright (c) German Cancer Research Center, Division of Medical and 00009 Biological Informatics. All rights reserved. 00010 See MITKCopyright.txt or https://www.mitk.org/copyright.html for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 00018 #include "mitkDataStorageReference.h" 00019 00020 namespace mitk { 00021 00022 DataStorageReference::DataStorageReference(DataStorage::Pointer dataStorage, bool isDefault) 00023 : m_Default(isDefault), m_DataStorage(dataStorage) 00024 { 00025 00026 } 00027 00028 DataStorage::Pointer DataStorageReference::GetDataStorage() const 00029 { 00030 return m_DataStorage; 00031 } 00032 00033 00034 bool DataStorageReference::IsDefault() const 00035 { 00036 return m_Default; 00037 } 00038 00039 std::string DataStorageReference::GetLabel() const 00040 { 00041 return m_Label; 00042 } 00043 00044 void DataStorageReference::SetLabel(const std::string& label) 00045 { 00046 m_Label = label; 00047 } 00048 00049 bool DataStorageReference::operator==(const IDataStorageReference* o) const 00050 { 00051 if (dynamic_cast<const DataStorageReference*>(o) == 0) return false; 00052 return (m_DataStorage == dynamic_cast<const DataStorageReference*>(o)->m_DataStorage); 00053 } 00054 00055 }