]> SALOME platform Git repositories - modules/superv.git/blobdiff - src/GraphBase/DataFlowBase_InPort.cxx
Salome HOME
NRI : First integration.
[modules/superv.git] / src / GraphBase / DataFlowBase_InPort.cxx
diff --git a/src/GraphBase/DataFlowBase_InPort.cxx b/src/GraphBase/DataFlowBase_InPort.cxx
new file mode 100644 (file)
index 0000000..98ba633
--- /dev/null
@@ -0,0 +1,52 @@
+using namespace std;
+//=============================================================================
+// File      : DataFlowBase_InPort.cxx
+// Created   : 2002
+// Author    : Jean Rahuel, CEA
+// Project   : SALOME
+// $Header:
+//=============================================================================
+
+#include "DataFlowBase_InPort.hxx"
+#include "DataFlowBase_OutPort.hxx"
+
+char ** _PortStateName ;
+
+GraphBase::InPort::InPort(
+            const char *const * Name  ,
+            const SALOME_ModuleCatalog::ServicesParameter aserviceParameter ,
+            const SUPERV::KindOfPort aKind) :
+          Port( Name , aserviceParameter ) {
+  _OutPort = NULL ;
+  _InitialOutPort = NULL ;
+  Kind( aKind ) ;
+}
+
+//GraphBase::InPort::~InPort() {
+//  cout << "InPort::~InPort()" << endl ;
+//}
+
+bool GraphBase::InPort::IsConnected() const {
+  return ( _OutPort != NULL && !_OutPort->IsDataConnected() ) ;
+}
+
+bool GraphBase::InPort::IsDataConnected() const {
+  return ( _OutPort != NULL && _OutPort->IsDataConnected() ) ;
+}
+
+void GraphBase::InPort::StringValue(ostream & f ) const {
+  if ( _OutPort )
+    _OutPort->StringValue( f ) ;
+  else
+    f << "(undefined)" ;
+}
+
+ostream & operator<< (ostream &f ,const GraphBase::InPort &P) {
+  f << P.PortName() << ", " 
+    << "type : " << P.PortType() << ", " ;
+  f << "from "
+    << P.NodeName() << ", ";
+
+  return f;
+}
+