Medical Imaging Interaction Toolkit  2024.12.99-0da743f6
Medical Imaging Interaction Toolkit
berryExpressionInfo.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 BERRYEXPRESSIONINFO_H_
14 #define BERRYEXPRESSIONINFO_H_
15 
16 #include <QSet>
17 
18 #include <typeinfo>
19 
21 
22 namespace berry {
23 
36 
37 private:
38  bool fHasDefaultVariableAccess;
39  bool fHasSystemPropertyAccess;
40 
41  // Although we are using this as sets we use lists since
42  // they are faster for smaller numbers of elements
43  QSet<QString> fAccessedVariableNames;
44  QSet<QString> fMisbehavingExpressionTypes;
45  QSet<QString> fAccessedPropertyNames;
46 
47 
48 public:
49 
51 
58  bool HasDefaultVariableAccess() const;
59 
63  void MarkDefaultVariableAccessed();
64 
71  bool HasSystemPropertyAccess() const;
72 
76  void MarkSystemPropertyAccessed();
77 
83  QSet<QString> GetAccessedVariableNames() const;
84 
90  void AddVariableNameAccess(const QString& name);
91 
97  QSet<QString> GetAccessedPropertyNames() const;
98 
106  void AddAccessedPropertyName(const QString& name);
107 
116  QSet<QString> GetMisbehavingExpressionTypes() const;
117 
123  void AddMisBehavingExpressionType(const std::type_info& clazz);
124 
130  void Merge(ExpressionInfo* other);
131 
138  void MergeExceptDefaultVariable(ExpressionInfo* other);
139 
140 
141 private:
142 
148  void MergeDefaultVariableAccess(ExpressionInfo* other);
149 
155  void MergeSystemPropertyAccess(ExpressionInfo* other);
156 
162  void MergeAccessedVariableNames(ExpressionInfo* other);
163 
170  void MergeAccessedPropertyNames(ExpressionInfo* other);
171 
177  void MergeMisbehavingExpressionTypes(ExpressionInfo* other);
178 
179 };
180 
181 } // namespace berry
182 
183 #endif /*BERRYEXPRESSIONINFO_H_*/
berry::ExpressionInfo
Definition: berryExpressionInfo.h:35
org_blueberry_core_expressions_Export.h
BERRY_EXPRESSIONS
#define BERRY_EXPRESSIONS
Definition: org_blueberry_core_expressions_Export.h:26
berry
Definition: QmitkPropertyItemModel.h:24