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