Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
berryNamedHandleObject.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 "berryNamedHandleObject.h"
18 
19 #include "berryCommandExceptions.h"
20 
21 namespace berry
22 {
23 
25  HandleObject(id)
26 {
27 
28 }
29 
31 {
32  if (!this->IsDefined())
33  {
34  throw NotDefinedException(
35  "Cannot get a description from an undefined object. " //$NON-NLS-1$
36  + id);
37  }
38 
39  return description;
40 }
41 
43 {
44  if (!this->IsDefined())
45  {
46  throw NotDefinedException(
47  "Cannot get the name from an undefined object. " + id);
48  }
49 
50  return name;
51 }
52 
53 }
virtual QString GetName() const
virtual QString GetDescription() const
NamedHandleObject(const QString &id)