Medical Imaging Interaction Toolkit  2025.12.02
Medical Imaging Interaction Toolkit
berryExpressionConverter.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 BERRYEXPRESSIONCONVERTER_H_
14 #define BERRYEXPRESSIONCONVERTER_H_
15 
17 
18 #include <berrySmartPointer.h>
19 
20 #include <QList>
21 
22 namespace Poco {
23 namespace XML {
24 class Element;
25 }
26 }
27 
28 namespace berry {
29 
30 struct IConfigurationElement;
31 
32 class CompositeExpression;
33 class ElementHandler;
34 class Expression;
35 
50 
51 private:
52 
53  QList<SmartPointer<ElementHandler> > fHandlers;
54 
55  static ExpressionConverter* INSTANCE;
56 
57 public:
58 
67 
79 
95 
109  SmartPointer<Expression> Perform(Poco::XML::Element* root);
110 
111 
113  const SmartPointer<CompositeExpression>& result);
114 
115  QString GetDebugPath(const SmartPointer<IConfigurationElement>& configurationElement);
116 
117  void ProcessChildren(Poco::XML::Element* element,
118  const SmartPointer<CompositeExpression>& result);
119 };
120 
121 } // namespace berry
122 
123 #endif /*BERRYEXPRESSIONCONVERTER_H_*/
ExpressionConverter(const QList< SmartPointer< ElementHandler > > &handlers)
QString GetDebugPath(const SmartPointer< IConfigurationElement > &configurationElement)
static ExpressionConverter * GetDefault()
void ProcessChildren(Poco::XML::Element *element, const SmartPointer< CompositeExpression > &result)
void ProcessChildren(const SmartPointer< IConfigurationElement > &element, const SmartPointer< CompositeExpression > &result)
SmartPointer< Expression > Perform(Poco::XML::Element *root)
SmartPointer< Expression > Perform(const SmartPointer< IConfigurationElement > &root)
Implements transparent reference counting.