Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
berryExpressionInfo.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 #ifndef BERRYEXPRESSIONINFO_H_
18 #define BERRYEXPRESSIONINFO_H_
19 
20 #include <QSet>
21 
22 #include <typeinfo>
23 
25 
26 namespace berry {
27 
40 
41 private:
42  bool fHasDefaultVariableAccess;
43  bool fHasSystemPropertyAccess;
44 
45  // Although we are using this as sets we use lists since
46  // they are faster for smaller numbers of elements
47  QSet<QString> fAccessedVariableNames;
48  QSet<QString> fMisbehavingExpressionTypes;
49  QSet<QString> fAccessedPropertyNames;
50 
51 
52 public:
53 
55 
62  bool HasDefaultVariableAccess() const;
63 
67  void MarkDefaultVariableAccessed();
68 
75  bool HasSystemPropertyAccess() const;
76 
80  void MarkSystemPropertyAccessed();
81 
87  QSet<QString> GetAccessedVariableNames() const;
88 
94  void AddVariableNameAccess(const QString& name);
95 
101  QSet<QString> GetAccessedPropertyNames() const;
102 
110  void AddAccessedPropertyName(const QString& name);
111 
122  QSet<QString> GetMisbehavingExpressionTypes() const;
123 
129  void AddMisBehavingExpressionType(const std::type_info& clazz);
130 
136  void Merge(ExpressionInfo* other);
137 
144  void MergeExceptDefaultVariable(ExpressionInfo* other);
145 
146 
147 private:
148 
154  void MergeDefaultVariableAccess(ExpressionInfo* other);
155 
161  void MergeSystemPropertyAccess(ExpressionInfo* other);
162 
168  void MergeAccessedVariableNames(ExpressionInfo* other);
169 
176  void MergeAccessedPropertyNames(ExpressionInfo* other);
177 
183  void MergeMisbehavingExpressionTypes(ExpressionInfo* other);
184 
185 };
186 
187 } // namespace berry
188 
189 #endif /*BERRYEXPRESSIONINFO_H_*/