38 dummyStr += oss.
str();
49 sprintf(buff,
"%d", n);
50 dummyStr += std::string(buff);
56 sprintf(buff,
"%.2f", n);
57 dummyStr += std::string(buff);
63 dummyStr = std::string(sz);
68 dummyStr = std::string(sz);
84 sprintf(buff,
"%d", n);
85 dummyStr = std::string(buff);
91 std::cout<<sstr.
str();
110 warnings.emplace_back(szWarning);
114 warnings.push_back(str);
118 addWarning(stream.str());
123 errors.emplace_back(szError);
127 errors.push_back(str);
131 addError(stream.str());
146 while((err=(
char*)getLastError()) !=
nullptr)
147 msgs += string(err) +
" ";
155 msg = warnings.back();
163 while((err=(
char*)getLastWarning()) !=
nullptr)
164 msgs += string(err) +
" ";
170 errors.clear(); warnings.clear();
174 return errors.size();
179 return warnings.size();
188 " Legend [shape=none, margin=0, label=<"
189 " <TABLE BORDER=\"0\" CELLBORDER=\"1\" CELLSPACING=\"0\" CELLPADDING=\"4\" bgcolor=\"white\">"
191 " <TD COLSPAN=\"2\"><B>Legend</B></TD>"
194 " <TD align=\"left\">Application</TD>"
195 " <TD CELLPADDING=\"4\">"
196 " <TABLE BORDER=\"1\" CELLBORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"0\">"
198 " <TD BGCOLOR=\"darkseagreen\"> </TD>"
204 " <TD align=\"left\">Module</TD>"
205 " <TD CELLPADDING=\"4\">"
206 " <TABLE BORDER=\"1\" CELLBORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"0\">"
208 " <TD BGCOLOR=\"lightslategrey\"> </TD>"
214 " <TD align=\"left\">Res. Dependency</TD>"
215 " <TD CELLPADDING=\"4\">"
216 " <TABLE BORDER=\"1\" CELLBORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"0\">"
218 " <TD BGCOLOR=\"salmon\"> </TD>"
224 " <TD align=\"left\">Res. Provider</TD>"
225 " <TD CELLPADDING=\"4\">"
226 " <TABLE BORDER=\"1\" CELLBORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"0\">"
228 " <TD BGCOLOR=\"indianred\"> </TD>"
234 " <TD align=\"left\">Input data</TD>"
235 " <TD CELLPADDING=\"4\">"
236 " <TABLE BORDER=\"1\" CELLBORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"0\">"
238 " <TD BGCOLOR=\"lightgrey\"> </TD>"
244 " <TD align=\"left\">Output data</TD>"
245 " <TD CELLPADDING=\"4\">"
246 " <TABLE BORDER=\"1\" CELLBORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"0\">"
248 " <TD BGCOLOR=\"wheat\"> </TD>"
307 if(!szFirst && !szSecond)
309 if( !szFirst || !szSecond)
312 string strFirst(szFirst);
313 string strSecond(szSecond);
314 transform(strFirst.begin(), strFirst.end(), strFirst.begin(),
315 (
int(*)(
int))toupper);
316 transform(strSecond.begin(), strSecond.end(), strSecond.begin(),
317 (
int(*)(
int))toupper);
318 if(strFirst == strSecond)
325 string::size_type pos = str.find_last_not_of(
' ');
326 if(pos != string::npos)
329 pos = str.find_first_not_of(
' ');
330 if(pos != string::npos)
333 else str.erase(str.begin(), str.end());
340 dot.open(szFileName);
344 dot<<
"digraph G {"<<endl;
345 dot<<
"rankdir=LR;"<<endl;
346 dot<<
"ranksep=0.0;"<<endl;
347 dot<<
"nodesep=0.2;"<<endl;
351 switch((*itr)->getType()) {
353 auto* mod = (
Module*)(*itr);
354 dot<<
"\""<<mod->getLabel()<<
"\"";
355 dot<<
" [label=\""<< mod->getName()<<
"\"";
356 dot<<
" shape=component, color=midnightblue, fillcolor=lightslategrey, peripheries=1, style=filled, penwidth=2];"<<endl;
357 for(
int i=0; i<mod->sucCount(); i++)
359 Link l = mod->getLinkAt(i);
361 dot<<
"\""<<mod->getLabel()<<
"\" -> ";
362 dot<<
"\""<<in->getLabel()<<
"\"";
364 dot<<
" [label=\"\"];"<<endl;
366 dot<<
" [label=\"\" style=dashed];"<<endl;
374 dot<<
"\""<<in->getLabel()<<
"\"";
375 if(in->withPriority())
377 dot<<
" [color=red, fillcolor=lightgrey, peripheries=1, style=filled";
378 dot<<
" label=\""<< in->getName()<<
"\\n"<<in->getPort()<<
"\"];"<<endl;
382 dot<<
" [color=black, fillcolor=lightgrey, peripheries=1, style=filled";
383 dot<<
" label=\""<< in->getName()<<
"\\n"<<in->getPort()<<
"\"];"<<endl;
385 for(
int i=0; i<in->sucCount(); i++)
387 Link l = in->getLinkAt(i);
389 dot<<
"\""<<in->getLabel()<<
"\" -> ";
390 dot<<
"\""<<out->getLabel()<<
"\"";
392 dot<<
" [label=\""<<l.
weight()<<
"\"];"<<endl;
394 dot<<
" [label=\""<<l.
weight()<<
"\" style=dashed];"<<endl;
401 dot<<
"\""<<out->getLabel()<<
"\"";
402 dot<<
" [color=black, fillcolor=wheat, peripheries=1, style=filled";
403 dot<<
" label=\""<< out->getName()<<
"\\n"<<out->getPort()<<
"\"];"<<endl;
404 for(
int i=0; i<out->sucCount(); i++)
406 Link l = out->getLinkAt(i);
408 dot<<
"\""<<out->getLabel()<<
"\" -> ";
409 dot<<
"\""<<mod->getLabel()<<
"\"";
410 dot<<
" [label=\"\" arrowhead=none];"<<endl;
418 dot<<
"\""<<app->getLabel()<<
"\"";
419 dot<<
" [shape=folder, color=darkgreen, fillcolor=darkseagreen, peripheries=1, style=filled, penwidth=2";
420 dot<<
" label=\""<<app->getLabel()<<
"\""<<
"];"<<endl;
421 for(
int i=0; i<app->sucCount(); i++)
423 Link l = app->getLinkAt(i);
425 dot<<
"\""<<app->getLabel()<<
"\" -> ";
426 dot<<
"\""<<mod->getLabel()<<
"\"";
428 dot<<
" [label=\"\"];"<<endl;
430 dot<<
" [label=\"\" style=dashed];"<<endl;
437 dot<<
"\""<<res->getLabel()<<
"\"";
439 dot<<
" [shape=rect, color=black, fillcolor=salmon, peripheries=1, style=filled ";
441 dot<<
" [shape=house, color=maroon, fillcolor=indianred, peripheries=1, style=filled, penwidth=2";
442 dot<<
" label=\""<<res->getName()<<
"\""<<
"];"<<endl;
443 for(
int i=0; i<res->sucCount(); i++)
445 Link l = res->getLinkAt(i);
447 dot<<
"\""<<res->getLabel()<<
"\" -> ";
449 dot<<
" [label=\""<<l.
weight()<<
"\"];"<<endl;