From eb16340390882b548cde71c83aca546e1ce18130 Mon Sep 17 00:00:00 2001 From: rahuel Date: Tue, 30 Aug 2005 06:15:59 +0000 Subject: [PATCH] Remove of obsolete methods SetValue method name instead of Value for clarification of code --- src/GraphBase/DataFlowBase_DataPort.cxx | 15 ++++++++------- src/GraphBase/DataFlowBase_DataPort.hxx | 11 +++++------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/GraphBase/DataFlowBase_DataPort.cxx b/src/GraphBase/DataFlowBase_DataPort.cxx index 4e7c3e1..66511ee 100644 --- a/src/GraphBase/DataFlowBase_DataPort.cxx +++ b/src/GraphBase/DataFlowBase_DataPort.cxx @@ -66,7 +66,8 @@ void GraphBase::DataPort::InitialValues(CORBA::Any aValue ) { } else if ( !strcmp( Type , "string" ) ) { cdebug << "string" << endl ; - InitialValue <<= (char *) ""; +// InitialValue <<= (char *) NULL ; + InitialValue <<= "" ; } else if ( !strcmp( Type , "boolean" ) ) { cdebug << "boolean" << endl ; @@ -109,20 +110,20 @@ void GraphBase::DataPort::InitialValues(CORBA::Any aValue ) { _Value = &_InitialValue ; } -void GraphBase::DataPort::Value( const CORBA::Any & aDataValue ) { +void GraphBase::DataPort::SetValue( const CORBA::Any & aDataValue ) { CORBA::Any * aValue = new CORBA::Any( aDataValue ) ; - Value( aValue ) ; + SetValue( aValue ) ; } #define ValueTrace 0 -void GraphBase::DataPort::Value( const CORBA::Any * aDataValue ) { -// cdebug << pthread_self() << " Value(aDataValue) --> pthread_mutex_lock " << &_MutexWait +void GraphBase::DataPort::SetValue( const CORBA::Any * aDataValue ) { +// cdebug << pthread_self() << " SetValue(aDataValue) --> pthread_mutex_lock " << &_MutexWait // << endl ; if ( pthread_mutex_lock( &_MutexWait ) ) { perror( "lock DataValue" ) ; exit( 0 ) ; } -// cdebug << pthread_self() << " Value(aDataValue) pthread_mutex_locked " << &_MutexWait +// cdebug << pthread_self() << " SetValue(aDataValue) pthread_mutex_locked " << &_MutexWait // << endl ; delete _theValue ; @@ -357,7 +358,7 @@ void GraphBase::DataPort::Value( const CORBA::Any * aDataValue ) { perror( "unlock DataValue" ) ; exit( 0 ) ; } -// cdebug << pthread_self() << " Value(aDataValue) --> pthread_mutex_unlocked " << &_MutexWait +// cdebug << pthread_self() << " SetValue(aDataValue) --> pthread_mutex_unlocked " << &_MutexWait // << endl ; } diff --git a/src/GraphBase/DataFlowBase_DataPort.hxx b/src/GraphBase/DataFlowBase_DataPort.hxx index 89bf02a..ee1b4be 100644 --- a/src/GraphBase/DataFlowBase_DataPort.hxx +++ b/src/GraphBase/DataFlowBase_DataPort.hxx @@ -46,7 +46,7 @@ namespace GraphBase { bool _Done ; pthread_mutex_t _MutexWait ; - void Value( const CORBA::Any * aValue ) ; + void SetValue( const CORBA::Any * aValue ) ; public : @@ -58,18 +58,17 @@ namespace GraphBase { virtual ~DataPort() ; void InitialValues(CORBA::Any aValue ) ; - void Value (const CORBA::Any & aValue ) ; -// void Value( const CORBA::Any * aValue ) ; -// void Value( const CORBA::Any ** aValue ) ; -// CORBA::Any const * Value() const ; +//SetValue is under the control of _MutexWait because of concurrent access with Value() + void SetValue (const CORBA::Any & aValue ) ; const CORBA::Any Value() const ; bool BoolValue() const ; -// const CORBA::Any ** ValuePtr() const ; +//PortState is NOT under the control of _MutexWait because there is no problem of concurrent access void PortState( SUPERV::GraphState aPortState ) { _PortState = aPortState ; } ; SUPERV::GraphState PortState() { return _PortState ; } ; +//PortDone is NOT under the control of _MutexWait because there is no problem of concurrent access void PortDone( bool aDone ) { // cdebug << "ChgDone(.) " << NodeName() << " " << PortName() << " " // << _Done << " -> " << aDone << endl ; -- 2.39.2