From bc9b16b66a7a72e7f5ac82ab52d17c201d8bd7bb Mon Sep 17 00:00:00 2001 From: rahuel Date: Tue, 30 Aug 2005 06:23:59 +0000 Subject: [PATCH] Error Messages --- .../DataFlowBase_EndOfSwitchNode.hxx | 13 ++----- src/GraphBase/DataFlowBase_Graph.hxx | 37 ++++++++++++++++++- 2 files changed, 40 insertions(+), 10 deletions(-) diff --git a/src/GraphBase/DataFlowBase_EndOfSwitchNode.hxx b/src/GraphBase/DataFlowBase_EndOfSwitchNode.hxx index 93e2599..c6ac446 100644 --- a/src/GraphBase/DataFlowBase_EndOfSwitchNode.hxx +++ b/src/GraphBase/DataFlowBase_EndOfSwitchNode.hxx @@ -44,19 +44,14 @@ namespace GraphBase { ofstream * Graph_fdebug = NULL ) ; virtual ~EndOfSwitchNode() ; - void InitEndSwitchInPortLinked() { // without StreamInPorts and Default - _EndSwitchInPortLinkedNumber = GetNodeInPortsSize() - DataStreamInPortsNumber() - 1 ; - _SwitchWithGOTO = false ; - int i ; - for ( i = 0 ; i < GetNodeInPortsSize()-1 ; i++ ) { - GetChangeNodeInPort( i )->BranchOfSwitchLinked( false ) ; - } } ; - bool DecrEndSwitchInPortLinked( GraphBase::InPort * anInPort ) ; + void InitEndSwitchInPortLinked() ; + bool DecrEndSwitchInPortLinked( GraphBase::InPort * anInPort , + string & anErrorMessage ) ; void SetSwitchWithGOTO() { _SwitchWithGOTO = true ; } ; bool SwitchWithGOTO() { return _SwitchWithGOTO ; } ; - bool CheckEndSwitchInPortsLinked() ; + bool CheckEndSwitchInPortsLinked( string & anErrorMessage ) ; }; diff --git a/src/GraphBase/DataFlowBase_Graph.hxx b/src/GraphBase/DataFlowBase_Graph.hxx index 108d1c1..886eb21 100644 --- a/src/GraphBase/DataFlowBase_Graph.hxx +++ b/src/GraphBase/DataFlowBase_Graph.hxx @@ -90,6 +90,8 @@ namespace GraphBase { // int _SubStreamGraphsSize ; // vector > _SubStreamGraphs ; + string _Messages ; + bool AddLink( GraphBase::ComputingNode *fromNode , GraphBase::OutPort *fromPort , GraphBase::ComputingNode *toNode , @@ -147,12 +149,41 @@ namespace GraphBase { // cdebug << "GetGraphNodeIndex of " << name << " in _MapOfGraphNodes : " // << index << " Node " << hex << (void *) _GraphNodes[ index ] // << dec << " '" << _GraphNodes[ index ]->Name() << "'" << endl ; +#if 0 + cdebug << "Graph::GetGraphNodeIndex " << _GraphNodesSize << " known nodes" << endl; + int i ; + for ( i = 0 ; i < _GraphNodesSize ; i++ ) { + cdebug << "Node" << i << _GraphNodes[ i ]->Name() << endl ; + } + map< string , int >::iterator aMapOfGraphNodesIterator ; + i = 0 ; + for ( aMapOfGraphNodesIterator = _MapOfGraphNodes.begin() ; + aMapOfGraphNodesIterator != _MapOfGraphNodes.end() ; aMapOfGraphNodesIterator++ ) { + cdebug << "MapOfGraphNodes " << i++ << " " << aMapOfGraphNodesIterator->first + << " --> " << aMapOfGraphNodesIterator->second << " - 1" << endl ; + } +#endif return index ; } ; void SetGraphNodeIndex( const char *name , const int index ) { _MapOfGraphNodes[ name ] = index + 1 ; cdebug << "SetGraphNodeIndex of " << name << " in _MapOfGraphNodes : " << index << " Node " << (void *) _GraphNodes[ index ] - << " '" << _GraphNodes[ index ]->Name() << "'" << endl ; + << " '" << _GraphNodes[ index ]->Name() << "' MapOfGraphNodessize " + << GetGraphNodeSize() << endl ; +#if 1 + cdebug << "Graph::SetGraphNodeIndex " << _GraphNodesSize << " known nodes" << endl; + int i ; + for ( i = 0 ; i < _GraphNodesSize ; i++ ) { + cdebug << "Node" << i << _GraphNodes[ i ]->Name() << endl ; + } + map< string , int >::iterator aMapOfGraphNodesIterator ; + i = 0 ; + for ( aMapOfGraphNodesIterator = _MapOfGraphNodes.begin() ; + aMapOfGraphNodesIterator != _MapOfGraphNodes.end() ; aMapOfGraphNodesIterator++ ) { + cdebug << "MapOfGraphNodes " << i++ << " " << aMapOfGraphNodesIterator->first + << " --> " << aMapOfGraphNodesIterator->second << " - 1" << endl ; + } +#endif } ; void DelGraphNodeIndex( const char *name ) { _MapOfGraphNodes.erase( name ) ; } ; @@ -301,6 +332,10 @@ namespace GraphBase { void SetGraphPorts() ; + string Messages() ; + void ReSetMessages() ; + void SetMessages( string anErrorMessage ) ; + bool CreateService() ; bool InLineServices() ; -- 2.30.2