Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
berryCommandEvent.h
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 
18 #ifndef BERRYCOMMANDEVENT_H_
19 #define BERRYCOMMANDEVENT_H_
20 
22 
24 
25 namespace berry {
26 
27 class Command;
28 
39 
40 public:
41 
43 
73  CommandEvent(const SmartPointer<Command> command, bool categoryChanged,
74  bool definedChanged, bool descriptionChanged,
75  bool handledChanged, bool nameChanged,
76  bool parametersChanged, bool returnTypeChanged = false,
77  bool helpContextIdChanged = false, bool enabledChanged = false);
78 
85  SmartPointer<Command> GetCommand() const;
86 
92  bool IsCategoryChanged() const;
93 
99  bool IsHandledChanged() const;
100 
107  bool IsHelpContextIdChanged() const;
108 
114  bool IsParametersChanged() const;
115 
122  bool IsReturnTypeChanged() const;
123 
130  bool IsEnabledChanged() const;
131 
132 private:
133 
137  static int CHANGED_CATEGORY(); // = LAST_USED_BIT << 1;
138 
142  static int CHANGED_HANDLED(); // = LAST_USED_BIT << 2;
143 
147  static int CHANGED_PARAMETERS(); // = LAST_USED_BIT << 3;
148 
155  static int CHANGED_RETURN_TYPE(); // = LAST_USED_BIT << 4;
156 
163  static int CHANGED_HELP_CONTEXT_ID(); // = LAST_USED_BIT << 5;
164 
171  static int CHANGED_ENABLED(); // = LAST_USED_BIT << 6;
172 
176  const SmartPointer<Command> command;
177 
178 };
179 
180 }
181 
182 #endif /* BERRYCOMMANDEVENT_H_ */
Implements transparent reference counting.
#define berryObjectMacro(...)
Definition: berryMacros.h:37