Salome HOME
Merging with JR_ASV_2_1_0_deb_with_KERNEL_Head branch, which contains many bug fixes...
[modules/superv.git] / src / GraphBase / DataFlowBase_InPort.hxx
index 6aa2f797fcdd1ee5d90abf68010dbed87b74fc21..5716725c62bac8a5152e3564eb826741111c9c92 100644 (file)
@@ -37,21 +37,19 @@ namespace GraphBase {
 
   class InPort : public Port {
 
-    SUPERV::GraphState   _State ;
-    OutPort *            _OutPort ;
-    OutPort *            _InitialOutPort ;
+    private:
+
+      SUPERV::GraphState   _State ;
+      OutPort *            _OutPort ;
+      OutPort *            _InitialOutPort ;
 
     public:   
 
-      InPort() {
-//           cout << "InPort()" << endl ;
-           _State = SUPERV::UndefinedState ;
-           _OutPort = NULL ;
-           _InitialOutPort = NULL ;
-      } ;
+      InPort() ;
       InPort( const char *const * NodeName  ,
               const SALOME_ModuleCatalog::ServicesParameter aserviceParameter ,
-              const SUPERV::KindOfPort aKind = SUPERV::ServiceParameter ) ;
+              const SUPERV::KindOfPort aKind = SUPERV::ServiceParameter ,
+              const SALOME_ModuleCatalog::DataStreamDependency aDependency = SALOME_ModuleCatalog::DATASTREAM_UNDEFINED ) ;
       virtual ~InPort() {
          cdebug << "GraphBase::InPort::~InPort " << PortName() << endl ; } ;
       virtual void destroy() {
@@ -72,19 +70,18 @@ namespace GraphBase {
            return _OutPort ; } ;
       OutPort * GetOutPort() const {
            return _OutPort ; } ;
-      bool IsConnected() const ;
+      const StatusOfPort PortStatus() const ;
+      bool IsNotConnected() const ;
+//      bool IsConnected() const ;
+      bool IsPortConnected() const ;
       bool IsDataConnected() const ;
+      bool IsExternConnected() const ;
       bool AddOutPort( OutPort * anOutPort ) {
            if ( _OutPort )
              return false ;
            _OutPort = anOutPort ;
            return true ; } ;
-      bool ChangeOutPort( OutPort * anOutPort ) {
-           if ( _InitialOutPort == NULL ) {
-             _InitialOutPort = _OutPort ;
-          }
-           _OutPort = anOutPort ;
-           return true ; } ;
+      bool ChangeOutPort( OutPort * anOutPort ) ;
       bool InitialOutPort() {
            if ( _InitialOutPort ) {
              _OutPort = _InitialOutPort ;
@@ -92,11 +89,7 @@ namespace GraphBase {
              return true ;
           }
            return false ; } ;
-      bool RemoveOutPort() {
-           if ( _OutPort == NULL )
-             return false ;
-           _OutPort = NULL ;
-           return RemoveCoords() ; } ;
+      bool RemoveOutPort() ;
 
       void StringValue(ostream & f ) const ;
 
@@ -106,4 +99,6 @@ namespace GraphBase {
 
 ostream & operator<< (ostream &,const GraphBase::InPort &);
 
+ostream & operator<< (ostream &,const SUPERV::GraphState &);
+
 #endif