From 2f19fa6e75834fe17bf5883ca3ad1fc6e1cce209 Mon Sep 17 00:00:00 2001 From: rahuel Date: Wed, 9 Mar 2005 08:58:09 +0000 Subject: [PATCH] MESSAGEs --- .../DataFlowExecutor_FiniteStateMachine.cxx | 45 +++++++++---------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/src/GraphExecutor/DataFlowExecutor_FiniteStateMachine.cxx b/src/GraphExecutor/DataFlowExecutor_FiniteStateMachine.cxx index c563b25..90c3af4 100644 --- a/src/GraphExecutor/DataFlowExecutor_FiniteStateMachine.cxx +++ b/src/GraphExecutor/DataFlowExecutor_FiniteStateMachine.cxx @@ -125,7 +125,7 @@ void * start_function( void *p ) ; #define NumberOfEvents GraphExecutor::NumberOfEvents GraphExecutor::FiniteStateMachine::FiniteStateMachine() { -// cdebug_in << "FiniteStateMachine::FiniteStateMachine" << endl; + MESSAGE( "FiniteStateMachine::FiniteStateMachine" ) ; _ControlStateName[ VoidState ] = "VoidState" ; _ControlStateName[ ToSuspendStartState ]= "ToSuspendStartState" ; @@ -459,8 +459,7 @@ GraphExecutor::FiniteStateMachine::FiniteStateMachine() { _GraphExecutingNumber = 0 ; _PyInitModule = false ; _DbgFileNumber = 0 ; -// cdebug_out << "FiniteStateMachine::FiniteStateMachine _TransitionTable " -// << endl; + MESSAGE( "FiniteStateMachine::FiniteStateMachine _TransitionTable " ) ; } void * start_function( void *p ) { @@ -494,17 +493,19 @@ void GraphExecutor::FiniteStateMachine::Executed() { for ( aPyFunction = _MapOfPyFunctions.begin() ; aPyFunction != _MapOfPyFunctions.end() ; aPyFunction++ ) { if ( !strcmp( aPyFunction->first.c_str() , "PyObjRef" ) || !strcmp( aPyFunction->first.c_str() , "PyObjIor" ) ) { - //cout << "GraphExecutor::FiniteStateMachine::Executed " << aPyFunction->first << " keeped ..."<< endl ; + MESSAGE( "GraphExecutor::FiniteStateMachine::Executed " << aPyFunction->first << " keeped ..." + ) ; } else { - //cout << "GraphExecutor::FiniteStateMachine::Executed " << aPyFunction->first << " erased ..."<< endl ; + MESSAGE( "GraphExecutor::FiniteStateMachine::Executed " << aPyFunction->first << " erased ..." + ) ; _MapOfPyFunctions.erase( aPyFunction->first ) ; } } } else { - //cout << "GraphExecutor::FiniteStateMachine::Executed _GraphExecutingNumber " << _GraphExecutingNumber - // << " != 0 ==> no erase" << endl ; + MESSAGE( "GraphExecutor::FiniteStateMachine::Executed _GraphExecutingNumber " + << _GraphExecutingNumber << " != 0 ==> no erase" ) ; } PyUnLock() ; return ; @@ -553,28 +554,25 @@ PyObject * GraphExecutor::FiniteStateMachine::PyFunction( const char * aPyFuncNa PyObject * PyFunctionMapped = _MapOfPyFunctions[ aPyFuncName ] ; if ( _GraphExecutingNumber > 1 && !PyObjRefIor ) { RetVal = PyFunctionMapped ; - //cout << "GraphExecutor::FiniteStateMachine::PyFunction( '" << aPyFuncName << "' ) --> " ; + MESSAGE( "GraphExecutor::FiniteStateMachine::PyFunction( '" << aPyFuncName << "' ) --> " ) ; if ( RetVal ) { - //cout << RetVal << " ob_refcnt " << RetVal->ob_refcnt ; + MESSAGE( RetVal << " ob_refcnt " << RetVal->ob_refcnt ) ; } else { - //cout << " NULL" ; + MESSAGE( " NULL" ) ; } - //cout << endl ; } else { RetVal = PyFunctionMapped ; - //cout << "GraphExecutor::FiniteStateMachine::PyFunction( '" << aPyFuncName << "' ) --> " ; + MESSAGE( "GraphExecutor::FiniteStateMachine::PyFunction( '" << aPyFuncName << "' ) --> " ) ; if ( RetVal && PyObjRefIor ) { - //cout << RetVal << " " << RetVal->ob_refcnt << endl ; + MESSAGE( RetVal << " " << RetVal->ob_refcnt ) ; } else if ( RetVal ) { - //cout << RetVal << " " << RetVal->ob_refcnt << endl ; -// _MapOfPyFunctions.erase( aPyFuncName ) ; -// cout << "GraphExecutor::FiniteStateMachine::PyFunction( '" << aPyFuncName << "' ) erased --> NULL" << endl ; + MESSAGE( RetVal << " " << RetVal->ob_refcnt ) ; } else { - //cout << " NULL" << endl ; + MESSAGE( " NULL" ) ; } } @@ -585,15 +583,15 @@ bool GraphExecutor::FiniteStateMachine::PyFunction( const char * aPyFuncName , P bool RetVal = false ; if ( _MapOfPyFunctions[ aPyFuncName ] != NULL ) { - //PyObject * aPyFunc = _MapOfPyFunctions[ aPyFuncName ] ; - //cout << "GraphExecutor::FiniteStateMachine::PyFunction( '" << aPyFuncName << "' , " << aPyFunction - // << " ) ob_refcnt " << aPyFunction->ob_refcnt << " already mapped : " << aPyFunc << " ob_refcnt " - // << aPyFunc->ob_refcnt << endl ; + PyObject * aPyFunc = _MapOfPyFunctions[ aPyFuncName ] ; + MESSAGE( "GraphExecutor::FiniteStateMachine::PyFunction( '" << aPyFuncName << "' , aPyFunction " + << aPyFunction << " ) ob_refcnt " << aPyFunction->ob_refcnt << " already mapped : " + << aPyFunc << " ob_refcnt " << aPyFunc->ob_refcnt ) ; } else { _MapOfPyFunctions[ aPyFuncName ] = aPyFunction ; - //cout << "GraphExecutor::FiniteStateMachine::PyFunction( '" << aPyFuncName << "' , " << aPyFunction - // << " ) ob_refcnt " << aPyFunction->ob_refcnt << " mapped" << endl ; + MESSAGE( "GraphExecutor::FiniteStateMachine::PyFunction( '" << aPyFuncName << "' ) " << aPyFunction + << " ) ob_refcnt " << aPyFunction->ob_refcnt << " mapped" ) ; RetVal = true ; } @@ -602,6 +600,7 @@ bool GraphExecutor::FiniteStateMachine::PyFunction( const char * aPyFuncName , P bool GraphExecutor::FiniteStateMachine::ErasePyFunction( const char * aPyFuncName ) { + MESSAGE( "GraphExecutor::FiniteStateMachine::ErasePyFunction( '" << aPyFuncName << "' )" ) ; if ( _MapOfPyFunctions[ aPyFuncName ] != NULL ) { _MapOfPyFunctions.erase( aPyFuncName ) ; return true ; -- 2.39.2