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

Private GIT Repository
moved generate vhdl methods
[blast.git] / AbstractInterface.cpp
index c03cba9f082953cd6bf16cfbe8f468f73f173f36..a32f78e6d8c0d5130bcfc1ea48f977a01574bd02 100644 (file)
@@ -1,6 +1,7 @@
 #include "AbstractInterface.h"
 #include "BlockParameterPort.h"
 #include "AbstractBlock.h"
+#include "Parameters.h"
 
 AbstractInterface::AbstractInterface(AbstractBlock* _owner) {
 
@@ -18,7 +19,7 @@ AbstractInterface::AbstractInterface(AbstractBlock* _owner) {
 AbstractInterface::AbstractInterface(AbstractBlock* _owner, const QString& _name, int _direction, int _purpose, const QString& _type, const QString& _width, int _endianess) {
 
   owner = _owner;  
-  name = _name;
+  name = Parameters::normalizeName(_name);
   width = _width;
   direction = _direction;
   purpose = _purpose;
@@ -29,7 +30,7 @@ AbstractInterface::AbstractInterface(AbstractBlock* _owner, const QString& _name
 
 AbstractInterface::AbstractInterface(AbstractInterface* other) {
   owner = NULL;
-  name = other->name;
+  name = Parameters::normalizeName(other->name);
   type = other->type;
   width = other->width;
   direction = other->direction;
@@ -38,6 +39,10 @@ AbstractInterface::AbstractInterface(AbstractInterface* other) {
   associatedIface = NULL;
 }
 
+void AbstractInterface::setName(const QString& _name) {
+  name = Parameters::normalizeName(_name);
+}
+
 AbstractInterface::~AbstractInterface() {
 
 }