]> Creatis software - cpPlugins.git/blobdiff - lib/cpBaseQtApplication/Port.h
...
[cpPlugins.git] / lib / cpBaseQtApplication / Port.h
index 1f6bda1289c84a196801648df445a238e7637451..45d1fe95ef67dd744c08043636f84c930f0a0c57 100644 (file)
@@ -101,7 +101,11 @@ namespace cpBaseQtApplication
     enum { Type = Superclass::Type + 3 };\r
 \r
   public:\r
-    InputPort( QGraphicsItem* parent = NULL, QGraphicsScene* scene = NULL );\r
+    InputPort(\r
+      QGraphicsItem* parent,\r
+      bool multiple,\r
+      QGraphicsScene* scene = NULL\r
+      );\r
     virtual ~InputPort( );\r
 \r
     virtual void setExtend( bool extend );\r
@@ -111,19 +115,22 @@ namespace cpBaseQtApplication
       { return( this->Type ); }\r
 \r
     void setConnection( Connection* c );\r
-    inline Connection* connection( )\r
-      { return( this->m_Connection ); }\r
-    inline const Connection* connection( ) const\r
-      { return( this->m_Connection ); }\r
+    inline Connection* connection( unsigned int i )\r
+      { return( this->m_Connection[ i ] ); }\r
+    inline const Connection* connection( unsigned int i ) const\r
+      { return( this->m_Connection[ i ] ); }\r
     inline bool hasConnection( ) const\r
-      { return( this->m_Connection != NULL ); }\r
+      { return( this->m_Connection.size( ) > 0 ); }\r
+    inline bool isMultiple( ) const\r
+      { return( this->m_IsMultiple ); }\r
 \r
   protected:\r
     QVariant itemChange( GraphicsItemChange change, const QVariant& value );\r
     virtual void _updateLabels( );\r
 \r
   protected:\r
-    Connection* m_Connection;\r
+    std::vector< Connection* > m_Connection;\r
+    bool m_IsMultiple;\r
   };\r
 \r
   /**\r