Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
berryObjectString.cpp
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #include "berryObjectString.h"
14 
15 namespace berry {
16 
18 {}
19 
20 ObjectString::ObjectString(const QString& s)
21  : QString(s)
22 {}
23 
24 bool ObjectString::operator==(const Object* other) const
25 {
26  if (const ObjectString* otherStr = dynamic_cast<const ObjectString*>(other))
27  {
28  return static_cast<const QString&>(*this) == static_cast<const QString&>(*otherStr);
29  }
30  return false;
31 }
32 
33 bool ObjectString::operator==(const QString& other) const
34 {
35  return static_cast<const QString&>(*this) == other;
36 }
37 
38 QString ObjectString::ToString() const
39 {
40  return *this;
41 }
42 
44 {
45 }
46 
48 {
49  QString::operator =(other);
50  return *this;
51 }
52 
53 }
ObjectString & operator=(const QString &other)
bool operator==(const Object *other) const override
Light weight base class for most BlueBerry classes.
Definition: berryObject.h:72
QString ToString() const override