29 #include "internal/berryExpressionPlugin.h"
30 #include "internal/berryCompositeExpression.h"
32 #include "Poco/DOM/Node.h"
33 #include "Poco/DOM/Element.h"
38 ExpressionConverter* ExpressionConverter::INSTANCE =
nullptr;
43 if (INSTANCE)
return INSTANCE;
45 QList<ElementHandler::Pointer> handlers;
60 for (
int i = 0; i < fHandlers.size(); i++) {
72 for (
int i = 0; i < fHandlers.size(); i++) {
85 QList<IConfigurationElement::Pointer> children(element->GetChildren());
87 QList<IConfigurationElement::Pointer>::iterator iter;
88 for (iter = children.begin(); iter != children.end(); ++iter)
107 buf.append(configurationElement->GetName());
114 buf.append(parent2->GetName());
115 QString
id= parent2->GetAttribute(
"id");
118 buf.append(
" (id=").append(
id).append(
')');
120 parent= parent2->GetParent();
125 buf.append(parent2->GetExtensionPointUniqueIdentifier());
127 buf.append(parent2->GetContributor()->GetName());
142 Poco::XML::Node* child = element->firstChild();
143 while (child !=
nullptr) {
144 if (child->nodeType() == Poco::XML::Node::ELEMENT_NODE) {
145 Poco::XML::Element* elem =
static_cast<Poco::XML::Element*
>(child);
157 child = child->nextSibling();
static MsgHandler handler
itk::SmartPointer< Self > Pointer
void ProcessChildren(const SmartPointer< IConfigurationElement > &element, const SmartPointer< CompositeExpression > &result)
static ExpressionConverter * GetDefault()
SmartPointer< Expression > Perform(const SmartPointer< IConfigurationElement > &root)
QString GetDebugPath(const SmartPointer< IConfigurationElement > &configurationElement)
berry::SmartPointer< Self > Pointer
ExpressionConverter(const QList< SmartPointer< ElementHandler > > &handlers)
static ElementHandler::Pointer GetDefault()
SmartPointer< Other > Cast() const