With recent gcc versions, the previous commit does not compile...
std::string ForEachLoop::getProgress() const
{
int nbElems = _splitterNode.getNumberOfElements();
std::string ForEachLoop::getProgress() const
{
int nbElems = _splitterNode.getNumberOfElements();
- char* aProgress = new char[];
+ std::stringstream aProgress;
- sprintf(aProgress, "%i/%i", _currentIndex, nbElems);
+ aProgress << _currentIndex << "/" << nbElems;
- sprintf(aProgress, "0");
- return aProgress;
+ aProgress << "0";
+ return aProgress.str();
std::string ForLoop::getProgress() const
{
std::string ForLoop::getProgress() const
{
- char* aProgress = new char[];
- sprintf(aProgress, "0");
+ std::stringstream aProgress;
+ aProgress << "0";
AnyInputPort* aNbStepsPort = (AnyInputPort*)&_nbOfTimesPort;
if (aNbStepsPort && !aNbStepsPort->isEmpty()) {
int nbSteps = aNbStepsPort->getIntValue();
if (nbSteps > 0 && _nbOfTurns >= 0) {
AnyInputPort* aNbStepsPort = (AnyInputPort*)&_nbOfTimesPort;
if (aNbStepsPort && !aNbStepsPort->isEmpty()) {
int nbSteps = aNbStepsPort->getIntValue();
if (nbSteps > 0 && _nbOfTurns >= 0) {
- sprintf(aProgress, "%i/%i", _nbOfTurns, nbSteps);
+ aProgress.clear();
+ aProgress << _nbOfTurns << "/" << nbSteps;
+ return aProgress.str();
virtual const Proc * getProc() const;
YACS::StatesForNode getNodeState(int numId);
virtual const Proc * getProc() const;
YACS::StatesForNode getNodeState(int numId);
- std::string Proc::getNodeProgress(int numId);
+ std::string getNodeProgress(int numId);
std::string getInPortValue(int nodeNumId, std::string portName);
std::string setInPortValue(std::string nodeName, std::string portName, std::string value);
std::string getOutPortValue(int nodeNumId, std::string portName);
std::string getInPortValue(int nodeNumId, std::string portName);
std::string setInPortValue(std::string nodeName, std::string portName, std::string value);
std::string getOutPortValue(int nodeNumId, std::string portName);