Salome HOME
Traces
[modules/superv.git] / src / GraphEditor / DataFlowEditor_OutNode.hxx
index 0daf9307901bb339675d36315ea98489abd40182..cf560f07972fb939086d77e5b4b460f76cf77926 100644 (file)
@@ -50,7 +50,7 @@ namespace GraphEditor {
 
       CORBA::ORB_ptr _Orb;
 
-      bool Valid() ;
+      bool Valid(bool kLoopSwitch = true ) ;
       bool Executable() ;
 
       bool LoadNodes( map< string , int > & aMapOfNodes ,
@@ -170,9 +170,15 @@ namespace GraphEditor {
            return _Graph->RemoveNode( NodeName ) ; } ;
       bool ReNameNode( const char* OldNodeName ,
                        const char* NewNodeName ) {
-           DateModification() ;
-           _Valid = false ;
-           return _Graph->ReNameNode( OldNodeName , NewNodeName ) ; } ;
+//PAL9048 JR Debug : a node may not have the same name as the graph
+           if ( strcmp( Graph()->Name() , NewNodeName ) ) {
+             DateModification() ;
+             _Valid = false ;
+             return _Graph->ReNameNode( OldNodeName , NewNodeName ) ;
+          }
+           cdebug << "Editor::OutNode::ReNameNode ERROR "  << NewNodeName << " already exists"
+                  << endl ;
+           return false ; } ;
 
       void Coordinates( const int X , const int Y ) {
            return _Graph->Coordinates( X , Y ) ; } ;
@@ -272,9 +278,9 @@ namespace GraphEditor {
                          const int index , long &X , long &Y ) ;
 
 
-      bool IsValid() {
+      bool IsValid(bool kLoopSwitch = true ) {
            if ( !_Valid )
-             Valid() ;
+             Valid( kLoopSwitch ) ;
            return _Valid ; } ;
       bool IsNotValid() const {
            return !_Valid ; } ;
@@ -302,10 +308,12 @@ namespace GraphEditor {
       // in-port of type "InPortType".  Called from IsLinksCompatible() and Link_Impl::IsValid().
       bool IsCompatible( const char* OutPortType, const char* InPortType ) const;
 
-      const CORBA::Any *GetInData( const char *ToNodeName ,
-                                   const char *ToParameterName ) ;
-      const CORBA::Any *GetOutData( const char *FromNodeName ,
-                                    const char *FromParameterName ) ;
+//JR 30.03.2005      const CORBA::Any *GetInData( const char *ToNodeName ,
+      const CORBA::Any GetInData( const char *ToNodeName ,
+                                  const char *ToParameterName ) ;
+//JR 30.03.2005      const CORBA::Any *GetOutData( const char *FromNodeName ,
+      const CORBA::Any GetOutData( const char *FromNodeName ,
+                                   const char *FromParameterName ) ;
   } ;
 
 };