]> AND Private Git Repository - blast.git/blobdiff - ConnectedInterface.cpp
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
finalized analysis with clkconvert + started testbench gen.
[blast.git] / ConnectedInterface.cpp
index c053aadb708f727f458c6199a7331ea1e3273258..3724417ce32c5ef4cc1ef32f2e0a0ecb58515e42 100644 (file)
@@ -6,15 +6,27 @@
 \r
 ConnectedInterface::ConnectedInterface(AbstractBlock* _owner) : AbstractInterface(_owner) {\r
   connectedFrom = NULL;\r
+  outputPattern = NULL;\r
+  inputModifier = NULL;\r
+      \r
 }\r
 \r
-ConnectedInterface::ConnectedInterface(AbstractBlock* _owner, const QString& _name, const QString& _type, const QString& _width, int _direction, int _purpose) : AbstractInterface(_owner, _name, _type, _width, _direction, _purpose) {\r
-  connectedFrom = NULL;\r
+ConnectedInterface::ConnectedInterface(AbstractBlock* _owner, const QString& _name, int _direction, int _purpose, const QString& _type, const QString& _width) : AbstractInterface(_owner, _name, _direction, _purpose, _type, _width) {\r
+  connectedFrom = NULL;  \r
+  outputPattern = NULL;\r
+  inputModifier = NULL;\r
+}\r
+\r
+ConnectedInterface::~ConnectedInterface() {  \r
+  if (outputPattern != NULL) delete outputPattern;\r
 }\r
 \r
+/* NB/ became useless since disconnectTo does the job\r
\r
 void ConnectedInterface::removeConnectedTo(ConnectedInterface *iface) {\r
-  connectedTo.removeOne(iface);\r
+  connectedTo.removeAll(iface);\r
 }\r
+*/\r
 \r
 void ConnectedInterface::clearConnections() {\r
   connectedFrom = NULL;\r
@@ -25,6 +37,11 @@ void ConnectedInterface::clearConnectedTo() {
   connectedTo.clear();\r
 }\r
 \r
+void ConnectedInterface::setOutputPattern(QList<char>* pattern) {\r
+  if (outputPattern != NULL) delete outputPattern;\r
+  outputPattern = pattern; \r
+}\r
+\r
 void ConnectedInterface::connectTo(ConnectedInterface *iface) {\r
   \r
   connectedTo.append(iface);\r
@@ -83,3 +100,8 @@ ConnectedInterface *ConnectedInterface::getConnectionFromParentGroup() {
   }\r
   return NULL;\r
 }\r
+\r
+void ConnectedInterface::clearInputModifier() {\r
+  if (inputModifier != NULL) delete inputModifier;\r
+  inputModifier = NULL;\r
+}\r