20 #ifndef _BLOCPARSER_HXX_
21 #define _BLOCPARSER_HXX_
59 template <
class T=YACS::ENGINE::Bloc*>
93 for (
int i = 0; attr[
i];
i += 2)
95 if(std::string(attr[
i]) ==
"name")
name(attr[
i+1]);
96 if(std::string(attr[
i]) ==
"state")
state(attr[
i+1]);
108 _bloc->exDisabledState();
118 DEBTRACE(
"bloc_pynode_set: " <<
n->getName() )
126 DEBTRACE(
"bloc_sinline: " <<
n->getName() )
134 DEBTRACE(
"bloc_service_set: " <<
n->getName() )
142 DEBTRACE(
"bloc_remote_set: " <<
n->getName() )
150 DEBTRACE(
"bloc_server_set: " <<
n->getName() )
158 DEBTRACE(
"bloc_node_set: " <<
n->getName() )
161 DEBTRACE(
"bloc_node_set fullname = " << fullname )
167 DEBTRACE(
"bloc_forloop_set: " <<
b->getName() )
174 DEBTRACE(
"bloc_optimizer_set: " <<
b->getName() );
183 DEBTRACE(
"bloc_foreach_set: " <<
b->getName() )
187 fullname +=
".splitter";
192 DEBTRACE(
"bloc_while_set: " <<
b->getName() )
199 DEBTRACE(
"bloc_switch_set: " <<
b->getName() )
206 DEBTRACE(
"bloc_bloc_set: " <<
b->getName() )
213 DEBTRACE(
"bloc_control_set: " <<
l.fromnode() <<
" "<<
l.tonode() )
218 msg=
"from node " +
l.fromnode() +
" does not exist in control link: ";
219 msg=msg+
l.fromnode()+
"->"+
l.tonode();
226 msg=
"to node " +
l.tonode() +
" does not exist in control link: ";
227 msg=msg+
l.fromnode()+
"->"+
l.tonode();
245 DEBTRACE(
"bloc_datalink_set: "<<
l.fromnode()<<
"("<<
l.fromport()<<
")->"<<
l.tonode()<<
"("<<
l.toport()<<
")")
252 msg=
"from node " +
l.fromnode() +
" does not exist in data link: ";
253 msg=msg+
l.fromnode()+
"("+
l.fromport()+
")->"+
l.tonode()+
"("+
l.toport()+
")";
266 msg=
"to node " +
l.tonode() +
" does not exist in data link: ";
267 msg=msg+
l.fromnode()+
"("+
l.fromport()+
")->"+
l.tonode()+
"("+
l.toport()+
")";
273 DEBTRACE(fromname <<
":"<<
l.fromport()<<toname<<
":"<<
l.toport());
290 DEBTRACE(
"bloc_stream_set: " <<
l.fromnode() <<
l.fromport() <<
l.tonode() <<
l.toport() )
297 msg=
"from node " +
l.fromnode() +
" does not exist in stream link: ";
298 msg=msg+
l.fromnode()+
"("+
l.fromport()+
")->"+
l.tonode()+
"("+
l.toport()+
")";
304 msg=
"to node " +
l.tonode() +
" does not exist in stream link: ";
305 msg=msg+
l.fromnode()+
"("+
l.fromport()+
")->"+
l.tonode()+
"("+
l.toport()+
")";
311 _bloc->edAddLink(pout,pin);
313 std::map<std::string, std::string>::const_iterator pt;
314 for(pt=
l._props.begin();pt!=
l._props.end();pt++)
322 DEBTRACE(
"++++++++++++++++++++Parameter+++++++++++++++++++++" );
327 msg=
"to node " + param.
_tonode +
" does not exist in parameter: ";
343 DEBTRACE(
"++++++++++++++++++++End parameter+++++++++++++++++++++" );
364 std::vector<YACS::ENGINE::Bloc *>
_blocs;
372 DEBTRACE(
"bloc_preset_set: " <<
n->getName() );
373 _bloc->edAddChild(
n);
381 DEBTRACE(
"bloc_outnode: " <<
n->getName() );
382 _bloc->edAddChild(
n);
393 _blocs.push_back(_bloc);
410 DEBTRACE(
"bloctypeParser::onStart: " << el )
411 std::string element(el);
438 this->SetUserDataAndPush(pp);
447 DEBTRACE(
"bloctypeParser::onEnd: " << el )
448 std::string element(el);
468 else if(element ==
"datalink") datalink(((
linktypeParser<>*)child)->post());
YACS::ENGINE::Runtime * theRuntime
YACS::ENGINE::Proc * currentProc
Composed node to group elementary and composed nodes.
Class for data parameters specification.
virtual void setProperty(const std::string &name, const std::string &value)
Set a new value for a property of the port.
Class for calculation node (script) inlined (and executed) in the schema.
class to build optimization loops
Base class for all schema objects.
std::map< std::string, InlineNode * > inlineMap
std::map< std::string, ServiceNode * > serviceMap
std::map< std::string, Node * > nodeMap
std::vector< std::string > names
virtual Bloc * createBloc(const std::string &name)
Class for calculation node associated with a component service.
Control node that emulates the C switch.
const char * what(void) const noexcept
virtual void outnode(ENGINE::DataNode *const &n)
virtual void optimizer(YACS::ENGINE::OptimizerLoop *const &b)
virtual void while_(YACS::ENGINE::WhileLoop *const &b)
virtual void remote(YACS::ENGINE::InlineNode *const &n)
virtual void server(YACS::ENGINE::ServerNode *const &n)
virtual void onEnd(const char *el, parser *child)
void name(const std::string &name)
std::vector< YACS::ENGINE::Bloc * > _blocs
virtual void sinline(YACS::ENGINE::ServiceInlineNode *const &n)
virtual void datalink(const mylink &l)
virtual void service(YACS::ENGINE::ServiceNode *const &n)
virtual void property(const myprop &prop)
virtual void node(YACS::ENGINE::InlineNode *const &n)
virtual void switch_(YACS::ENGINE::Switch *const &b)
virtual void parameter(const myparam ¶m)
static bloctypeParser< T > blocParser
virtual void control(const mycontrol &l)
virtual void forloop(YACS::ENGINE::ForLoop *const &b)
virtual void inline_(YACS::ENGINE::InlineNode *const &n)
virtual void preset(ENGINE::DataNode *const &n)
virtual void bloc(YACS::ENGINE::Bloc *const &b)
virtual void buildAttr(const XML_Char **attr)
virtual void onStart(const XML_Char *el, const XML_Char **attr)
virtual void state(const std::string &name)
virtual void stream(const mystream &l)
Class for OutNode parser.
static parametertypeParser parameterParser
virtual void required(const std::string &name, const XML_Char **attr)
virtual void buildAttr(const XML_Char **attr)
static parser main_parser
std::map< std::string, int > _orders
void logError(const std::string &reason)
Class for PresetNode parser.
Class for property parser.
static propertytypeParser propertyParser
Class for parsing ServiceInlineNode description.
static switchtypeParser switchParser