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 00019 #include "mitkGroupTagProperty.h" 00020 00021 00022 mitk::GroupTagProperty::GroupTagProperty() 00023 : mitk::BaseProperty() 00024 { 00025 } 00026 00027 mitk::GroupTagProperty::~GroupTagProperty() 00028 { 00029 } 00030 00031 00037 bool mitk::GroupTagProperty::Assignable(const BaseProperty& other) const 00038 { 00039 try 00040 { 00041 dynamic_cast<const Self&>(other); // dear compiler, please don't optimize this away! 00042 return true; 00043 } 00044 catch (std::bad_cast) 00045 { 00046 } 00047 return false; 00048 } 00049 00050 bool mitk::GroupTagProperty::operator==(const BaseProperty& property) const 00051 { 00052 const Self *other = dynamic_cast<const Self*>(&property); 00053 00054 return (other!=NULL); // if other property is also a GroupTagProperty, then it is equal to us, because tags have no value themselves 00055 }