Medical Imaging Interaction Toolkit  2018.4.99-c4b6bb11
Medical Imaging Interaction Toolkit
berryParameterType.h
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 #ifndef BERRYPARAMETERTYPE_H_
14 #define BERRYPARAMETERTYPE_H_
15 
19 
20 #include <QSharedPointer>
21 
22 namespace berry
23 {
24 
25 struct IParameterValueConverter;
26 
57 { //implements Comparable {
58 
59 public:
60 
62 
70 void AddListener(IParameterTypeListener* listener);
71 
82  bool operator<(const Object* object) const override;
83 
102  void Define(const QString& type,
103  const QSharedPointer<IParameterValueConverter>& parameterTypeConverter);
104 
113  IParameterValueConverter* GetValueConverter() const;
114 
128  bool IsCompatible(const QObject* const value) const;
129 
139  void RemoveListener(IParameterTypeListener* listener);
140 
147  QString ToString() const override;
148 
153  void Undefine() override;
154 
155 protected:
156 
157  friend class CommandManager;
158 
170  ParameterType(const QString& id);
171 
172 private:
173 
182  void FireParameterTypeChanged(const SmartPointer<ParameterTypeEvent> event);
183 
188  QSharedPointer<IParameterValueConverter> parameterTypeConverter;
189 
195  QString type;
196 
197  IParameterTypeListener::Events parameterTypeEvents;
198 
199 };
200 
201 }
202 
203 #endif /* BERRYPARAMETERTYPE_H_ */
Light weight base class for most BlueBerry classes.
Definition: berryObject.h:72
bool operator<(const StaticParameterMap::ValueType &a, const StaticParameterMap::ValueType &b)
Compares two var lists and returns true if the first list&#39;s first item is lower than the second one&#39;s...
Implements transparent reference counting.
#define berryObjectMacro(...)
Definition: berryMacros.h:33