9#include <Poco/DOM/Element.h>
10#include <Poco/DOM/NodeList.h>
14std::shared_ptr<ImplicitFunctionParameterParser>
17 throw std::runtime_error(
"Use of create in this context is forbidden. Use "
18 "createUnwrappedInstead.");
23 Poco::XML::Element *parametersElement)
const {
24 if (parametersElement->localName() !=
"ParameterList") {
25 throw std::runtime_error(
"Expected passed element to be ParameterList.");
27 Poco::AutoPtr<Poco::XML::NodeList> parameters = parametersElement->getElementsByTagName(
"Parameter");
30 for (
unsigned long i = 0; i < parameters->length(); i++) {
31 auto *parameter =
dynamic_cast<Poco::XML::Element *
>(parameters->item(i));
32 std::string paramParserName =
33 parameter->getChildElement(
"Type")->innerText() +
"Parser";
35 if (paramParser !=
nullptr) {
38 paramParser = childParamParser;
40 nextParser = childParamParser;
#define UNUSED_ARG(x)
Function arguments are sometimes unused in certain implmentations but are required for documentation ...
ImplicitFunctionParameterParser * createImplicitFunctionParameterParserFromXML(Poco::XML::Element *parametersElement) const
std::shared_ptr< ImplicitFunctionParameterParser > create(const std::string &xmlString) const override
Creates a new instance of the class with the given name.
virtual void setSuccessorParser(ImplicitFunctionParameterParser *paramParser)=0
virtual ImplicitFunctionParameterParser * createUnwrapped(const std::string &className) const
Creates a new instance of the class with the given name, which is not wrapped in a boost shared_ptr.