Medical Imaging Interaction Toolkit  2018.4.99-65942676
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 
118  QSet<QString> GetMisbehavingExpressionTypes() const;
119 
125  void AddMisBehavingExpressionType(const std::type_info& clazz);
126 
132  void Merge(ExpressionInfo* other);
133 
140  void MergeExceptDefaultVariable(ExpressionInfo* other);
141 
142 
143 private:
144 
150  void MergeDefaultVariableAccess(ExpressionInfo* other);
151 
157  void MergeSystemPropertyAccess(ExpressionInfo* other);
158 
164  void MergeAccessedVariableNames(ExpressionInfo* other);
165 
172  void MergeAccessedPropertyNames(ExpressionInfo* other);
173 
179  void MergeMisbehavingExpressionTypes(ExpressionInfo* other);
180 
181 };
182 
183 } // namespace berry
184 
185 #endif /*BERRYEXPRESSIONINFO_H_*/