\r
AbstractBlock::~AbstractBlock() {\r
\r
- foreach(AbstractInterface* iface, inputs) {\r
- delete iface;\r
- }\r
- foreach(AbstractInterface* iface, outputs) {\r
- delete iface;\r
- }\r
- foreach(AbstractInterface* iface, bidirs) {\r
- delete iface;\r
- }\r
- inputs.clear();\r
- outputs.clear();\r
- bidirs.clear();\r
+ removeAllInterfaces();\r
+\r
foreach(BlockParameter* p, params) {\r
delete p;\r
}\r
delete inter;\r
}\r
\r
+void AbstractBlock::removeAllInterfaces() {\r
+\r
+ foreach(AbstractInterface* iface, inputs) {\r
+ delete iface;\r
+ }\r
+ foreach(AbstractInterface* iface, outputs) {\r
+ delete iface;\r
+ }\r
+ foreach(AbstractInterface* iface, bidirs) {\r
+ delete iface;\r
+ }\r
+ inputs.clear();\r
+ outputs.clear();\r
+ bidirs.clear();\r
+\r
+}\r
+\r
void AbstractBlock::defineBlockParam(BlockParameter *param)\r
{\r
cout << "definition of param : " << param->getName().toStdString() << endl;\r