PortableServer::ObjectId * contId ,
const char *instanceName ,
const char *interfaceName ,
- const char *aDataFlowName ) :
+ const char *aDataFlowName ,
+ const SUPERV::KindOfNode aKindOfNode ) :
Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) {
// MESSAGE("CNode_Impl::CNode_Impl activate object instanceName("
// << instanceName << ") interfaceName(" << interfaceName << ") --> "
// _thisObj = this ;
// _id = _poa->activate_object(_thisObj);
// MESSAGE( "CNode_Impl::CNode_Impl " << aDataFlowName << " " );
- beginService( "CNode_Impl::CNode_Impl" );
+// beginService( "CNode_Impl::CNode_Impl" );
_Orb = CORBA::ORB::_duplicate(orb);
_Poa = poa ;
_ContId = contId ;
+ _DataFlowEditor = NULL ;
_DataFlowNode = NULL ;
- _IsNode = false ;
- endService( "CNode_Impl::CNode_Impl" );
+ if ( aKindOfNode == SUPERV::MacroNode ) {
+ _IsNode = true ;
+ }
+ else {
+ _IsNode = false ;
+ }
+// endService( "CNode_Impl::CNode_Impl" );
}
CNode_Impl::CNode_Impl() {
PortableServer::ObjectId * contId ,
const char *instanceName ,
const char *interfaceName ,
- GraphEditor::DataFlow * DataFlowEditor ,
+ GraphEditor::DataFlow * aDataFlowEditor ,
const SALOME_ModuleCatalog::Service &NodeService ,
const char * NodeName ,
const SUPERV::KindOfNode NodeKindOfNode ,
const char * FuncName ,
const SUPERV::ListOfStrings & PythonFunction ) :
Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) {
- beginService( "CNode_Impl::CNode_Impl" );
+// beginService( "CNode_Impl::CNode_Impl" );
// cout << "CNode_Impl::CNode_Impl -->" << endl ;
// if ( FuncName && NodeName ) {
// cout << "CNode_Impl::CNode_Impl " << (void *) NodeName << " " << NodeName
// << " " << strlen( FuncName ) << endl ;
// }
if ( NodeKindOfNode == SUPERV::ComputingNode ) {
- MESSAGE( "CNode_Impl::CNode_Impl " << FuncName << " _poa->activate_object" );
+// MESSAGE( "CNode_Impl::CNode_Impl " << FuncName << " _poa->activate_object" );
_thisObj = this ;
_id = _poa->activate_object(_thisObj);
}
_Orb = CORBA::ORB::_duplicate(orb);
_Poa = poa ;
_ContId = contId ;
- _DataFlowEditor = DataFlowEditor ;
+ _DataFlowEditor = aDataFlowEditor ;
+ DataFlowEditor()->Graph()->GraphEditor( aDataFlowEditor ) ;
GraphBase::ListOfFuncName aFuncName ;
GraphBase::ListOfPythonFunctions aPythonFunction ;
if ( FuncName ) {
aPythonFunction.resize(1) ;
aPythonFunction[0] = &PythonFunction ;
}
- _DataFlowNode = _DataFlowEditor->AddNode( NodeService , "" , "" , NodeName ,
+ _DataFlowNode = DataFlowEditor()->AddNode( NodeService , "" , "" , NodeName ,
NodeKindOfNode ,
aFuncName ,
aPythonFunction ) ;
_IsNode = true ;
- endService( "CNode_Impl::CNode_Impl" );
+// endService( "CNode_Impl::CNode_Impl" );
// cout << "<-- CNode_Impl::CNode_Impl" << endl ;
}
PortableServer::ObjectId * contId ,
const char *instanceName ,
const char *interfaceName ,
- GraphEditor::DataFlow * DataFlowEditor ,
+ GraphEditor::DataFlow * aDataFlowEditor ,
const SALOME_ModuleCatalog::Service &NodeService ,
const char * NodeName ,
const SUPERV::KindOfNode NodeKindOfNode ,
const GraphBase::ListOfFuncName & aFuncName ,
const GraphBase::ListOfPythonFunctions & aPythonFunction ) :
Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) {
- MESSAGE( NodeName << " " );
- beginService( "CNode_Impl::CNode_Impl" );
+// MESSAGE( NodeName << " " );
+// beginService( "CNode_Impl::CNode_Impl" );
if ( NodeName ) {
- MESSAGE("CNode_Impl::CNode_Impl " << NodeName << " " << strlen( NodeName ) ) ;
+// MESSAGE("CNode_Impl::CNode_Impl " << NodeName << " " << strlen( NodeName ) ) ;
}
if ( NodeKindOfNode == SUPERV::ComputingNode ) {
- MESSAGE( "CNode_Impl::CNode_Impl " << aFuncName[0] << " _poa->activate_object" );
+// MESSAGE( "CNode_Impl::CNode_Impl " << aFuncName[0] << " _poa->activate_object" );
_thisObj = this ;
_id = _poa->activate_object(_thisObj);
}
_Orb = CORBA::ORB::_duplicate(orb);
_Poa = poa ;
_ContId = contId ;
- _DataFlowEditor = DataFlowEditor ;
- _DataFlowNode = _DataFlowEditor->AddNode( NodeService , "" , "" , NodeName ,
+ _DataFlowEditor = aDataFlowEditor ;
+ DataFlowEditor()->Graph()->GraphEditor( aDataFlowEditor ) ;
+ _DataFlowNode = DataFlowEditor()->AddNode( NodeService , "" , "" , NodeName ,
NodeKindOfNode ,
aFuncName ,
aPythonFunction ) ;
_IsNode = true ;
- endService( "CNode_Impl::CNode_Impl" );
+// endService( "CNode_Impl::CNode_Impl" );
}
CNode_Impl::CNode_Impl( CORBA::ORB_ptr orb ,
PortableServer::ObjectId * contId ,
const char *instanceName ,
const char *interfaceName ,
- GraphEditor::DataFlow * DataFlowEditor ,
- GraphEditor::InNode * DataFlowNode ) :
+ GraphEditor::DataFlow * aDataFlowEditor ,
+ GraphEditor::InNode * aDataFlowNode ) :
Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) {
- MESSAGE( DataFlowNode->Name() << " " );
- beginService( "CNode_Impl::CNode_Impl" );
- if ( DataFlowNode->IsComputingNode() ) {
- MESSAGE( "CNode_Impl::CNode_Impl _poa->activate_object" );
+// beginService( "CNode_Impl::CNode_Impl" );
+ if ( aDataFlowNode && aDataFlowNode->IsComputingNode() ) {
+// MESSAGE( "CNode_Impl::CNode_Impl _poa->activate_object" );
_thisObj = this ;
_id = _poa->activate_object(_thisObj);
}
else {
- MESSAGE( "CNode_Impl::CNode_Impl NO _poa->activate_object " );
+// MESSAGE( "CNode_Impl::CNode_Impl NO _poa->activate_object " );
}
_Orb = CORBA::ORB::_duplicate(orb);
_Poa = poa ;
_ContId = contId ;
- _DataFlowEditor = DataFlowEditor ;
- _DataFlowNode = DataFlowNode ;
- _IsNode = true ;
- endService( "CNode_Impl::CNode_Impl" );
+ _DataFlowEditor = aDataFlowEditor ;
+ DataFlowEditor()->Graph()->GraphEditor( aDataFlowEditor ) ;
+ _DataFlowNode = aDataFlowNode ;
+ if ( aDataFlowNode ) {
+ _IsNode = true ;
+ }
+ else {
+ _IsNode = false ;
+ }
+// endService( "CNode_Impl::CNode_Impl" );
}
CNode_Impl::~CNode_Impl() {
void CNode_Impl::destroy() {
beginService( "CNode_Impl::Destroy" );
- if ( _DataFlowEditor->IsEditing() ) {
+ if ( DataFlowEditor()->IsEditing() ) {
if ( Delete() ) {
_DataFlowNode = NULL ;
_poa->deactivate_object(*_id) ;
delete(_id) ;
_thisObj->_remove_ref();
}
+ else {
+ MESSAGE("CNode_Impl::destroy ERROR ") ;
+ }
}
// endService( "CNode_Impl::Destroy" );
}
bool CNode_Impl::Delete() {
beginService( "CNode_Impl::Delete" );
bool RetVal = false ;
- if ( _DataFlowEditor->IsEditing() ) {
- RetVal = _DataFlowEditor->RemoveNode( Name() ) ;
+ if ( DataFlowEditor()->IsEditing() ) {
+ DeletePorts() ;
+ RetVal = DataFlowEditor()->RemoveNode( Name() ) ;
if ( RetVal ) {
- RetVal = _DataFlowEditor->UnValid() ;
+ DataFlowEditor()->UnValid() ;
}
}
endService( "CNode_Impl::Delete" );
return RetVal ;
}
+void CNode_Impl::DeletePorts() {
+ beginService( "CNode_Impl::DeletePorts" );
+ if ( DataFlowEditor()->IsEditing() && DataFlowNode() ) {
+ int i ;
+ for ( i = 0 ; i < DataFlowNode()->ComputingNode()->GetNodeInPortsSize() ; i++ ) {
+ SUPERV::Port_var aPort = DataFlowNode()->ComputingNode()->GetChangeNodeInPort( i )->ObjRef() ;
+ if ( !CORBA::is_nil( aPort ) ) {
+ aPort->Remove() ;
+ }
+ }
+ for ( i = 0 ; i < DataFlowNode()->ComputingNode()->GetNodeOutPortsSize() ; i++ ) {
+ SUPERV::Port_var aPort = DataFlowNode()->ComputingNode()->GetChangeNodeOutPort( i )->ObjRef() ;
+ if ( !CORBA::is_nil( aPort ) ) {
+ aPort->Remove() ;
+ }
+ }
+ }
+ endService( "CNode_Impl::DeletePorts" );
+}
+
SALOME_ModuleCatalog::Service * CNode_Impl::Service() {
// beginService( "CNode_Impl::Service" );
SALOME_ModuleCatalog::Service * RetVal ;
if ( _IsNode ) {
- RetVal = new SALOME_ModuleCatalog::Service( *_DataFlowNode->GetService() ) ;
+ RetVal = new SALOME_ModuleCatalog::Service( *DataFlowNode()->GetService() ) ;
}
else {
- RetVal = new SALOME_ModuleCatalog::Service( *_DataFlowEditor->GetService() ) ;
+ RetVal = new SALOME_ModuleCatalog::Service( *DataFlowEditor()->GetService() ) ;
}
// endService( "CNode_Impl::Service" );
return RetVal ;
// beginService( "CNode_Impl::Name" );
char * RetVal = NULL ;
if ( _IsNode ) {
- RetVal = _DataFlowNode->Name() ;
+ RetVal = DataFlowNode()->Name() ;
}
else {
- RetVal = _DataFlowEditor->Graph()->Name() ;
+ RetVal = DataFlowEditor()->Graph()->Name() ;
}
// endService( "CNode_Impl::Name" );
return CORBA::string_dup( RetVal );
bool CNode_Impl::SetName( const char * aDataFlowName ) {
// beginService( "CNode_Impl::SetName" );
bool RetVal = false ;
- if ( _DataFlowEditor->IsEditing() ) {
+ if ( DataFlowEditor()->IsEditing() ) {
if ( _IsNode ) {
- RetVal = _DataFlowEditor->ReNameNode( _DataFlowNode->Name() ,
+ RetVal = DataFlowEditor()->ReNameNode( DataFlowNode()->Name() ,
aDataFlowName ) ;
}
else {
- RetVal = _DataFlowEditor->Graph()->Name( aDataFlowName ) ;
+// RetVal = DataFlowEditor()->Graph()->Name( aDataFlowName ) ;
+ RetVal = DataFlowEditor()->Name( aDataFlowName ) ;
}
}
// endService( "CNode_Impl::SetName" );
// beginService( "CNode_Impl::Kind" );
SUPERV::KindOfNode RetVal = SUPERV::UnknownNode ;
if ( _IsNode ) {
- RetVal = _DataFlowNode->Kind() ;
+ RetVal = DataFlowNode()->Kind() ;
}
else {
- RetVal = _DataFlowEditor->Graph()->Kind() ;
+ RetVal = DataFlowEditor()->Graph()->Kind() ;
}
// endService( "CNode_Impl::Kind" );
return RetVal ;
// beginService( "CNode_Impl::IsGraph" );
bool RetVal = false ;
if ( _IsNode ) {
- RetVal = _DataFlowNode->IsDataFlowNode() ;
+ RetVal = DataFlowNode()->IsDataFlowNode() ;
}
else {
- RetVal = _DataFlowEditor->Graph()->IsDataFlowNode() ;
+ RetVal = DataFlowEditor()->Graph()->IsDataFlowNode() ;
}
// endService( "CNode_Impl::IsGraph" );
return RetVal ;
// beginService( "CNode_Impl::IsStreamGraph" );
bool RetVal = false ;
if ( _IsNode ) {
- RetVal = _DataFlowNode->IsDataStreamNode() ;
+ RetVal = DataFlowNode()->IsDataStreamNode() ;
}
else {
- RetVal = _DataFlowEditor->Graph()->IsDataStreamNode() ;
+ RetVal = DataFlowEditor()->Graph()->IsDataStreamNode() ;
}
// endService( "CNode_Impl::IsStreamGraph" );
return RetVal ;
}
+bool CNode_Impl::IsMacro() {
+// beginService( "CNode_Impl::IsMacro" );
+ bool RetVal = false ;
+ if ( _IsNode && DataFlowNode()->IsMacroNode() ) {
+ RetVal = true ;
+ }
+// endService( "CNode_Impl::IsMacro" );
+ return RetVal ;
+}
+bool CNode_Impl::IsFlowMacro() {
+// beginService( "CNode_Impl::IsFlowMacro" );
+ bool RetVal = false ;
+ if ( _IsNode && DataFlowNode()->IsMacroNode() && DataFlowNode()->ComputingNode()->MacroObject()->IsGraph() ) {
+ RetVal = true ;
+ }
+// endService( "CNode_Impl::IsFlowMacro" );
+ return RetVal ;
+}
+bool CNode_Impl::IsStreamMacro() {
+// beginService( "CNode_Impl::IsStreamMacro" );
+ bool RetVal = false ;
+ if ( _IsNode && DataFlowNode()->IsMacroNode() && DataFlowNode()->ComputingNode()->MacroObject()->IsStreamGraph() ) {
+ RetVal = true ;
+ }
+// endService( "CNode_Impl::IsStreamMacro" );
+ return RetVal ;
+}
+bool CNode_Impl::IsHeadGraph() {
+ bool RetVal = false ;
+ beginService( "CNode_Impl::IsHeadGraph" );
+ endService( "CNode_Impl::IsHeadGraph" );
+ return RetVal ;
+}
+long CNode_Impl::GraphLevel() {
+ long RetVal = 0 ;
+ beginService( "CNode_Impl::GraphLevel" );
+ RetVal = DataFlowEditor()->Graph()->GraphMacroLevel() ;
+ endService( "CNode_Impl::GraphLevel" );
+ return RetVal ;
+}
+
bool CNode_Impl::IsComputing() {
// beginService( "CNode_Impl::IsComputing" );
bool RetVal = SUPERV::UnknownNode ;
if ( _IsNode ) {
- RetVal = _DataFlowNode->IsComputingNode() ;
+ RetVal = DataFlowNode()->IsComputingNode() ;
}
else {
- RetVal = _DataFlowEditor->Graph()->IsComputingNode() ;
+ RetVal = DataFlowEditor()->Graph()->IsComputingNode() ;
}
// endService( "CNode_Impl::IsComputing" );
return RetVal ;
// beginService( "CNode_Impl::IsFactory" );
bool RetVal = SUPERV::UnknownNode ;
if ( _IsNode ) {
- RetVal = _DataFlowNode->IsFactoryNode() ;
+ RetVal = DataFlowNode()->IsFactoryNode() ;
}
else {
- RetVal = _DataFlowEditor->Graph()->IsFactoryNode() ;
+ RetVal = DataFlowEditor()->Graph()->IsFactoryNode() ;
}
// endService( "CNode_Impl::IsFactory" );
return RetVal ;
// beginService( "CNode_Impl::IsInLine" );
bool RetVal = SUPERV::UnknownNode ;
if ( _IsNode ) {
- RetVal = _DataFlowNode->IsInLineNode() ;
+ RetVal = DataFlowNode()->IsInLineNode() ;
}
else {
- RetVal = _DataFlowEditor->Graph()->IsInLineNode() ;
+ RetVal = DataFlowEditor()->Graph()->IsInLineNode() ;
}
// endService( "CNode_Impl::IsInLine" );
return RetVal ;
// beginService( "CNode_Impl::IsGOTO" );
bool RetVal = SUPERV::UnknownNode ;
if ( _IsNode ) {
- RetVal = _DataFlowNode->IsGOTONode() ;
+ RetVal = DataFlowNode()->IsGOTONode() ;
}
else {
- RetVal = _DataFlowEditor->Graph()->IsGOTONode() ;
+ RetVal = DataFlowEditor()->Graph()->IsGOTONode() ;
}
// endService( "CNode_Impl::IsGOTO" );
return RetVal ;
// beginService( "CNode_Impl::IsLoop" );
bool RetVal = SUPERV::UnknownNode ;
if ( _IsNode ) {
- RetVal = _DataFlowNode->IsLoopNode() ;
+ RetVal = DataFlowNode()->IsLoopNode() ;
}
else {
- RetVal = _DataFlowEditor->Graph()->IsLoopNode() ;
+ RetVal = DataFlowEditor()->Graph()->IsLoopNode() ;
}
// endService( "CNode_Impl::IsLoop" );
return RetVal ;
// beginService( "CNode_Impl::IsEndLoop" );
bool RetVal = SUPERV::UnknownNode ;
if ( _IsNode ) {
- RetVal = _DataFlowNode->IsEndLoopNode() ;
+ RetVal = DataFlowNode()->IsEndLoopNode() ;
}
else {
- RetVal = _DataFlowEditor->Graph()->IsEndLoopNode() ;
+ RetVal = DataFlowEditor()->Graph()->IsEndLoopNode() ;
}
// endService( "CNode_Impl::IsEndLoop" );
return RetVal ;
// beginService( "CNode_Impl::IsSwitch" );
bool RetVal = SUPERV::UnknownNode ;
if ( _IsNode ) {
- RetVal = _DataFlowNode->IsSwitchNode() ;
+ RetVal = DataFlowNode()->IsSwitchNode() ;
}
else {
- RetVal = _DataFlowEditor->Graph()->IsSwitchNode() ;
+ RetVal = DataFlowEditor()->Graph()->IsSwitchNode() ;
}
// endService( "CNode_Impl::IsSwitch" );
return RetVal ;
// beginService( "CNode_Impl::IsEndSwitch" );
bool RetVal = SUPERV::UnknownNode ;
if ( _IsNode ) {
- RetVal = _DataFlowNode->IsEndSwitchNode() ;
+ RetVal = DataFlowNode()->IsEndSwitchNode() ;
}
else {
- RetVal = _DataFlowEditor->Graph()->IsEndSwitchNode() ;
+ RetVal = DataFlowEditor()->Graph()->IsEndSwitchNode() ;
}
// endService( "CNode_Impl::IsEndSwitch" );
return RetVal ;
// beginService( "CNode_Impl::CreationDate" );
SUPERV::SDate_var RetVal ;
if ( _IsNode ) {
- RetVal = new SUPERV::SDate( _DataFlowNode->FirstCreation() ) ;
+ RetVal = new SUPERV::SDate( DataFlowNode()->FirstCreation() ) ;
}
else {
-// cout << " CNode_Impl::CreationDate " << _DataFlowEditor->FirstCreation()
+// cout << " CNode_Impl::CreationDate " << DataFlowEditor()->FirstCreation()
// << endl ;
- RetVal = new SUPERV::SDate( _DataFlowEditor->Graph()->FirstCreation() ) ;
+ RetVal = new SUPERV::SDate( DataFlowEditor()->Graph()->FirstCreation() ) ;
}
// endService( "CNode_Impl::CreationDate" );
return (RetVal._retn()) ;
// beginService( "CNode_Impl::LastUpdateDate" );
SUPERV::SDate_var RetVal ;
if ( _IsNode ) {
- RetVal = new SUPERV::SDate( _DataFlowNode->LastModification() ) ;
+ RetVal = new SUPERV::SDate( DataFlowNode()->LastModification() ) ;
}
else {
- RetVal = new SUPERV::SDate( _DataFlowEditor->Graph()->LastModification() ) ;
+ RetVal = new SUPERV::SDate( DataFlowEditor()->Graph()->LastModification() ) ;
}
// endService( "CNode_Impl::LastUpdateDate" );
return (RetVal._retn()) ;
// beginService( "CNode_Impl::Version" );
char * RetVal ;
if ( _IsNode ) {
- RetVal = _DataFlowNode->EditorRelease() ;
+ RetVal = DataFlowNode()->EditorRelease() ;
}
else {
- RetVal = _DataFlowEditor->Graph()->EditorRelease() ;
+ RetVal = DataFlowEditor()->Graph()->EditorRelease() ;
}
// endService( "CNode_Impl::Version" );
return CORBA::string_dup( RetVal ) ;
// beginService( "CNode_Impl::Author" );
char * RetVal ;
if ( _IsNode ) {
- RetVal = _DataFlowNode->Author() ;
+ RetVal = DataFlowNode()->Author() ;
}
else {
- RetVal = _DataFlowEditor->Graph()->Author() ;
+ RetVal = DataFlowEditor()->Graph()->Author() ;
}
// endService( "CNode_Impl::Author" );
return CORBA::string_dup( RetVal ) ;
bool CNode_Impl::SetAuthor( const char * aDataFlowAuthor ) {
// beginService( "CNode_Impl::SetAuthor" );
bool RetVal = false ;
- if ( _DataFlowEditor->IsEditing() ) {
+ if ( DataFlowEditor()->IsEditing() ) {
if ( _IsNode ) {
- RetVal = _DataFlowNode->Author( aDataFlowAuthor ) ;
+ RetVal = DataFlowNode()->Author( aDataFlowAuthor ) ;
}
else {
- RetVal = _DataFlowEditor->Graph()->Author( aDataFlowAuthor ) ;
+ RetVal = DataFlowEditor()->Graph()->Author( aDataFlowAuthor ) ;
}
}
// endService( "CNode_Impl::SetAuthor" );
// beginService( "CNode_Impl::Comment" );
char * RetVal ;
if ( _IsNode ) {
- RetVal = _DataFlowNode->Comment() ;
+ RetVal = DataFlowNode()->Comment() ;
}
else {
- RetVal = _DataFlowEditor->Graph()->Comment() ;
+ RetVal = DataFlowEditor()->Graph()->Comment() ;
}
// endService( "CNode_Impl::Comment" );
return CORBA::string_dup( RetVal ) ;
bool CNode_Impl::SetComment( const char * aDataFlowComment ) {
// beginService( "CNode_Impl::SetComment" );
bool RetVal = false ;
- if ( _DataFlowEditor->IsEditing() ) {
+ if ( DataFlowEditor()->IsEditing() ) {
if ( _IsNode ) {
- RetVal = _DataFlowNode->Comment( aDataFlowComment ) ;
+ RetVal = DataFlowNode()->Comment( aDataFlowComment ) ;
}
else {
- RetVal = _DataFlowEditor->Graph()->Comment( aDataFlowComment ) ;
+ RetVal = DataFlowEditor()->Graph()->Comment( aDataFlowComment ) ;
}
}
// endService( "CNode_Impl::SetComment" );
void CNode_Impl::Coords(long X , long Y ) {
// beginService( "CNode_Impl::Coords" );
- if ( _DataFlowEditor->IsEditing() ) {
+ if ( DataFlowEditor()->IsEditing() ) {
if ( _IsNode ) {
- ((GraphEditor::InNode *) _DataFlowNode)->Coordinates( X , Y ) ;
+ ((GraphEditor::InNode *) DataFlowNode())->Coordinates( X , Y ) ;
}
else {
- _DataFlowEditor->Graph()->Coordinates( X , Y ) ;
+ DataFlowEditor()->Graph()->Coordinates( X , Y ) ;
}
}
// endService( "CNode_Impl::Coords" );
// beginService( "CNode_Impl::X" );
long RetVal ;
if ( _IsNode ) {
- RetVal = _DataFlowNode->XCoordinate() ;
+ RetVal = DataFlowNode()->XCoordinate() ;
}
else {
- RetVal = _DataFlowEditor->Graph()->XCoordinate() ;
+ RetVal = DataFlowEditor()->Graph()->XCoordinate() ;
}
// endService( "CNode_Impl::X" );
return RetVal ;
// beginService( "CNode_Impl::Y" );
long RetVal ;
if ( _IsNode ) {
- RetVal = _DataFlowNode->YCoordinate() ;
+ RetVal = DataFlowNode()->YCoordinate() ;
}
else {
- RetVal = _DataFlowEditor->Graph()->YCoordinate() ;
+ RetVal = DataFlowEditor()->Graph()->YCoordinate() ;
}
// endService( "CNode_Impl::Y" );
return RetVal ;
SUPERV::Port_var iobject = SUPERV::Port::_nil() ;
bool aninport ;
if ( _IsNode ) {
- aninport = _DataFlowNode->GetInPort( ServiceParameterName ) ;
+ aninport = DataFlowNode()->GetInPort( ServiceParameterName ) ;
}
else {
- aninport = _DataFlowEditor->GetInPort( ServiceParameterName ) ;
+ aninport = DataFlowEditor()->GetInPort( ServiceParameterName ) ;
}
bool anoutport ;
if ( _IsNode ) {
- anoutport = _DataFlowNode->GetOutPort( ServiceParameterName ) ;
+ anoutport = DataFlowNode()->GetOutPort( ServiceParameterName ) ;
}
else {
- anoutport = _DataFlowEditor->GetOutPort( ServiceParameterName ) ;
+ anoutport = DataFlowEditor()->GetOutPort( ServiceParameterName ) ;
}
if ( aninport ) {
GraphBase::InPort * anInPort ;
if ( _IsNode ) {
- anInPort = _DataFlowNode->GetChangeInPort( ServiceParameterName ) ;
+ anInPort = DataFlowNode()->GetChangeInPort( ServiceParameterName ) ;
}
else {
- anInPort = _DataFlowEditor->GetChangeInPort( ServiceParameterName ) ;
+ anInPort = DataFlowEditor()->GetChangeInPort( ServiceParameterName ) ;
}
if ( anInPort->IsDataStream() ) {
MESSAGE( "CNode_Impl::Port ERROR IsDataStream " ) ;
}
bool hasinput ;
if ( _IsNode ) {
- hasinput = _DataFlowNode->HasInput( anInPort->PortName() ) ;
+ hasinput = DataFlowNode()->HasInput( anInPort->PortName() ) ;
}
else {
- hasinput = _DataFlowEditor->HasInput( anInPort->PortName() ) ;
+ hasinput = DataFlowEditor()->HasInput( anInPort->PortName() ) ;
}
if ( hasinput ) {
- const CORBA::Any * anAny = anInPort->GetOutPort()->Value() ;
+//JR 30.03.2005 const CORBA::Any * anAny = anInPort->GetOutPort()->Value() ;
+ const CORBA::Any anAny = anInPort->GetOutPort()->Value() ;
myPort = new Port_Impl( _Orb , _Poa , _ContId ,
instanceName() , interfaceName() ,
- _DataFlowEditor ,
- _DataFlowNode ,
+ DataFlowEditor() ,
+ DataFlowNode() ,
// ServiceParameterName ,
(GraphBase::Port * ) anInPort ,
true ,
- anAny ) ;
+ &anAny ) ;
}
else {
myPort = new Port_Impl( _Orb , _Poa , _ContId ,
instanceName() , interfaceName() ,
- _DataFlowEditor ,
- _DataFlowNode ,
+ DataFlowEditor() ,
+ DataFlowNode() ,
// ServiceParameterName ) ;
(GraphBase::Port * ) anInPort ,
true ) ;
else if ( anoutport ) {
GraphBase::OutPort * anOutPort ;
if ( _IsNode ) {
- anOutPort = _DataFlowNode->GetChangeOutPort( ServiceParameterName ) ;
+ anOutPort = DataFlowNode()->GetChangeOutPort( ServiceParameterName ) ;
}
else {
- anOutPort = _DataFlowEditor->GetChangeOutPort( ServiceParameterName ) ;
+ anOutPort = DataFlowEditor()->GetChangeOutPort( ServiceParameterName ) ;
}
if ( anOutPort->IsDataStream() ) {
MESSAGE( "CNode_Impl::Port ERROR IsDataStream " ) ;
beginService( "CNode_Impl::Port" );
begin = false ;
}
- const CORBA::Any * anAny = anOutPort->Value() ;
+//JR 30.03.2005 const CORBA::Any * anAny = anOutPort->Value() ;
+ const CORBA::Any anAny = anOutPort->Value() ;
myPort = new Port_Impl( _Orb , _Poa , _ContId ,
instanceName() , interfaceName() ,
- _DataFlowEditor ,
- _DataFlowNode ,
+ DataFlowEditor() ,
+ DataFlowNode() ,
// ServiceParameterName ,
(GraphBase::Port * ) anOutPort ,
false ,
- anAny ) ;
+ &anAny ) ;
PortableServer::ObjectId * id = myPort->getId() ;
CORBA::Object_var obj = _poa->id_to_reference(*id);
iobject = SUPERV::Port::_narrow(obj) ;
const SUPERV::Value_ptr aValue ) {
bool begin = true ;
SUPERV::Port_var iobject = SUPERV::Port::_nil() ;
- GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
+ GraphExecutor::DataFlow * aDataFlowExecutor = DataFlowEditor()->Executor() ;
bool sts = false ;
GraphBase::InPort * anInPort = NULL ;
- if ( _DataFlowEditor->IsEditing() ) {
+if ( DataFlowEditor()->IsEditing() /*&& DataFlowEditor()->Graph()->GraphMacroLevel() == 0*/ ) {
if ( _IsNode ) {
- sts = _DataFlowEditor->AddInputData( _DataFlowNode->Name() ,
+ sts = DataFlowEditor()->AddInputData( DataFlowNode()->Name() ,
ToServiceParameterName ,
*aValue->ToAny() ) ;
- anInPort = _DataFlowNode->GetChangeInPort( ToServiceParameterName ) ;
+ anInPort = DataFlowNode()->GetChangeInPort( ToServiceParameterName ) ;
}
else {
- sts = _DataFlowEditor->AddInputData( _DataFlowEditor->Graph()->Name() ,
+ sts = DataFlowEditor()->AddInputData( DataFlowEditor()->Graph()->Name() ,
ToServiceParameterName ,
*aValue->ToAny() ) ;
- anInPort = _DataFlowEditor->Graph()->GetChangeInPort( ToServiceParameterName ) ;
+ anInPort = DataFlowEditor()->Graph()->GetChangeInPort( ToServiceParameterName ) ;
}
if ( sts && anInPort ) {
if ( CORBA::is_nil( anInPort->ObjRef() ) ) {
Port_Impl * myPort ;
myPort = new Port_Impl( _Orb , _Poa , _ContId ,
instanceName() , interfaceName() ,
- _DataFlowEditor ,
- _DataFlowNode ,
+ DataFlowEditor() ,
+ DataFlowNode() ,
// ToServiceParameterName ,
(GraphBase::Port * ) anInPort ,
true ,
iobject = anInPort->ObjRef() ;
}
}
+ DataFlowEditor()->UnValid() ;
}
- else if ( _DataFlowExecutor ) {
+ else if ( aDataFlowExecutor ) {
if ( _IsNode ) {
- sts = _DataFlowExecutor->ChangeInputData( _DataFlowNode->Name() ,
+ sts = aDataFlowExecutor->ChangeInputData( DataFlowNode()->Name() ,
ToServiceParameterName ,
*aValue->ToAny() ) ;
- anInPort = _DataFlowNode->GetChangeInPort( ToServiceParameterName ) ;
+ anInPort = DataFlowNode()->GetChangeInPort( ToServiceParameterName ) ;
}
else {
- sts = _DataFlowExecutor->ChangeInputData( _DataFlowEditor->Graph()->Name() ,
+ sts = aDataFlowExecutor->ChangeInputData( DataFlowEditor()->Graph()->Name() ,
ToServiceParameterName ,
*aValue->ToAny() ) ;
- anInPort = _DataFlowEditor->Graph()->GetChangeInPort( ToServiceParameterName ) ;
+ anInPort = DataFlowEditor()->Graph()->GetChangeInPort( ToServiceParameterName ) ;
}
if ( sts && anInPort ) {
if ( CORBA::is_nil( anInPort->ObjRef() ) ) {
Port_Impl * myPort ;
myPort = new Port_Impl( _Orb , _Poa , _ContId ,
instanceName() , interfaceName() ,
- _DataFlowEditor ,
- _DataFlowNode ,
+ DataFlowEditor() ,
+ DataFlowNode() ,
// ToServiceParameterName ,
(GraphBase::Port * ) anInPort ,
true ,
endService( "CNode_Impl::Input" );
}
if ( CORBA::is_nil( iobject ) ) {
- MESSAGE( "CNode_Impl::Input returns nil object _IsNode " << _IsNode << " sts " << sts << " anInPort "
- << anInPort ) ;
+ MESSAGE( "CNode_Impl::Input returns nil object _IsNode " << _IsNode << " sts " << sts
+ << " Node " << Name() << " ToServiceParameterName " << ToServiceParameterName
+ << " anInPort " << anInPort ) ;
}
- DataFlowEditor()->UnValid() ;
return SUPERV::Port::_duplicate( iobject ) ;
}
+
SUPERV::Port_ptr CNode_Impl::GetInPort( const char *aParameterName ) {
SUPERV::Port_ptr Inobject = SUPERV::Port::_nil() ;
Port_Impl * myInPort = NULL ;
if ( anOutPort && !anOutPort->IsDataStream() ) {
Outobject = anOutPort->ObjRef() ;
if ( CORBA::is_nil( Outobject ) ) {
- const CORBA::Any * anAny = anOutPort->Value() ;
+//JR 30.03.2005 const CORBA::Any * anAny = anOutPort->Value() ;
+ const CORBA::Any anAny = anOutPort->Value() ;
myOutPort = new Port_Impl( _Orb , _Poa , _ContId ,
instanceName() , interfaceName() ,
DataFlowEditor() ,
DataFlowNode() ,
(GraphBase::Port * ) anOutPort ,
false ,
- anAny ) ;
+ &anAny ) ;
if ( myOutPort ) {
PortableServer::ObjectId * id = myOutPort->getId() ;
CORBA::Object_var obj = _poa->id_to_reference(*id) ;
if ( anOutPort && anOutPort->IsDataStream() ) {
Outobject = SUPERV::StreamPort::_narrow( anOutPort->ObjRef() ) ;
if ( CORBA::is_nil( Outobject ) ) {
- const CORBA::Any * anAny = anOutPort->Value() ;
+//JR 30.03.2005 const CORBA::Any * anAny = anOutPort->Value() ;
+ const CORBA::Any anAny = anOutPort->Value() ;
myOutStreamPort = new StreamPort_Impl( _Orb , _Poa , _ContId ,
instanceName() , interfaceName() ,
DataFlowEditor() ,
DataFlowNode() ,
(GraphBase::Port * ) anOutPort ,
false ,
- anAny ) ;
+ &anAny ) ;
if ( myOutStreamPort ) {
PortableServer::ObjectId * id = myOutStreamPort->getId() ;
CORBA::Object_var obj = _poa->id_to_reference(*id) ;
return SUPERV::StreamPort::_duplicate( Outobject );
}
+bool CNode_Impl::HasStreamPort() {
+ bool RetVal = false ;
+ beginService( "CNode_Impl::HasStreamPort" );
+ endService( "CNode_Impl::HasStreamPort" );
+ return RetVal ;
+}
+
SUPERV::Link_ptr CNode_Impl::GetLink(const char * ToServiceParameterName ) {
bool begin = true ;
SUPERV::Link_var iobject = SUPERV::Link::_nil() ;
char* FromNodeName ;
char* FromServiceParameterName ;
- bool status = _DataFlowEditor->GetLink( _DataFlowNode->Name() ,
+ bool status = DataFlowEditor()->GetLink( DataFlowNode()->Name() ,
ToServiceParameterName ,
& FromNodeName ,
& FromServiceParameterName ) ;
if ( status ) {
- GraphBase::InPort * anInPort = _DataFlowNode->GetChangeInPort( ToServiceParameterName ) ;
+ GraphBase::InPort * anInPort = DataFlowNode()->GetChangeInPort( ToServiceParameterName ) ;
if ( !anInPort->IsDataStream() && anInPort->GetOutPort() ) {
GraphBase::OutPort * anOutPort = anInPort->GetOutPort() ;
if ( CORBA::is_nil( anOutPort->InPortObjRef( anInPort ) ) ) {
bool Success ;
Link_Impl * myLink = new Link_Impl( _Orb , _Poa , _ContId ,
instanceName() , interfaceName() ,
- _DataFlowEditor ,
- _DataFlowNode ,
+ DataFlowEditor() ,
+ DataFlowNode() ,
ToServiceParameterName ,
- (GraphEditor::InNode *) _DataFlowEditor->Graph()->GetChangeGraphNode( FromNodeName )->GetInNode() ,
+ (GraphEditor::InNode *) DataFlowEditor()->Graph()->GetChangeGraphNode( FromNodeName )->GetInNode() ,
FromServiceParameterName ,
true , false , Success ) ;
if ( Success ) {
char* FromNodeName ;
char* FromServiceParameterName ;
if ( DataFlowEditor()->Graph()->IsDataStreamNode() ) {
- bool status = _DataFlowEditor->GetLink( _DataFlowNode->Name() ,
+ bool status = DataFlowEditor()->GetLink( DataFlowNode()->Name() ,
ToServiceParameterName ,
& FromNodeName ,
& FromServiceParameterName ) ;
if ( status ) {
- GraphBase::InPort * anInPort = _DataFlowNode->GetChangeInPort( ToServiceParameterName ) ;
+ GraphBase::InPort * anInPort = DataFlowNode()->GetChangeInPort( ToServiceParameterName ) ;
if ( anInPort->IsDataStream() && anInPort->GetOutPort() ) {
GraphBase::OutPort * anOutPort = anInPort->GetOutPort() ;
if ( CORBA::is_nil( anOutPort->InPortObjRef( anInPort ) ) ) {
StreamLink_Impl * myStreamLink = new StreamLink_Impl(
_Orb , _Poa , _ContId ,
instanceName() , interfaceName() ,
- _DataFlowEditor ,
- _DataFlowNode ,
+ DataFlowEditor() ,
+ DataFlowNode() ,
ToServiceParameterName ,
- (GraphEditor::InNode *) _DataFlowEditor->Graph()->GetChangeGraphNode( FromNodeName )->GetInNode() ,
+ (GraphEditor::InNode *) DataFlowEditor()->Graph()->GetChangeGraphNode( FromNodeName )->GetInNode() ,
FromServiceParameterName ,
true , Success ) ;
if ( Success ) {
int PortCount = 0 ;
SUPERV::ListOfPorts_var RetVal = new SUPERV::ListOfPorts ;
if ( _IsNode ) {
-// RetVal->length( _DataFlowNode->GetNodeInPortsSize() +
-// _DataFlowNode->GetNodeOutPortsSize() ) ;
- for ( i = 0 ; i < _DataFlowNode->GetNodeInPortsSize() ; i++ ) {
- GraphBase::InPort * anInPort = _DataFlowNode->GetChangeNodeInPort( i ) ;
+ for ( i = 0 ; i < DataFlowNode()->GetNodeInPortsSize() ; i++ ) {
+ GraphBase::InPort * anInPort = DataFlowNode()->GetChangeNodeInPort( i ) ;
if ( !anInPort->IsDataStream() ) {
if ( begin ) {
beginService( "CNode_Impl::Ports" );
begin = false ;
}
- if ( anInPort->IsLoop() || ( anInPort->IsGate() && !anInPort->IsConnected() &&
- ( _DataFlowEditor->IsExecuting() || _DataFlowEditor->IsReadOnly() ) ) ) {
- MESSAGE( "InPort " << i << " " << anInPort->PortName() << " of Node " << Name() << " ignored" ) ;
-// RetVal[ i ] = SUPERV::Port::_duplicate( SUPERV::Port::_narrow( CORBA::Object::_nil() ) ) ;
+ if ( anInPort->IsLoop() || ( anInPort->IsGate() && anInPort->IsNotConnected() &&
+ ( IsExecuting() || DataFlowEditor()->IsReadOnly() ) ) ) {
+// MESSAGE( "InPort " << i << " " << anInPort->PortName() << " of Node " << Name() << " ignored" ) ;
}
else if ( CORBA::is_nil( anInPort->ObjRef() ) ) {
- MESSAGE( "InPort " << i << " " << anInPort->PortName() << " of Node " << Name() << " IsExecuting "
- << _DataFlowEditor->IsExecuting() << " IsGate/IsConnected " << anInPort->IsGate()
- << "/" << anInPort->IsConnected() ) ;
+// MESSAGE( "InPort " << i << " " << anInPort->PortName() << " of Node " << Name() << " IsExecuting "
+// << IsExecuting() << " IsGate/IsConnected " << anInPort->IsGate()
+// << "/" << anInPort->IsNotConnected() ) ;
Port_Impl * myPort ;
- if ( _DataFlowNode->HasInput( anInPort->PortName() ) ) {
- const CORBA::Any * anAny = anInPort->GetOutPort()->Value() ;
+ if ( DataFlowNode()->HasInput( anInPort->PortName() ) ) {
+//JR 30.03.2005 const CORBA::Any * anAny = anInPort->GetOutPort()->Value() ;
+ const CORBA::Any anAny = anInPort->GetOutPort()->Value() ;
myPort = new Port_Impl( _Orb , _Poa , _ContId ,
instanceName() , interfaceName() ,
- _DataFlowEditor ,
- _DataFlowNode ,
+ DataFlowEditor() ,
+ DataFlowNode() ,
(GraphBase::Port * ) anInPort ,
true ,
- anAny ) ;
+ &anAny ) ;
}
else {
myPort = new Port_Impl( _Orb , _Poa , _ContId ,
instanceName() , interfaceName() ,
- _DataFlowEditor ,
- _DataFlowNode ,
+ DataFlowEditor() ,
+ DataFlowNode() ,
(GraphBase::Port * ) anInPort ,
true ) ;
}
anInPort->ObjRef( SUPERV::Port::_duplicate( iobject ) ) ;
}
else {
- MESSAGE( "InPort " << i << " " << anInPort->PortName() << " of Node " << Name() ) ;
+// MESSAGE( "InPort " << i << " " << anInPort->PortName() << " of Node " << Name() ) ;
PortCount += 1 ;
RetVal->length( PortCount ) ;
RetVal[ PortCount - 1 ] = SUPERV::Port::_duplicate( anInPort->ObjRef() ) ;
}
}
else {
- MESSAGE( "InPort " << i << " " << anInPort->PortName() << " of Node " << Name() << " IsDataStream" ) ;
-// RetVal[ i ] = SUPERV::Port::_duplicate( SUPERV::Port::_narrow( CORBA::Object::_nil() ) ) ;
+// MESSAGE( "InPort " << i << " " << anInPort->PortName() << " of Node " << Name() << " IsDataStream" ) ;
}
}
- for ( i = 0 ; i < _DataFlowNode->GetNodeOutPortsSize() ; i++ ) {
- GraphBase::OutPort * anOutPort = _DataFlowNode->GetChangeNodeOutPort( i ) ;
+ for ( i = 0 ; i < DataFlowNode()->GetNodeOutPortsSize() ; i++ ) {
+ GraphBase::OutPort * anOutPort = DataFlowNode()->GetChangeNodeOutPort( i ) ;
if ( !anOutPort->IsDataStream() ) {
if ( begin ) {
beginService( "CNode_Impl::Ports" );
begin = false ;
}
- if ( anOutPort->IsLoop() || ( anOutPort->IsGate() && !anOutPort->IsConnected() &&
- ( _DataFlowEditor->IsExecuting() || _DataFlowEditor->IsReadOnly() ) ) ) {
- MESSAGE( "OutPort " << i << " " << anOutPort->PortName() << " of Node " << Name() << " ignored" ) ;
-// RetVal[ _DataFlowNode->GetNodeInPortsSize() + i ] = SUPERV::Port::_duplicate( SUPERV::Port::_narrow( CORBA::Object::_nil() ) ) ;
+ if ( anOutPort->IsLoop() || ( anOutPort->IsGate() && anOutPort->IsNotConnected() &&
+ ( IsExecuting() || DataFlowEditor()->IsReadOnly() ) ) ) {
+// MESSAGE( "OutPort " << i << " " << anOutPort->PortName() << " of Node " << Name() << " ignored" ) ;
}
else if ( CORBA::is_nil( anOutPort->ObjRef() ) ) {
- MESSAGE( "OutPort " << i << " " << anOutPort->PortName() << " of Node " << Name() ) ;
- const CORBA::Any * anAny = anOutPort->Value() ;
+// MESSAGE( "OutPort " << i << " " << anOutPort->PortName() << " of Node " << Name() ) ;
+//JR 30.03.2005 const CORBA::Any * anAny = anOutPort->Value() ;
+ const CORBA::Any anAny = anOutPort->Value() ;
Port_Impl * myPort = new Port_Impl( _Orb , _Poa , _ContId ,
instanceName() , interfaceName() ,
- _DataFlowEditor ,
- _DataFlowNode ,
+ DataFlowEditor() ,
+ DataFlowNode() ,
(GraphBase::Port * ) anOutPort ,
false ,
- anAny ) ;
+ &anAny ) ;
PortableServer::ObjectId * id = myPort->getId() ;
CORBA::Object_var obj = _poa->id_to_reference(*id);
SUPERV::Port_var iobject ;
anOutPort->ObjRef( SUPERV::Port::_duplicate( iobject ) ) ;
}
else {
- MESSAGE( "OutPort " << i << " " << anOutPort->PortName() << " of Node " << Name() ) ;
+// MESSAGE( "OutPort " << i << " " << anOutPort->PortName() << " of Node " << Name() ) ;
PortCount += 1 ;
RetVal->length( PortCount ) ;
RetVal[ PortCount - 1 ] = SUPERV::Port::_duplicate( anOutPort->ObjRef() ) ;
}
}
else {
- MESSAGE( "OutPort " << i << " " << anOutPort->PortName() << " of Node " << Name() << " IsDataStream" ) ;
-// RetVal[ _DataFlowNode->GetNodeInPortsSize() + i ] = SUPERV::Port::_duplicate( SUPERV::Port::_narrow( CORBA::Object::_nil() ) ) ;
+// MESSAGE( "OutPort " << i << " " << anOutPort->PortName() << " of Node " << Name() << " IsDataStream" ) ;
}
}
}
else {
- if ( _DataFlowEditor->IsValid() ) {
- RetVal->length( _DataFlowEditor->Graph()->GetNodeInDataNodePortsSize() +
- _DataFlowEditor->Graph()->GetNodeOutDataNodePortsSize() ) ;
- for ( i = 0 ; i < _DataFlowEditor->Graph()->GetNodeInDataNodePortsSize() ; i++ ) {
- GraphBase::OutPort * anOutPort = _DataFlowEditor->Graph()->GetChangeNodeInDataNodePort(i) ;
+ if ( DataFlowEditor()->IsValid() ) {
+ //DataFlowEditor()->Graph()->Values() ;
+ RetVal->length( DataFlowEditor()->Graph()->GetNodeInDataNodePortsSize() +
+ DataFlowEditor()->Graph()->GetNodeOutDataNodePortsSize() ) ;
+ for ( i = 0 ; i < DataFlowEditor()->Graph()->GetNodeInDataNodePortsSize() ; i++ ) {
+ GraphBase::OutPort * anOutPort = DataFlowEditor()->Graph()->GetChangeNodeInDataNodePort(i) ;
if ( !anOutPort->IsDataStream() ) {
if ( CORBA::is_nil( anOutPort->ObjRef() ) ) {
if ( begin ) {
}
Port_Impl * myPort ;
if ( anOutPort->IsDataConnected() ) {
- const CORBA::Any * anAny = anOutPort->Value() ;
+//JR 30.03.2005 const CORBA::Any * anAny = anOutPort->Value() ;
+ const CORBA::Any anAny = anOutPort->Value() ;
myPort = new Port_Impl( _Orb , _Poa , _ContId ,
instanceName() , interfaceName() ,
- _DataFlowEditor ,
- _DataFlowNode ,
+ DataFlowEditor() ,
+ DataFlowNode() ,
(GraphBase::Port * ) anOutPort ,
true ,
- anAny ) ;
+ &anAny ) ;
}
else {
myPort = new Port_Impl( _Orb , _Poa , _ContId ,
instanceName() , interfaceName() ,
- _DataFlowEditor ,
- _DataFlowNode ,
+ DataFlowEditor() ,
+ DataFlowNode() ,
(GraphBase::Port * ) anOutPort ,
true ) ;
}
}
}
else {
-// RetVal[ i ] = SUPERV::Port::_duplicate( SUPERV::Port::_narrow( CORBA::Object::_nil() ) ) ;
}
}
- j = _DataFlowEditor->Graph()->GetNodeInDataNodePortsSize() ;
- for ( i = 0 ; i < _DataFlowEditor->Graph()->GetNodeOutDataNodePortsSize() ; i++ ) {
- GraphBase::InPort * anInPort = _DataFlowEditor->Graph()->GetChangeNodeOutDataNodePort(i) ;
+ j = DataFlowEditor()->Graph()->GetNodeInDataNodePortsSize() ;
+ for ( i = 0 ; i < DataFlowEditor()->Graph()->GetNodeOutDataNodePortsSize() ; i++ ) {
+ GraphBase::InPort * anInPort = DataFlowEditor()->Graph()->GetChangeNodeOutDataNodePort(i) ;
if ( !anInPort->IsDataStream() ) {
if ( CORBA::is_nil( anInPort->ObjRef() ) ) {
if ( begin ) {
}
Port_Impl * myPort ;
if ( anInPort->IsDataConnected() ) {
- const CORBA::Any * anAny = anInPort->GetOutPort()->Value() ;
+//JR 30.03.2005 const CORBA::Any * anAny = anInPort->GetOutPort()->Value() ;
+ const CORBA::Any anAny = anInPort->GetOutPort()->Value() ;
myPort = new Port_Impl( _Orb , _Poa , _ContId ,
instanceName() , interfaceName() ,
- _DataFlowEditor ,
- _DataFlowNode ,
+ DataFlowEditor() ,
+ DataFlowNode() ,
(GraphBase::Port * ) anInPort ,
false ,
- anAny ) ;
+ &anAny ) ;
}
else {
myPort = new Port_Impl( _Orb , _Poa , _ContId ,
instanceName() , interfaceName() ,
- _DataFlowEditor ,
- _DataFlowNode ,
+ DataFlowEditor() ,
+ DataFlowNode() ,
anInPort ,
false ) ;
}
}
}
else {
-// RetVal[ j + i ] = SUPERV::Port::_duplicate( SUPERV::Port::_narrow( CORBA::Object::_nil() ) ) ;
}
}
}
}
-// int RetVallength = (unsigned int ) RetVal->length() ;
-// for ( i = 0 ; i < RetVallength ; i++ ) {
-// MESSAGE( "Port " << i << " " << RetVal[i]->Name() << " of Node " << Name() ) ;
-// }
+#if 0
+ int RetVallength = (unsigned int ) RetVal->length() ;
+ for ( i = 0 ; i < RetVallength ; i++ ) {
+ MESSAGE( "Port " << i << " " << RetVal[i]->Name() << " of Node " << Name() ) ;
+ }
+#endif
if ( !begin ) {
endService( "CNode_Impl::Ports " ) ;
}
// MESSAGE("CNode_Impl::StreamPorts NOT a DataStreamNode" ) ;
}
else if ( _IsNode ) {
-// RetVal->length( _DataFlowNode->GetNodeInPortsSize() +
-// _DataFlowNode->GetNodeOutPortsSize() ) ;
- for ( i = 0 ; i < _DataFlowNode->GetNodeInPortsSize() ; i++ ) {
- GraphBase::InPort * anInPort = _DataFlowNode->GetChangeNodeInPort( i ) ;
+// RetVal->length( DataFlowNode()->GetNodeInPortsSize() +
+// DataFlowNode()->GetNodeOutPortsSize() ) ;
+ for ( i = 0 ; i < DataFlowNode()->GetNodeInPortsSize() ; i++ ) {
+ GraphBase::InPort * anInPort = DataFlowNode()->GetChangeNodeInPort( i ) ;
if ( anInPort->IsDataStream() ) {
if ( begin ) {
beginService( "CNode_Impl::StreamPorts" );
begin = false ;
}
- if ( anInPort->IsLoop() || ( anInPort->IsGate() && !anInPort->IsConnected() &&
- ( _DataFlowEditor->IsExecuting() || _DataFlowEditor->IsReadOnly() ) ) ) {
+ if ( anInPort->IsLoop() || ( anInPort->IsGate() && anInPort->IsNotConnected() &&
+ ( IsExecuting() || DataFlowEditor()->IsReadOnly() ) ) ) {
MESSAGE( "InStreamPort " << i << " " << anInPort->PortName() << " of Node " << Name() << " ignored" ) ;
// RetVal[ i ] = SUPERV::StreamPort::_duplicate( SUPERV::StreamPort::_narrow( CORBA::Object::_nil() ) ) ;
}
else if ( CORBA::is_nil( anInPort->ObjRef() ) ) {
MESSAGE( "InStreamPort " << i << " " << anInPort->PortName() << " of Node " << Name() << " IsExecuting "
- << _DataFlowEditor->IsExecuting() << " IsGate/IsConnected " << anInPort->IsGate()
- << "/" << anInPort->IsConnected() ) ;
+ << IsExecuting() << " IsGate/IsConnected " << anInPort->IsGate()
+ << "/" << anInPort->IsNotConnected() ) ;
StreamPort_Impl * myStreamPort ;
- if ( _DataFlowNode->HasInput( anInPort->PortName() ) ) {
- const CORBA::Any * anAny = anInPort->GetOutPort()->Value() ;
+ if ( DataFlowNode()->HasInput( anInPort->PortName() ) ) {
+//JR 30.03.2005 const CORBA::Any * anAny = anInPort->GetOutPort()->Value() ;
+ const CORBA::Any anAny = anInPort->GetOutPort()->Value() ;
myStreamPort = new StreamPort_Impl( _Orb , _Poa , _ContId ,
instanceName() , interfaceName() ,
- _DataFlowEditor ,
- _DataFlowNode ,
+ DataFlowEditor() ,
+ DataFlowNode() ,
(GraphBase::Port * ) anInPort ,
true ,
- anAny ) ;
+ &anAny ) ;
}
else {
myStreamPort = new StreamPort_Impl( _Orb , _Poa , _ContId ,
instanceName() , interfaceName() ,
- _DataFlowEditor ,
- _DataFlowNode ,
+ DataFlowEditor() ,
+ DataFlowNode() ,
(GraphBase::Port * ) anInPort ,
true ) ;
}
// RetVal[ i ] = SUPERV::StreamPort::_duplicate( SUPERV::StreamPort::_narrow( CORBA::Object::_nil() ) ) ;
}
}
- for ( i = 0 ; i < _DataFlowNode->GetNodeOutPortsSize() ; i++ ) {
- GraphBase::OutPort * anOutPort = _DataFlowNode->GetChangeNodeOutPort( i ) ;
+ for ( i = 0 ; i < DataFlowNode()->GetNodeOutPortsSize() ; i++ ) {
+ GraphBase::OutPort * anOutPort = DataFlowNode()->GetChangeNodeOutPort( i ) ;
if ( anOutPort->IsDataStream() ) {
if ( begin ) {
beginService( "CNode_Impl::StreamPorts" );
begin = false ;
}
- if ( anOutPort->IsLoop() || ( anOutPort->IsGate() && !anOutPort->IsConnected() &&
- ( _DataFlowEditor->IsExecuting() || _DataFlowEditor->IsReadOnly() ) ) ) {
+ if ( anOutPort->IsLoop() || ( anOutPort->IsGate() && anOutPort->IsNotConnected() &&
+ ( IsExecuting() || DataFlowEditor()->IsReadOnly() ) ) ) {
MESSAGE( "OutStreamPort " << i << " " << anOutPort->PortName() << " of Node " << Name() << " ignored" ) ;
-// RetVal[ _DataFlowNode->GetNodeInPortsSize() + i ] = SUPERV::StreamPort::_duplicate( SUPERV::StreamPort::_narrow( CORBA::Object::_nil() ) ) ;
+// RetVal[ DataFlowNode()->GetNodeInPortsSize() + i ] = SUPERV::StreamPort::_duplicate( SUPERV::StreamPort::_narrow( CORBA::Object::_nil() ) ) ;
}
else if ( CORBA::is_nil( anOutPort->ObjRef() ) ) {
MESSAGE( "OutStreamPort " << i << " " << anOutPort->PortName() << " of Node " << Name() ) ;
- const CORBA::Any * anAny = anOutPort->Value() ;
+//JR 30.03.2005 const CORBA::Any * anAny = anOutPort->Value() ;
+ const CORBA::Any anAny = anOutPort->Value() ;
StreamPort_Impl * myStreamPort = new StreamPort_Impl( _Orb , _Poa , _ContId ,
instanceName() , interfaceName() ,
- _DataFlowEditor ,
- _DataFlowNode ,
+ DataFlowEditor() ,
+ DataFlowNode() ,
(GraphBase::Port * ) anOutPort ,
false ,
- anAny ) ;
+ &anAny ) ;
PortableServer::ObjectId * id = myStreamPort->getId() ;
CORBA::Object_var obj = _poa->id_to_reference(*id);
SUPERV::StreamPort_var iobject ;
}
}
else {
- if ( _DataFlowEditor->IsValid() ) {
-// RetVal->length( _DataFlowEditor->Graph()->GetNodeInDataNodePortsSize() +
-// _DataFlowEditor->Graph()->GetNodeOutDataNodePortsSize() ) ;
- for ( i = 0 ; i < _DataFlowEditor->Graph()->GetNodeInDataNodePortsSize() ; i++ ) {
- GraphBase::OutPort * anOutPort = _DataFlowEditor->Graph()->GetChangeNodeInDataNodePort(i) ;
+ if ( DataFlowEditor()->IsValid() ) {
+// RetVal->length( DataFlowEditor()->Graph()->GetNodeInDataNodePortsSize() +
+// DataFlowEditor()->Graph()->GetNodeOutDataNodePortsSize() ) ;
+ for ( i = 0 ; i < DataFlowEditor()->Graph()->GetNodeInDataNodePortsSize() ; i++ ) {
+ GraphBase::OutPort * anOutPort = DataFlowEditor()->Graph()->GetChangeNodeInDataNodePort(i) ;
if ( anOutPort->IsDataStream() ) {
if ( CORBA::is_nil( anOutPort->ObjRef() ) ) {
if ( begin ) {
}
StreamPort_Impl * myStreamPort ;
if ( anOutPort->IsDataConnected() ) {
- const CORBA::Any * anAny = anOutPort->Value() ;
+//JR 30.03.2005 const CORBA::Any * anAny = anOutPort->Value() ;
+ const CORBA::Any anAny = anOutPort->Value() ;
myStreamPort = new StreamPort_Impl( _Orb , _Poa , _ContId ,
instanceName() , interfaceName() ,
- _DataFlowEditor ,
- _DataFlowNode ,
+ DataFlowEditor() ,
+ DataFlowNode() ,
(GraphBase::Port * ) anOutPort ,
true ,
- anAny ) ;
+ &anAny ) ;
}
else {
myStreamPort = new StreamPort_Impl( _Orb , _Poa , _ContId ,
instanceName() , interfaceName() ,
- _DataFlowEditor ,
- _DataFlowNode ,
+ DataFlowEditor() ,
+ DataFlowNode() ,
(GraphBase::Port * ) anOutPort ,
true ) ;
}
// RetVal[ i ] = SUPERV::StreamPort::_duplicate( SUPERV::StreamPort::_narrow( CORBA::Object::_nil() ) ) ;
}
}
- j = _DataFlowEditor->Graph()->GetNodeInDataNodePortsSize() ;
- for ( i = 0 ; i < _DataFlowEditor->Graph()->GetNodeOutDataNodePortsSize() ; i++ ) {
- GraphBase::InPort * anInPort = _DataFlowEditor->Graph()->GetChangeNodeOutDataNodePort(i) ;
+ j = DataFlowEditor()->Graph()->GetNodeInDataNodePortsSize() ;
+ for ( i = 0 ; i < DataFlowEditor()->Graph()->GetNodeOutDataNodePortsSize() ; i++ ) {
+ GraphBase::InPort * anInPort = DataFlowEditor()->Graph()->GetChangeNodeOutDataNodePort(i) ;
if ( anInPort->IsDataStream() ) {
if ( CORBA::is_nil( anInPort->ObjRef() ) ) {
if ( begin ) {
}
StreamPort_Impl * myStreamPort ;
if ( anInPort->IsDataConnected() ) {
- const CORBA::Any * anAny = anInPort->GetOutPort()->Value() ;
+//JR 30.03.2005 const CORBA::Any * anAny = anInPort->GetOutPort()->Value() ;
+ const CORBA::Any anAny = anInPort->GetOutPort()->Value() ;
myStreamPort = new StreamPort_Impl( _Orb , _Poa , _ContId ,
instanceName() , interfaceName() ,
- _DataFlowEditor ,
- _DataFlowNode ,
+ DataFlowEditor() ,
+ DataFlowNode() ,
(GraphBase::Port * ) anInPort ,
false ,
- anAny ) ;
+ &anAny ) ;
}
else {
myStreamPort = new StreamPort_Impl( _Orb , _Poa , _ContId ,
instanceName() , interfaceName() ,
- _DataFlowEditor ,
- _DataFlowNode ,
+ DataFlowEditor() ,
+ DataFlowNode() ,
anInPort ,
false ) ;
}
SUPERV::ListOfLinks * CNode_Impl::Links() {
beginService( "CNode_Impl::Links" ) ;
SUPERV::ListOfLinks_var RetVal = new SUPERV::ListOfLinks ;
- if ( _DataFlowNode ) {
- RetVal = DataFlowEditor()->Graph()->ObjImpl()->Links( _DataFlowNode->ComputingNode() , NULL ) ;
+ if ( DataFlowNode() ) {
+// MESSAGE( "CNode_Impl::Links " << DataFlowEditor() << " " << DataFlowEditor()->Graph() << " " << DataFlowEditor()->Graph()->ObjImpl() << " " << DataFlowNode()->ComputingNode() << " " << DataFlowNode()->ComputingNode()->Name() ) ;
+ RetVal = ((Graph_Impl * ) DataFlowEditor()->Graph()->ObjImpl())->Links( DataFlowNode()->ComputingNode() , NULL ) ;
}
else {
- RetVal = DataFlowEditor()->Graph()->ObjImpl()->Links( NULL , NULL ) ;
+ RetVal = ((Graph_Impl * ) DataFlowEditor()->Graph()->ObjImpl())->Links( NULL , NULL ) ;
}
MESSAGE( "CNode_Impl::Links " << RetVal->length() << " Links" ) ;
endService( "CNode_Impl::Links" ) ;
SUPERV::ListOfStreamLinks * CNode_Impl::StreamLinks() {
beginService( "CNode_Impl::StreamLinks" ) ;
SUPERV::ListOfStreamLinks_var RetVal = new SUPERV::ListOfStreamLinks ;
- if ( _DataFlowNode && DataFlowEditor()->Graph()->IsDataStreamNode() ) {
- RetVal = ((StreamGraph_Impl *) (DataFlowEditor()->StreamGraph()->ObjImpl()))->StreamLinks( _DataFlowNode->ComputingNode() , NULL ) ;
+ if ( DataFlowNode() && DataFlowEditor()->Graph()->IsDataStreamNode() ) {
+ RetVal = ((StreamGraph_Impl *) (DataFlowEditor()->StreamGraph()->ObjImpl()))->StreamLinks( DataFlowNode()->ComputingNode() , NULL ) ;
}
else if ( DataFlowEditor()->Graph()->IsDataStreamNode() ) {
RetVal = ((StreamGraph_Impl *) (DataFlowEditor()->StreamGraph()->ObjImpl()))->StreamLinks( NULL , NULL ) ;
// beginService( "CNode_Impl::SubGraph" );
long RetVal = 0 ;
if ( _IsNode ) {
- RetVal = _DataFlowNode->SubGraph() ;
+ RetVal = DataFlowNode()->SubGraph() ;
}
// endService( "CNode_Impl::SubGraph" );
return RetVal ;
// beginService( "CNode_Impl::SubStreamGraph" );
long RetVal = 0 ;
if ( _IsNode ) {
- RetVal = _DataFlowNode->SubStreamGraph() ;
+ RetVal = DataFlowNode()->SubStreamGraph() ;
}
// endService( "CNode_Impl::SubStreamGraph" );
return RetVal ;
bool CNode_Impl::IsLinked(const char * ServiceParameterName ) {
beginService( "CNode_Impl::IsLinked" );
- bool RetVal = _DataFlowNode->IsLinked( ServiceParameterName ) ;
+ bool RetVal = DataFlowNode()->IsLinked( ServiceParameterName ) ;
MESSAGE( Name() << "->IsLinked( '" << ServiceParameterName << "' )" ) ;
endService( "CNode_Impl::IsLinked" );
return RetVal ;
bool CNode_Impl::HasInput(const char * ServiceParameterName ) {
// beginService( "CNode_Impl::HasInput" );
- bool RetVal = _DataFlowNode->HasInput( ServiceParameterName ) ;
+ bool RetVal = DataFlowNode()->HasInput( ServiceParameterName ) ;
// endService( "CNode_Impl::HasInput" );
return RetVal ;
}
SUPERV::GraphState CNode_Impl::State() {
// beginService( "CNode_Impl::State" );
SUPERV::GraphState RetVal = SUPERV::EditingState ;
- GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
- if ( _DataFlowExecutor && !_DataFlowEditor->EditedAfterExecution() ) {
- //JR : 12/06/03 if ( _DataFlowExecutor ) {
+ GraphExecutor::DataFlow * aDataFlowExecutor = DataFlowEditor()->Executor() ;
+ if ( aDataFlowExecutor && !DataFlowEditor()->EditedAfterExecution() ) {
+ //JR : 12/06/03 if ( aDataFlowExecutor ) {
if ( _IsNode ) {
- RetVal = _DataFlowExecutor->State( Name() ) ;
+ RetVal = aDataFlowExecutor->State( Name() ) ;
}
else {
- RetVal = _DataFlowExecutor->State() ;
+ RetVal = aDataFlowExecutor->State() ;
}
}
// endService( "CNode_Impl::State" );
long CNode_Impl::Thread() {
// beginService( "CNode_Impl::Thread" );
long RetVal = 0 ;
- GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
- if ( _DataFlowExecutor ) {
+ GraphExecutor::DataFlow * aDataFlowExecutor = DataFlowEditor()->Executor() ;
+ if ( aDataFlowExecutor ) {
if ( _IsNode ) {
- RetVal = _DataFlowExecutor->Thread( Name() ) ;
+ RetVal = aDataFlowExecutor->Thread( Name() ) ;
}
else {
- RetVal = _DataFlowExecutor->Thread() ;
+ RetVal = aDataFlowExecutor->Thread() ;
}
}
// endService( "CNode_Impl::Thread" );
return RetVal ;
}
-SUPERV::AutomatonState CNode_Impl::AutoState() {
+GraphExecutor::AutomatonState CNode_Impl::AutoState() {
// beginService( "CNode_Impl::AutoState" );
- SUPERV::AutomatonState RetVal = SUPERV::UnKnownState ;
- GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
- if ( _DataFlowExecutor ) {
+ GraphExecutor::AutomatonState RetVal = GraphExecutor::UnKnownState ;
+ GraphExecutor::DataFlow * aDataFlowExecutor = DataFlowEditor()->Executor() ;
+ if ( aDataFlowExecutor ) {
if ( _IsNode ) {
- RetVal = _DataFlowExecutor->AutomatonState( Name() ) ;
+ RetVal = aDataFlowExecutor->AutomatonState( Name() ) ;
}
else {
- RetVal = _DataFlowExecutor->AutomatonState() ;
+ RetVal = aDataFlowExecutor->AutomatonState() ;
}
}
// endService( "CNode_Impl::AutoState" );
SUPERV::ControlState CNode_Impl::Control() {
// beginService( "CNode_Impl::Control" );
SUPERV::ControlState RetVal = SUPERV::VoidState ;
- GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
- if ( _DataFlowExecutor ) {
+ GraphExecutor::DataFlow * aDataFlowExecutor = DataFlowEditor()->Executor() ;
+ if ( aDataFlowExecutor ) {
if ( _IsNode ) {
- RetVal = _DataFlowExecutor->ControlState( Name() ) ;
+ RetVal = aDataFlowExecutor->ControlState( Name() ) ;
}
else {
- RetVal = _DataFlowExecutor->ControlState() ;
+ RetVal = aDataFlowExecutor->ControlState() ;
}
}
// endService( "CNode_Impl::Control" );
void CNode_Impl::ControlClear() {
// beginService( "CNode_Impl::ControlClear" );
// SUPERV::ControlState RetVal = SUPERV::VoidState ;
- GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
- if ( _DataFlowExecutor ) {
+ GraphExecutor::DataFlow * aDataFlowExecutor = DataFlowEditor()->Executor() ;
+ if ( aDataFlowExecutor ) {
if ( _IsNode ) {
- _DataFlowExecutor->ControlClear( Name() ) ;
+ aDataFlowExecutor->ControlClear( Name() ) ;
}
else {
- _DataFlowExecutor->ControlClear() ;
+ aDataFlowExecutor->ControlClear() ;
}
}
// endService( "CNode_Impl::ControlClear" );
bool CNode_Impl::IsReady() {
// beginService( "CNode_Impl::IsReady" );
bool RetVal = false ;
- GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
- if ( _DataFlowExecutor ) {
+ GraphExecutor::DataFlow * aDataFlowExecutor = DataFlowEditor()->Executor() ;
+ if ( aDataFlowExecutor ) {
if ( _IsNode ) {
- RetVal = _DataFlowExecutor->IsReady( Name() ) ;
+ RetVal = aDataFlowExecutor->IsReady( Name() ) ;
}
else {
- RetVal = _DataFlowExecutor->IsReady() ;
+ RetVal = aDataFlowExecutor->IsReady() ;
}
}
// endService( "CNode_Impl::IsReady" );
bool CNode_Impl::IsWaiting() {
// beginService( "CNode_Impl::IsWaiting" );
bool RetVal = false ;
- GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
- if ( _DataFlowExecutor ) {
+ GraphExecutor::DataFlow * aDataFlowExecutor = DataFlowEditor()->Executor() ;
+ if ( aDataFlowExecutor ) {
if ( _IsNode ) {
- RetVal = _DataFlowExecutor->IsWaiting( Name() ) ;
+ RetVal = aDataFlowExecutor->IsWaiting( Name() ) ;
}
else {
- RetVal = _DataFlowExecutor->IsWaiting() ;
+ RetVal = aDataFlowExecutor->IsWaiting() ;
}
}
// endService( "CNode_Impl::IsWaiting" );
bool CNode_Impl::IsRunning() {
// beginService( "CNode_Impl::IsRunning" );
bool RetVal = false ;
- GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
- if ( _DataFlowExecutor ) {
+ GraphExecutor::DataFlow * aDataFlowExecutor = DataFlowEditor()->Executor() ;
+ if ( aDataFlowExecutor ) {
if ( _IsNode ) {
- RetVal = _DataFlowExecutor->IsRunning( Name() ) ;
+ RetVal = aDataFlowExecutor->IsRunning( Name() ) ;
}
else {
- RetVal = _DataFlowExecutor->IsRunning() ;
+ RetVal = aDataFlowExecutor->IsRunning() ;
}
}
// endService( "CNode_Impl::IsRunning" );
bool CNode_Impl::IsDone() {
// beginService( "CNode_Impl::IsDone" );
bool RetVal = false ;
- GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
- if ( _DataFlowExecutor ) {
+ GraphExecutor::DataFlow * aDataFlowExecutor = DataFlowEditor()->Executor() ;
+ if ( aDataFlowExecutor ) {
if ( _IsNode ) {
- RetVal = _DataFlowExecutor->IsDone( Name() ) ;
+ RetVal = aDataFlowExecutor->IsDone( Name() ) ;
}
else {
- RetVal = _DataFlowExecutor->IsDone() ;
+ RetVal = aDataFlowExecutor->IsDone() ;
}
}
// endService( "CNode_Impl::IsDone" );
bool CNode_Impl::IsSuspended() {
// beginService( "CNode_Impl::IsSuspended" );
bool RetVal = false ;
- GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
- if ( _DataFlowExecutor ) {
+ GraphExecutor::DataFlow * aDataFlowExecutor = DataFlowEditor()->Executor() ;
+ if ( aDataFlowExecutor ) {
if ( _IsNode ) {
- RetVal = _DataFlowExecutor->IsSuspended( Name() ) ;
+ RetVal = aDataFlowExecutor->IsSuspended( Name() ) ;
}
else {
- RetVal = _DataFlowExecutor->IsSuspended() ;
+ RetVal = aDataFlowExecutor->IsSuspended() ;
}
}
// endService( "CNode_Impl::IsSuspended" );
bool CNode_Impl::ReadyW() {
// beginService( "CNode_Impl::ReadyW" );
bool RetVal = false ;
- GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
- if ( _DataFlowExecutor ) {
+ GraphExecutor::DataFlow * aDataFlowExecutor = DataFlowEditor()->Executor() ;
+ if ( aDataFlowExecutor ) {
if ( _IsNode ) {
- RetVal = _DataFlowExecutor->ReadyWait( Name() ) ;
+ RetVal = aDataFlowExecutor->ReadyWait( Name() ) ;
}
else {
- RetVal = _DataFlowExecutor->ReadyWait() ;
+ RetVal = aDataFlowExecutor->ReadyWait() ;
}
}
// endService( "CNode_Impl::ReadyW" );
bool CNode_Impl::RunningW() {
// beginService( "CNode_Impl::RunningW" );
bool RetVal = false ;
- GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
- if ( _DataFlowExecutor ) {
+ GraphExecutor::DataFlow * aDataFlowExecutor = DataFlowEditor()->Executor() ;
+ if ( aDataFlowExecutor ) {
if ( _IsNode ) {
- RetVal = _DataFlowExecutor->RunningWait( Name() ) ;
+ RetVal = aDataFlowExecutor->RunningWait( Name() ) ;
}
else {
- RetVal = _DataFlowExecutor->RunningWait() ;
+ RetVal = aDataFlowExecutor->RunningWait() ;
}
}
// endService( "CNode_Impl::RunningW" );
bool CNode_Impl::DoneW() {
// beginService( "CNode_Impl::DoneW" );
bool RetVal = false ;
- GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
- if ( _DataFlowExecutor ) {
+ GraphExecutor::DataFlow * aDataFlowExecutor = DataFlowEditor()->Executor() ;
+ if ( aDataFlowExecutor ) {
if ( _IsNode ) {
- RetVal = _DataFlowExecutor->DoneWait( Name() ) ;
+ RetVal = aDataFlowExecutor->DoneWait( Name() ) ;
}
else {
- RetVal = _DataFlowExecutor->DoneWait() ;
+ RetVal = aDataFlowExecutor->DoneWait() ;
}
}
// endService( "CNode_Impl::DoneW" );
bool CNode_Impl::SuspendedW() {
// beginService( "CNode_Impl::SuspendedW" );
bool RetVal = false ;
- GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
- if ( _DataFlowExecutor ) {
+ GraphExecutor::DataFlow * aDataFlowExecutor = DataFlowEditor()->Executor() ;
+ if ( aDataFlowExecutor ) {
if ( _IsNode ) {
- RetVal = _DataFlowExecutor->SuspendedWait( Name() ) ;
+ RetVal = aDataFlowExecutor->SuspendedWait( Name() ) ;
}
else {
- RetVal = _DataFlowExecutor->SuspendedWait() ;
+ RetVal = aDataFlowExecutor->SuspendedWait() ;
}
}
// endService( "CNode_Impl::SuspendedW" );
void CNode_Impl::ping() {
// beginService( "CNode_Impl::ping" );
bool RetVal = false ;
- GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
- if ( _DataFlowExecutor ) {
+ GraphExecutor::DataFlow * aDataFlowExecutor = DataFlowEditor()->Executor() ;
+ if ( aDataFlowExecutor ) {
if ( _IsNode ) {
- RetVal = _DataFlowExecutor->Ping( Name() ) ;
+ RetVal = aDataFlowExecutor->Ping( Name() ) ;
}
else {
RetVal = false ;
bool CNode_Impl::ContainerKill() {
beginService( "CNode_Impl::ContainerKill" );
bool RetVal = false ;
- GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
- if ( _DataFlowExecutor && _DataFlowEditor->IsExecuting() ) {
+ GraphExecutor::DataFlow * aDataFlowExecutor = DataFlowEditor()->Executor() ;
+ if ( aDataFlowExecutor && IsExecuting() ) {
if ( _IsNode ) {
- RetVal = _DataFlowExecutor->ContainerKill( Name() ) ;
+ RetVal = aDataFlowExecutor->ContainerKill( Name() ) ;
}
else {
- RetVal = _DataFlowExecutor->ContainerKill() ;
+ RetVal = aDataFlowExecutor->ContainerKill() ;
}
}
endService( "CNode_Impl::ContainerKill" );
bool CNode_Impl::Kill() {
beginService( "CNode_Impl::Kill" );
bool RetVal = false ;
- GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
- if ( _DataFlowExecutor ) {
+ GraphExecutor::DataFlow * aDataFlowExecutor = DataFlowEditor()->Executor() ;
+ if ( aDataFlowExecutor ) {
if ( _IsNode ) {
- RetVal = _DataFlowExecutor->Kill( Name() ) ;
+ RetVal = aDataFlowExecutor->Kill( Name() ) ;
+ MESSAGE( "Node " << Name() << " execution was killed : " << RetVal ) ;
}
else {
- RetVal = _DataFlowExecutor->Kill() ;
- MESSAGE( "Graph execution was killed " << RetVal ) ;
+ RetVal = aDataFlowExecutor->Kill() ;
+ MESSAGE( "Graph execution was killed : " << RetVal ) ;
}
}
endService( "CNode_Impl::Kill" );
bool CNode_Impl::KillDone() {
// beginService( "CNode_Impl::KillDone" );
bool RetVal = false ;
- GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
- if ( _DataFlowExecutor ) {
+ GraphExecutor::DataFlow * aDataFlowExecutor = DataFlowEditor()->Executor() ;
+ if ( aDataFlowExecutor ) {
if ( _IsNode ) {
- RetVal = _DataFlowExecutor->KillDone( Name() ) ;
+ RetVal = aDataFlowExecutor->KillDone( Name() ) ;
}
}
// endService( "CNode_Impl::KillDone" );
}
bool CNode_Impl::Stop() {
// beginService( "CNode_Impl::Stop" );
- bool RetVal ; // = _DataFlowExecutor->Stop() ;
+ bool RetVal ; // = aDataFlowExecutor->Stop() ;
// endService( "CNode_Impl::Stop" );
return RetVal ;
}
bool CNode_Impl::Suspend() {
beginService( "CNode_Impl::Suspend" );
bool RetVal = false ;
- GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
- if ( _DataFlowExecutor ) {
+ GraphExecutor::DataFlow * aDataFlowExecutor = DataFlowEditor()->Executor() ;
+ if ( aDataFlowExecutor ) {
if ( _IsNode ) {
MESSAGE( "CNode_Impl::Suspend " << Name() ) ;
- RetVal = _DataFlowExecutor->Suspend( Name() ) ;
+ RetVal = aDataFlowExecutor->Suspend( Name() ) ;
}
else {
- MESSAGE( "CNode_Impl::Suspend " << _DataFlowExecutor->Graph()->Name() ) ;
- RetVal = _DataFlowExecutor->Suspend() ;
+ MESSAGE( "CNode_Impl::Suspend " << aDataFlowExecutor->Graph()->Name() ) ;
+ RetVal = aDataFlowExecutor->Suspend() ;
}
}
endService( "CNode_Impl::Suspend" );
bool CNode_Impl::SuspendDone() {
// beginService( "CNode_Impl::SuspendDone" );
bool RetVal = false ;
- GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
- if ( _DataFlowExecutor ) {
+ GraphExecutor::DataFlow * aDataFlowExecutor = DataFlowEditor()->Executor() ;
+ if ( aDataFlowExecutor ) {
if ( _IsNode ) {
- RetVal = _DataFlowExecutor->SuspendDone( Name() ) ;
+ RetVal = aDataFlowExecutor->SuspendDone( Name() ) ;
}
else {
- RetVal = _DataFlowExecutor->SuspendDone() ;
+ RetVal = aDataFlowExecutor->SuspendDone() ;
}
}
// endService( "CNode_Impl::SuspendDone" );
bool CNode_Impl::Resume() {
bool RetVal = false ;
beginService( "CNode_Impl::Resume" );
- GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
- if ( _DataFlowExecutor ) {
+ GraphExecutor::DataFlow * aDataFlowExecutor = DataFlowEditor()->Executor() ;
+ if ( aDataFlowExecutor ) {
if ( _IsNode ) {
MESSAGE( "CNode_Impl::Resume " << Name() ) ;
- RetVal = _DataFlowExecutor->Resume( Name() ) ;
+ RetVal = aDataFlowExecutor->Resume( Name() ) ;
}
else {
- MESSAGE( "CNode_Impl::Resume " << _DataFlowExecutor->Graph()->Name() ) ;
- RetVal = _DataFlowExecutor->Resume() ;
+ MESSAGE( "CNode_Impl::Resume " << aDataFlowExecutor->Graph()->Name() ) ;
+ RetVal = aDataFlowExecutor->Resume() ;
}
}
endService( "CNode_Impl::Resume" );
return RetVal ;
}
-bool CNode_Impl::Run() {
- beginService( "CNode_Impl::Run" );
- bool RetVal = false ;
- GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
- if ( _DataFlowExecutor ) {
- _DataFlowEditor->EditedAfterExecution( false ) ;
- if ( _IsNode ) {
- RetVal = _DataFlowExecutor->Run( Name() , Name() , false ) ;
- }
- else {
- RetVal = _DataFlowExecutor->Run( false ) ;
- }
- }
- endService( "CNode_Impl::Run" );
- return RetVal ;
-}
-
-bool CNode_Impl::ReRun() {
- beginService( "CNode_Impl::ReRun" );
- bool RetVal = false ;
- GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
- if ( _DataFlowExecutor ) {
- _DataFlowEditor->EditedAfterExecution( false ) ;
- if ( _IsNode ) {
- RetVal = _DataFlowExecutor->Run( Name() , Name() , false ) ;
- }
- else if ( DataFlowEditor()->IsEditing() ) {
- // RetVal = _DataFlowExecutor->Run( false ) ;
- return ((Graph_Impl::Graph_Impl *) this)->Graph_Impl::Run() ;
- }
- }
- endService( "CNode_Impl::ReRun" );
- return RetVal ;
-}
-
-bool CNode_Impl::ReRunAt( const char * aNodeName ) {
- beginService( "CNode_Impl::ReRunAt" );
- bool RetVal = false ;
- GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
- if ( _DataFlowExecutor ) {
- _DataFlowEditor->EditedAfterExecution( false ) ;
- if ( _IsNode ) {
- RetVal = _DataFlowExecutor->Run( Name() , aNodeName , false ) ;
- }
- }
- endService( "CNode_Impl::ReRunAt" );
- return RetVal ;
-}
-
-bool CNode_Impl::ReStart() {
- beginService( "CNode_Impl::ReStart" );
- bool RetVal = false ;
- GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
- if ( _DataFlowExecutor ) {
+long CNode_Impl::CpuUsed() {
+ long RetVal = 0 ;
+ GraphExecutor::DataFlow * aDataFlowExecutor = DataFlowEditor()->Executor() ;
+ if ( aDataFlowExecutor ) {
if ( _IsNode ) {
- RetVal = _DataFlowExecutor->Run( Name() , Name() , true ) ;
+ RetVal = aDataFlowExecutor->CpuUsed( Name() ) ;
}
else {
- RetVal = _DataFlowExecutor->Run( true ) ;
+ RetVal = aDataFlowExecutor->CpuUsed() ;
}
}
- endService( "CNode_Impl::ReStart" );
return RetVal ;
}
-bool CNode_Impl::ReStartAt( const char * aNodeName ) {
- beginService( "CNode_Impl::ReStartAt" );
- bool RetVal = false ;
- GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
- if ( _DataFlowExecutor ) {
- if ( _IsNode ) {
- RetVal = _DataFlowExecutor->Run( Name() , aNodeName , true ) ;
+bool CNode_Impl::IsExecuting() {
+ bool RetVal = false;
+ if ( !IsMacro() && DataFlowEditor() && DataFlowEditor()->Executor() ) {
+ // asv : the statement below normally does not return true, Executor_OutNode
+ // sets Editor->Editing() after finishing of execution (see Executor_OutNode.cxx)
+ if ( DataFlowEditor()->IsExecuting() && DataFlowEditor()->Executor()->IsDone() ) {
+ DataFlowEditor()->Editing();
}
- }
- endService( "CNode_Impl::ReStartAt" );
- return RetVal ;
-}
-long CNode_Impl::CpuUsed() {
- long RetVal = 0 ;
- GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
- if ( _DataFlowExecutor ) {
- if ( _IsNode ) {
- RetVal = _DataFlowExecutor->CpuUsed( Name() ) ;
- }
- else {
- RetVal = _DataFlowExecutor->CpuUsed() ;
- }
+ RetVal = DataFlowEditor()->IsExecuting();
}
- return RetVal ;
+ return RetVal;
}
-
-