From 2a1b59244c9675f5dd972d45158adf4246b9b353 Mon Sep 17 00:00:00 2001 From: rahuel Date: Wed, 19 May 2004 12:46:03 +0000 Subject: [PATCH 1/1] Some calls to UnValid() was missing in case of editing of StreamGraphs, StreamLinks and StreamPorts. --- src/Supervision/CNode_Impl.cxx | 4 +++- src/Supervision/INode_Impl.cxx | 2 +- src/Supervision/Link_Impl.cxx | 3 +++ src/Supervision/StreamGraph_Impl.cxx | 5 ++++- src/Supervision/StreamLink_Impl.cxx | 3 +++ src/Supervision/StreamPort_Impl.cxx | 5 ++--- 6 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/Supervision/CNode_Impl.cxx b/src/Supervision/CNode_Impl.cxx index 2ee0419..452dff0 100644 --- a/src/Supervision/CNode_Impl.cxx +++ b/src/Supervision/CNode_Impl.cxx @@ -179,7 +179,7 @@ bool CNode_Impl::Delete() { if ( _DataFlowEditor->IsEditing() ) { RetVal = _DataFlowEditor->RemoveNode( Name() ) ; if ( RetVal ) { - RetVal = _DataFlowEditor->IsValid() ; + RetVal = _DataFlowEditor->UnValid() ; } } endService( "CNode_Impl::Delete" ); @@ -594,6 +594,7 @@ SUPERV::Port_ptr CNode_Impl::Port( const char * ServiceParameterName ) { if ( !begin ) { endService( "CNode_Impl::Port" ); } + DataFlowEditor()->UnValid() ; return SUPERV::Port::_duplicate( iobject ) ; } @@ -687,6 +688,7 @@ SUPERV::Port_ptr CNode_Impl::Input( const char * ToServiceParameterName , MESSAGE( "CNode_Impl::Input returns nil object _IsNode " << _IsNode << " sts " << sts << " anInPort " << anInPort ) ; } + DataFlowEditor()->UnValid() ; return SUPERV::Port::_duplicate( iobject ) ; } diff --git a/src/Supervision/INode_Impl.cxx b/src/Supervision/INode_Impl.cxx index 9bda5bf..cd5e83e 100644 --- a/src/Supervision/INode_Impl.cxx +++ b/src/Supervision/INode_Impl.cxx @@ -144,7 +144,7 @@ bool INode_Impl::Delete() { if ( DataFlowEditor()->IsEditing() ) { RetVal = DataFlowEditor()->RemoveNode( Name() ) ; if ( RetVal ) - RetVal = DataFlowEditor()->IsValid() ; + RetVal = DataFlowEditor()->UnValid() ; } // endService( "INode_Impl::Delete" ); return RetVal ; diff --git a/src/Supervision/Link_Impl.cxx b/src/Supervision/Link_Impl.cxx index 073d12f..9f9cb48 100644 --- a/src/Supervision/Link_Impl.cxx +++ b/src/Supervision/Link_Impl.cxx @@ -114,6 +114,9 @@ bool Link_Impl::Delete() { _OutputParameterName , _DataFlowNode->Name() , _InputParameterName ) ; + if ( RetVal ) { + DataFlowEditor()->UnValid() ; + } // endService( "Link_Impl::Delete" ); return RetVal ; } diff --git a/src/Supervision/StreamGraph_Impl.cxx b/src/Supervision/StreamGraph_Impl.cxx index 351f3a6..0319e26 100644 --- a/src/Supervision/StreamGraph_Impl.cxx +++ b/src/Supervision/StreamGraph_Impl.cxx @@ -111,6 +111,7 @@ SUPERV::StreamLink_ptr StreamGraph_Impl::StreamLink( SUPERV::StreamPort_ptr Out CORBA::Object_var obj = _poa->id_to_reference(*id); iobject = SUPERV::StreamLink::_narrow(obj) ; anOutPort->AddInPortObjRef( anInPort , SUPERV::StreamLink::_duplicate(iobject) ) ; + DataFlowEditor()->UnValid() ; } } } @@ -322,7 +323,9 @@ bool StreamGraph_Impl::SetStreamParams( const long Timeout , const SUPERV::KindOfDataStreamTrace DataStreamTrace , const double DeltaTime ) { bool sts = DataFlowEditor()->StreamGraph()->SetStreamParams( Timeout , DataStreamTrace , DeltaTime ) ; - DataFlowEditor()->UnValid() ; + if ( sts ) { + DataFlowEditor()->UnValid() ; + } return sts ; } diff --git a/src/Supervision/StreamLink_Impl.cxx b/src/Supervision/StreamLink_Impl.cxx index 6b5f385..b68f0e8 100644 --- a/src/Supervision/StreamLink_Impl.cxx +++ b/src/Supervision/StreamLink_Impl.cxx @@ -96,6 +96,9 @@ bool StreamLink_Impl::Delete() { OutputParameterName() , DataFlowNode()->Name() , InputParameterName() ) ; + if ( RetVal ) { + DataFlowEditor()->UnValid() ; + } // endService( "StreamLink_Impl::Delete" ); return RetVal ; } diff --git a/src/Supervision/StreamPort_Impl.cxx b/src/Supervision/StreamPort_Impl.cxx index 3754ec4..759a0cd 100644 --- a/src/Supervision/StreamPort_Impl.cxx +++ b/src/Supervision/StreamPort_Impl.cxx @@ -160,7 +160,6 @@ SUPERV::StreamLink_ptr StreamPort_Impl::StreamLink() { << iobject->InPort()->Node()->Name() << "( " << iobject->InPort()->Name() << " ) " ) ; endService( "StreamPort_Impl::StreamLink" ) ; } - DataFlowEditor()->UnValid() ; return SUPERV::StreamLink::_duplicate( iobject ) ; } @@ -189,6 +188,7 @@ bool StreamPort_Impl::SetParams( const SUPERV::KindOfSchema aKindOfSchema , if ( RetVal ) { MESSAGE( "OutStreamPort_Impl::SetParams( " << aKindOfSchema << " , " << aKindOfInterpolation << " , " << aKindOfExtrapolation << " ) SUCCESS " ) ; + DataFlowEditor()->UnValid() ; } else { MESSAGE( "OutStreamPort_Impl::SetParams( " << aKindOfSchema << " , " << aKindOfInterpolation @@ -199,7 +199,6 @@ bool StreamPort_Impl::SetParams( const SUPERV::KindOfSchema aKindOfSchema , MESSAGE( "OutStreamPort_Impl::SetParams( " << aKindOfSchema << " , " << aKindOfInterpolation << " , " << aKindOfExtrapolation << " ) ERROR : OutPort" ) ; } - DataFlowEditor()->UnValid() ; // endService( "StreamPort_Impl::SetParams" ); return RetVal ; } @@ -232,12 +231,12 @@ bool StreamPort_Impl::SetNumberOfValues( const long aNumberOfValues ) { if ( !IsInput() ) { GraphBase::OutDataStreamPort * anOutStreamPort = (GraphBase::OutDataStreamPort * ) DataFlowPort() ; anOutStreamPort->NumberOfValues( aNumberOfValues ) ; + DataFlowEditor()->UnValid() ; RetVal = true ; } else { MESSAGE( "OutStreamPort_Impl::SetNumberOfValues( " << aNumberOfValues << " ) ERROR : InPort" ) ; } - DataFlowEditor()->UnValid() ; // endService( "StreamPort_Impl::SetNumberOfValues" ); return RetVal ; } -- 2.30.2