X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/c25a6c891bde475aa51b4c4f5d42ecd7540910bb..18fecf25efe710631fabecbb9f689c2997fdfe18:/AbstractBlock.cpp?ds=sidebyside diff --git a/AbstractBlock.cpp b/AbstractBlock.cpp index 13adcae..336b677 100644 --- a/AbstractBlock.cpp +++ b/AbstractBlock.cpp @@ -3,9 +3,11 @@ #include #include "AbstractInterface.h" #include "BlockParameter.h" +#include "Parameters.h" #include "GroupBlock.h" #include "ConnectedInterface.h" + AbstractBlock::AbstractBlock() { name = ""; parent = NULL; @@ -13,7 +15,7 @@ AbstractBlock::AbstractBlock() { /* AbstractBlock::AbstractBlock(const QString& _name) { - name = normalizeName(_name); + name = Parameters::normalizeName(_name); parent = NULL; } */ @@ -29,7 +31,7 @@ AbstractBlock::~AbstractBlock() { } void AbstractBlock::setName(const QString& str) { - name = normalizeName(str); + name = Parameters::normalizeName(str); } void AbstractBlock::setParent(AbstractBlock* _parent) { @@ -239,12 +241,7 @@ QList AbstractBlock::getWishboneParameters() { return lst; } -QString AbstractBlock::normalizeName(const QString &name) { - QString s = name; - s.replace(QRegularExpression("[^a-zA-Z0-9_]"),"_"); - s.replace(QRegularExpression("[_]+"),"_"); - return s; -} + void AbstractBlock::connectClkReset() throw(Exception) {