26 using namespace YACS::ENGINE;
32 LinkInfo::LinkInfo(
unsigned char level):_levelOfInfo(level),_level(0)
73 _infos[reason].push_back(pair<OutPort *, InPort *>(semStart,end));
79 _collapse[reason].push_back(vector< pair<OutPort *,InPort *> >());
81 if(
_collapse[reason].back()[0].second!=end)
82 _collapse[reason].push_back(vector< pair<OutPort *,InPort *> >());
83 _collapse[reason].back().push_back(pair<OutPort *,InPort *>(semStart,end));
89 _unsetInPort.push_back(end);
91 _onlyBackDefined.push_back(end);
93 _errors[reason].push_back(pair<OutPort *, InPort *>(semStart,end));
95 if(_levelOfInfo==ALL_STOP_ASAP || _levelOfInfo==WARN_ONLY_DONT_STOP)
101 _errorsOnSwitchCases.push_back(collector);
103 if(_levelOfInfo==ALL_STOP_ASAP || _levelOfInfo==WARN_ONLY_DONT_STOP)
126 retS <<
"****** ERRORS ******" << endl;
131 retS <<
"****** WARNINGS ******" << endl;
136 retS <<
"****** INFO ******" << endl;
144 map<InfoReason, vector< pair<OutPort *,InPort *> > >::const_iterator iter;
145 ostringstream stream;
148 for(vector< pair<OutPort *,InPort *> >::const_iterator iter2=(*iter).second.begin();iter2!=(*iter).second.end();iter2++)
154 set< pair<Node *, Node *> >::const_iterator iter3;
157 stream <<
"Useless CF link between \"" <<
_pov->
getChildName((*iter3).first);
158 stream <<
"\" and \"" <<
_pov->
getChildName((*iter3).second) <<
"\"." << endl;
165 map<WarnReason, vector< vector< pair<OutPort *,InPort *> > > >::const_iterator iter;
166 ostringstream stream;
170 stream <<
getStringReprOfW((*iter).first) <<
" for group containing following group links: ";
171 vector< vector< pair<OutPort *,InPort *> > >::const_iterator iter2=(*iter).second.begin();
172 for(;iter2!=(*iter).second.end();iter2++)
174 stream <<
" Group # " << i++ <<
" : " << endl;
175 for(vector< pair<OutPort *,InPort *> >::const_iterator iter3=(*iter2).begin();iter3!=(*iter2).end();iter3++)
184 vector<InPort *>::const_iterator iter;
185 ostringstream stream;
190 map<ErrReason, vector< pair<OutPort *,InPort *> > >::const_iterator iter2;
192 for(vector< pair<OutPort *,InPort *> >::const_iterator iter3=(*iter2).second.begin();iter3!=(*iter2).second.end();iter3++)
195 (*iter3)->getHumanReprOfIncompleteCases(stream);
211 map<InfoReason, vector< pair<OutPort *,InPort *> > >::const_iterator iter=
_infos.begin();
213 for(;iter!=
_infos.end();iter++)
214 val+=(*iter).second.size();
221 map<InfoReason, vector< pair<OutPort *,InPort *> > >::const_iterator iter=
_infos.find(reason);
223 return (*iter).second.size();
232 map<WarnReason, vector< vector< pair<OutPort *,InPort *> > > >::const_iterator iter;
236 ret+=(*iter).second.size();
239 map<WarnReason, vector< vector< pair<OutPort *,InPort *> > > >::const_iterator iter2=
_collapse.find(reason);
241 return (*iter2).second.size();
258 map<ErrReason, vector< pair<OutPort *,InPort *> > >::const_iterator iter=
_errors.find(reason);
260 return (*iter).second.size();
274 return pair<OutPort *, InPort *>();
275 map<InfoReason, vector< pair<OutPort *,InPort *> > >::const_iterator iter=
_infos.find(reason);
277 return (*iter).second[
id];
279 return pair<OutPort *, InPort *>( reinterpret_cast<OutPort *>(0),
reinterpret_cast<InPort *
>(0) );
284 map<WarnReason, vector< vector< pair<OutPort *,InPort *> > > >::const_iterator iter=
_collapse.find(reason);
286 return (*iter).second[
id];
288 return vector< pair<OutPort *, InPort *> >();
299 map<ErrReason, vector< pair<OutPort *,InPort *> > >::const_iterator iter=
_errors.find(reason);
301 return (*iter).second[
id];
303 return pair<OutPort *, InPort *>( reinterpret_cast<OutPort *>(0),
reinterpret_cast<InPort *
>(0) );
319 ret=
"Back and useless";
340 ret=
"Collapse and useless";
343 ret=
"Collapse on ElementaryNode";
346 ret+=
"Collapse on ElementaryNode and useless";
349 ret+=
"Back collapse";
352 ret+=
"Back collapse and useless";
355 ret+=
"Back collapse on ElementaryNode";
358 ret+=
"Back collapse and useless on ElementaryNode";
368 return "Never set InPort ";
370 return "Never set InPort only back defined ";
374 ret=
"DS unestablishable";
377 ret=
"DF/DS collapse";
380 ret=
"Inter DS collapse";
383 ret=
"Unpredictable fed";
398 ret <<
"are " << val;