X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/14cd6d834ab531525a51c6a6992583b3e9143e02..HEAD:/BlockParameterGeneric.cpp?ds=inline diff --git a/BlockParameterGeneric.cpp b/BlockParameterGeneric.cpp index 14b8c59..4ba6c8e 100644 --- a/BlockParameterGeneric.cpp +++ b/BlockParameterGeneric.cpp @@ -75,6 +75,20 @@ QString BlockParameterGeneric::toVHDL(int context, int flags) { ret = formatNoValue.arg(name).arg(typeStr); } } + else if (type == String) { + typeStr = "string"; + if (!userValue.isNull()) { + valueStr = "\""+userValue.toString()+"\""; + ret = formatValue.arg(name).arg(typeStr).arg(valueStr); + } + else if (!defaultValue.isNull()) { + valueStr = "\""+defaultValue.toString()+"\""; + ret = formatValue.arg(name).arg(typeStr).arg(valueStr); + } + else { + ret = formatNoValue.arg(name).arg(typeStr); + } + } else { typeStr = getTypeString(); if (!userValue.isNull()) { @@ -109,6 +123,9 @@ QString BlockParameterGeneric::toVHDL(int context, int flags) { if ((type == Boolean)||(type == Bit)) { ret = format.arg(name).arg("'"+userValue.toString()+"'"); } + else if (type == String) { + ret = format.arg(name).arg("\""+userValue.toString()+"\""); + } else { ret = format.arg(name).arg(userValue.toString()); } @@ -117,6 +134,9 @@ QString BlockParameterGeneric::toVHDL(int context, int flags) { if ((type == Boolean)||(type == Bit)) { ret = format.arg(name).arg("'"+defaultValue.toString()+"'"); } + else if (type == String) { + ret = format.arg(name).arg("\""+defaultValue.toString()+"\""); + } else { ret = format.arg(name).arg(defaultValue.toString()); }