X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/bc5d59217a24b25c1b913bec4a41dd026d02720c..HEAD:/BlockParameterGeneric.cpp 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()); }