Medical Imaging Interaction Toolkit  2021.02.99-e55a5d2f
Medical Imaging Interaction Toolkit
berryCommandEvent.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 
14 #ifndef BERRYCOMMANDEVENT_H_
15 #define BERRYCOMMANDEVENT_H_
16 
18 
20 
21 namespace berry {
22 
23 class Command;
24 
35 
36 public:
37 
39 
69  CommandEvent(const SmartPointer<Command> command, bool categoryChanged,
70  bool definedChanged, bool descriptionChanged,
71  bool handledChanged, bool nameChanged,
72  bool parametersChanged, bool returnTypeChanged = false,
73  bool helpContextIdChanged = false, bool enabledChanged = false);
74 
81  SmartPointer<Command> GetCommand() const;
82 
88  bool IsCategoryChanged() const;
89 
95  bool IsHandledChanged() const;
96 
103  bool IsHelpContextIdChanged() const;
104 
110  bool IsParametersChanged() const;
111 
118  bool IsReturnTypeChanged() const;
119 
126  bool IsEnabledChanged() const;
127 
128 private:
129 
133  static int CHANGED_CATEGORY(); // = LAST_USED_BIT << 1;
134 
138  static int CHANGED_HANDLED(); // = LAST_USED_BIT << 2;
139 
143  static int CHANGED_PARAMETERS(); // = LAST_USED_BIT << 3;
144 
151  static int CHANGED_RETURN_TYPE(); // = LAST_USED_BIT << 4;
152 
159  static int CHANGED_HELP_CONTEXT_ID(); // = LAST_USED_BIT << 5;
160 
167  static int CHANGED_ENABLED(); // = LAST_USED_BIT << 6;
168 
172  const SmartPointer<Command> command;
173 
174 };
175 
176 }
177 
178 #endif /* BERRYCOMMANDEVENT_H_ */
Implements transparent reference counting.
#define berryObjectMacro(...)
Definition: berryMacros.h:33