Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
berryElementHandler.cpp
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 #include "berryElementHandler.h"
18 
19 #include "internal/berryStandardElementHandler.h"
20 
21 #include "berryExpression.h"
22 #include "internal/berryCompositeExpression.h"
24 
26 
27 #include "Poco/Exception.h"
28 
29 namespace berry {
30 
32 {
33 }
34 
37 {
38  static ElementHandler::Pointer instance(new StandardElementHandler());
39  return instance;
40 }
41 
42 
44 ElementHandler::Create(ExpressionConverter* /*converter*/, Poco::XML::Element* /*element*/)
45 {
46  throw Poco::NotImplementedException();
47 }
48 
49 void
51 {
52  converter->ProcessChildren(element, expression);
53 }
54 
55 void
56 ElementHandler::ProcessChildren(ExpressionConverter* converter, Poco::XML::Element* element, CompositeExpression::Pointer expression)
57 {
58  converter->ProcessChildren(element, expression);
59 }
60 
61 } // namespace berry
itk::SmartPointer< Self > Pointer
void ProcessChildren(const SmartPointer< IConfigurationElement > &element, const SmartPointer< CompositeExpression > &result)
virtual SmartPointer< Expression > Create(ExpressionConverter *converter, SmartPointer< IConfigurationElement > config)=0
static ElementHandler::Pointer GetDefault()
virtual void ProcessChildren(ExpressionConverter *converter, SmartPointer< IConfigurationElement > element, SmartPointer< CompositeExpression > expression)