#include "FunctionalInterface.h"
#include "GroupBlock.h"
-GroupInterface::GroupInterface(AbstractBlock* _owner, const QString& _name, int _direction, int _purpose) throw(Exception) : ConnectedInterface(_owner,_name,AbstractInterface::Inherited,"",_direction,_purpose) {
+GroupInterface::GroupInterface(AbstractBlock* _owner, const QString& _name, int _direction, int _purpose) throw(Exception) : ConnectedInterface(_owner,_name,_direction,_purpose,"inherited","") {
if (! _owner->isGroupBlock()) throw(Exception(BLOCK_INVALID_TYPE));
connectedFrom = NULL;
AbstractInterface *GroupInterface::clone() {
GroupInterface *inter = new GroupInterface(owner,name,direction, purpose);
- inter->setWidth(width);
- inter->connectFrom(NULL);
-
+ inter->setWidth(width);
return inter;
}
*/
if (iface->isReferenceInterface()) return false;
- if (iface->getConnectedFrom() != NULL) return false;
+ ConnectedInterface* connIface = AI_TO_CON(iface);
+ if (connIface->getConnectedFrom() != NULL) return false;
if (this->getOwner() == iface->getOwner()->getParent()) {
if ((direction == Input) && (iface->getDirection() == Input)) return true;