-// Copyright (C) 2006-2013 CEA/DEN, EDF R&D
+// Copyright (C) 2006-2023 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
virtual void remote (ENGINE::InlineNode* const& n);
virtual void node (ENGINE::InlineNode* const& n);
virtual void forloop (ENGINE::ForLoop* const& n);
- virtual void foreach (ENGINE::ForEachLoop* const& n);
+ virtual void foreach (ENGINE::ForEachLoopGen* const& n);
virtual void optimizer (ENGINE::OptimizerLoop* const& n);
virtual void while_ (ENGINE::WhileLoop* const& n);
virtual void switch_ (ENGINE::Switch* const& n);
void casetypeParser::buildAttr(const XML_Char** attr)
{
+ if (!attr)
+ return;
this->required("id",attr);
for (int i = 0; attr[i]; i += 2)
{
std::string fullname=currentProc->names.back()+ n->getName();
currentProc->nodeMap[fullname]=n;
}
- void casetypeParser::foreach (ENGINE::ForEachLoop* const& n)
+ void casetypeParser::foreach (ENGINE::ForEachLoopGen* const& n)
{
_cnode=n;
std::string fullname=currentProc->names.back()+ n->getName();
void defaultcasetypeParser::buildAttr(const XML_Char** attr)
{
+ if (!attr)
+ return;
for (int i = 0; attr[i]; i += 2)
{
DEBTRACE( attr[i] << "=" << attr[i + 1] )
void switchtypeParser::buildAttr(const XML_Char** attr)
{
+ if (!attr)
+ return;
this->required("name",attr);
for (int i = 0; attr[i]; i += 2)
{
else if(element == "remote")pp=&remotetypeParser<>::remoteParser;
else if(element == "node")pp=&nodetypeParser<>::nodeParser;
else if(element == "forloop")pp=&forlooptypeParser<>::forloopParser;
- else if(element == "foreach")pp=&foreachlooptypeParser<>::foreachloopParser;
+ else if(element == "foreach")pp=&foreachlooptypeParser<ENGINE::ForEachLoop *>::foreachloopParser;
+ else if(element == "foreachdyn")pp=&foreachlooptypeParser<ENGINE::ForEachLoopDyn *>::foreachloopParser;
else if(element == "optimizer")pp=&optimizerlooptypeParser<>::optimizerloopParser;
else if(element == "while")pp=&whilelooptypeParser<>::whileloopParser;
else if(element == "switch")pp=&switchtypeParser::switchParser;
else if(element == "remote")remote(((remotetypeParser<>*)child)->post());
else if(element == "node")node(((nodetypeParser<>*)child)->post());
else if(element == "forloop")forloop(((forlooptypeParser<>*)child)->post());
- else if(element == "foreach")foreach(((foreachlooptypeParser<>*)child)->post());
+ else if(element == "foreach")foreach(((foreachlooptypeParser<ENGINE::ForEachLoop *>*)child)->post());
+ else if(element == "foreachdyn")foreach(((foreachlooptypeParser<ENGINE::ForEachLoopDyn *>*)child)->post());
else if(element == "optimizer")optimizer(((optimizerlooptypeParser<>*)child)->post());
else if(element == "while")while_(((whilelooptypeParser<>*)child)->post());
else if(element == "switch")switch_(((switchtypeParser*)child)->post());