Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
berryObjectString.cpp
Go to the documentation of this file.
1 /*===================================================================
2 
3 BlueBerry Platform
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #include "berryObjectString.h"
18 
19 namespace berry {
20 
22 {}
23 
24 ObjectString::ObjectString(const QString& s)
25  : QString(s)
26 {}
27 
28 bool ObjectString::operator==(const Object* other) const
29 {
30  if (const ObjectString* otherStr = dynamic_cast<const ObjectString*>(other))
31  {
32  return static_cast<const QString&>(*this) == static_cast<const QString&>(*otherStr);
33  }
34  return false;
35 }
36 
37 bool ObjectString::operator==(const QString& other) const
38 {
39  return static_cast<const QString&>(*this) == other;
40 }
41 
42 QString ObjectString::ToString() const
43 {
44  return *this;
45 }
46 
48 {
49 }
50 
52 {
53  QString::operator =(other);
54  return *this;
55 }
56 
57 }
ObjectString & operator=(const QString &other)
bool operator==(const Object *other) const override
Light weight base class for most BlueBerry classes.
Definition: berryObject.h:78
QString ToString() const override