static string protectQuotes (const string theText)
{
string aRes (theText);
- for (unsigned int pos = 0; pos < aRes.size(); pos+=2) {
+ unsigned int pos;
+
+ // screen back slash
+ for (pos = 0; pos < aRes.size(); pos++) {
+ pos = aRes.find("\\", pos);
+ if (pos < 0 || pos > aRes.size()) break;
+
+ aRes.insert(pos, "\\");
+ pos++;
+
+ // screen symbol after back slash (except single quote, which will be processed below)
+ if (pos + 1 < aRes.size() && aRes[pos + 1] != '\'') {
+ aRes.insert(pos + 1, "\\");
+ pos += 2;
+ }
+ }
+
+ // screen single quote
+ for (pos = 0; pos < aRes.size(); pos++) {
pos = aRes.find("'", pos);
if (pos < 0 || pos > aRes.size()) break;
- aRes.replace(pos, 1, "\\\'");
+
+ aRes.insert(pos, "\\");
+ pos++;
}
+
return aRes;
}
_FirstCreation.Hour = _LastModification.Hour = Tm->tm_hour;
_FirstCreation.Day = _LastModification.Day = Tm->tm_mday;
_FirstCreation.Month = _LastModification.Month = Tm->tm_mon + 1;
- _FirstCreation.Year = _LastModification.Year = Tm->tm_year + 1900;
+ _FirstCreation.Year = _LastModification.Year = Tm->tm_year + 1900;
_EditorRelease = new char[ strlen( SuperVision_Version ) + 1 ] ;
strcpy( _EditorRelease , SuperVision_Version ) ;
// cout << "GraphBase::ComputingNode::ComputingNode NO SetDebug" << endl ;
// }
DefPortsOfNode( ORB , SALOME_ModuleCatalog::Service() , NamePtr() , Kind() , Graph_prof_debug , Graph_fdebug ) ;
- cdebug << "GraphBase::ComputingNode::ComputingNode " << this
+ cdebug << "GraphBase::ComputingNode::ComputingNode " << this
<< " Name '" << Name() << "' " << _FirstCreation
<< " " << _LastModification << endl ;
}
_FirstCreation.Hour = _LastModification.Hour = Tm->tm_hour;
_FirstCreation.Day = _LastModification.Day = Tm->tm_mday;
_FirstCreation.Month = _LastModification.Month = Tm->tm_mon + 1;
- _FirstCreation.Year = _LastModification.Year = Tm->tm_year + 1900;
+ _FirstCreation.Year = _LastModification.Year = Tm->tm_year + 1900;
if ( NodeEditorRelease != NULLSTRING ) {
_EditorRelease = new char[ strlen( NodeEditorRelease ) + 1 ] ;
DefPortsOfNode( ORB , aService , NamePtr() , Kind() , Graph_prof_debug , Graph_fdebug ) ;
- cdebug << "GraphBase::ComputingNode::ComputingNode " << this
+ cdebug << "GraphBase::ComputingNode::ComputingNode " << this
<< " Name '" << Name()
<< "' KindOfNode " << Kind()
<< " ServiceName '" << ServiceName() << "' In(" << ServiceInParameter().length()
}
GraphBase::ComputingNode::~ComputingNode() {
- cdebug << "GraphBase::ComputingNode::~ComputingNode " << this
+ cdebug << "GraphBase::ComputingNode::~ComputingNode " << this
<< " Name() "<< Name() << " _Comment "
<< (void *) _Comment << " " << _Comment << " " << endl ;
}
SUPERV::SDate GraphBase::ComputingNode::FirstCreation () const {
// cdebug << "GraphBase::ComputingNode::FirstCreation "
-// << " Name '" << Name() << "' " << _FirstCreation << " "
+// << " Name '" << Name() << "' " << _FirstCreation << " "
// << _LastModification << endl ;
return _FirstCreation;
}
bool GraphBase::ComputingNode::IsLinked(const char * ToServiceParameterName, bool isInput ) {
bool RetVal = false ;
if ( isInput ) { // mkr : PAL8060
- // we have to know the type of the port, because of input and output ports
+ // we have to know the type of the port, because of input and output ports
// belong to one node may have the same names
const GraphBase::InPort * thePort = GetInPort( ToServiceParameterName ) ;
if ( thePort ) {
<< LinkedFromNodesSize() << " ERROR false" << endl;
return false ;
}
-// We have to check that all nodes linked from that node go to the beginning of LoopNode :
+// We have to check that all nodes linked from that node go to the beginning of LoopNode :
for ( i = 0 ; i < LinkedFromNodesSize() ; i++ ) {
GraphBase::ComputingNode * aNode = (GraphBase::ComputingNode * ) LinkedFromNodes( i ) ;
cdebug << i << ". " << Name() << " Linked from " << aNode->Name() << endl ;
cdebug << "SaveXML NumberOfValues " << ((GraphBase::OutDataStreamPort * ) anOutPort)->NumberOfValues() << endl ;
}
}
-// f << Tabs << "</Parameter-list>" << endl ;
+// f << Tabs << "</Parameter-list>" << endl ;
// f << Tabs << "<PyFunction-list>" << endl ;
QDomElement PyFunctionlist = Graph.createElement("PyFunction-list") ;
// cdebug_out << "operator<< GraphEditor::Date" << endl;
return fOut;
}
-