Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
berryExpressionConverter.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 BERRYEXPRESSIONCONVERTER_H_
18 #define BERRYEXPRESSIONCONVERTER_H_
19 
21 
22 #include <berrySmartPointer.h>
23 
24 #include <QList>
25 
26 namespace Poco {
27 namespace XML {
28 class Element;
29 }
30 }
31 
32 namespace berry {
33 
34 struct IConfigurationElement;
35 
36 class CompositeExpression;
37 class ElementHandler;
38 class Expression;
39 
54 
55 private:
56 
57  QList<SmartPointer<ElementHandler> > fHandlers;
58 
59  static ExpressionConverter* INSTANCE;
60 
61 public:
62 
70  static ExpressionConverter* GetDefault();
71 
82  ExpressionConverter(const QList<SmartPointer<ElementHandler> >& handlers);
83 
99 
113  SmartPointer<Expression> Perform(Poco::XML::Element* root);
114 
115 
116  void ProcessChildren(const SmartPointer<IConfigurationElement>& element,
117  const SmartPointer<CompositeExpression>& result);
118 
119  QString GetDebugPath(const SmartPointer<IConfigurationElement>& configurationElement);
120 
121  void ProcessChildren(Poco::XML::Element* element,
122  const SmartPointer<CompositeExpression>& result);
123 };
124 
125 } // namespace berry
126 
127 #endif /*BERRYEXPRESSIONCONVERTER_H_*/
Implements transparent reference counting.