diff options
author | rlm <rlm@techsat.com> | 2020-08-31 12:38:13 (GMT) |
---|---|---|
committer | rlm <rlm@techsat.com> | 2020-08-31 12:38:13 (GMT) |
commit | c7558dcb7565b132b66ecd42922b3d9681805866 (patch) | |
tree | 674c0cd2c26ae2e8b3c1ae17ccf267a0c85b1a54 /src | |
parent | 13f06a2b3b346b3e220de8ee4d37b0f67bcb7148 (diff) | |
download | uscxml-c7558dcb7565b132b66ecd42922b3d9681805866.zip uscxml-c7558dcb7565b132b66ecd42922b3d9681805866.tar.gz uscxml-c7558dcb7565b132b66ecd42922b3d9681805866.tar.bz2 |
:Jira: ADSVHTNG-1276 - changes to tascxml:result custom action with additional attributes
Change-Id: I06dc42bebe538c643f0ed7fb6ea6461c4ae604e8
Diffstat (limited to 'src')
-rwxr-xr-x | src/uscxml/transform/ChartToC.cpp | 20 | ||||
-rw-r--r-- | src/uscxml/util/TASCXMLUtils.h | 6 |
2 files changed, 17 insertions, 9 deletions
diff --git a/src/uscxml/transform/ChartToC.cpp b/src/uscxml/transform/ChartToC.cpp index 2f4ac1d..036c670 100755 --- a/src/uscxml/transform/ChartToC.cpp +++ b/src/uscxml/transform/ChartToC.cpp @@ -904,13 +904,15 @@ void ChartToC::writeTypes(std::ostream& stream) { stream << " * All information pertaining to a <tascxml:result> element" << std::endl; stream << " */" << std::endl; stream << "struct uscxml_elem_taresult {" << std::endl; + stream << " const char* resultid;" << std::endl; stream << " const char* verdict;" << std::endl; stream << " const char* timestamp;" << std::endl; stream << " const char* teststep;" << std::endl; stream << " const char* description;" << std::endl; - stream << " const char* resultid;" << std::endl; - stream << " const char* requirementid;" << std::endl; stream << " const char* currentvalue;" << std::endl; + stream << " const char* valuemapping;" << std::endl; + stream << " const char* condition;" << std::endl; + stream << " const char* requirementid;" << std::endl; stream << "};" << std::endl; stream << std::endl; @@ -1897,6 +1899,8 @@ void ChartToC::writeElementInfo(std::ostream& stream) { for (auto iter = taresults.begin(); iter != taresults.end(); iter++, i++) { DOMElement* taresult = *iter; stream << " { "; + stream << std::endl << " /* resultid */ "; + stream << (HAS_ATTR(taresult, tascxml::kXMLCharResultId) ? "\"" + escape(ATTR(taresult, tascxml::kXMLCharResultId)) + "\"" : "NULL") << ", "; stream << std::endl << " /* verdict */ "; stream << (HAS_ATTR(taresult, tascxml::kXMLCharVerdict) ? "\"" + escape(ATTR(taresult, tascxml::kXMLCharVerdict)) + "\"" : "NULL") << ", "; stream << std::endl << " /* timestamp */ "; @@ -1905,12 +1909,14 @@ void ChartToC::writeElementInfo(std::ostream& stream) { stream << (HAS_ATTR(taresult, tascxml::kXMLCharTestStep) ? "\"" + escape(ATTR(taresult, tascxml::kXMLCharTestStep)) + "\"" : "NULL") << ", "; stream << std::endl << " /* description */ "; stream << (HAS_ATTR(taresult, tascxml::kXMLCharDescription) ? "\"" + escape(ATTR(taresult, tascxml::kXMLCharDescription)) + "\"" : "NULL") << ", "; - stream << std::endl << " /* resultid */ "; - stream << (HAS_ATTR(taresult, tascxml::kXMLCharResultId) ? "\"" + escape(ATTR(taresult, tascxml::kXMLCharResultId)) + "\"" : "NULL") << ", "; - stream << std::endl << " /* requirementid */ "; - stream << (HAS_ATTR(taresult, tascxml::kXMLChaRequirementId) ? "\"" + escape(ATTR(taresult, tascxml::kXMLChaRequirementId)) + "\"" : "NULL") << ", "; stream << std::endl << " /* currentvalue */ "; - stream << (HAS_ATTR(taresult, tascxml::kXMLCharCurrentVaue) ? "\"" + escape(ATTR(taresult, tascxml::kXMLCharCurrentVaue)) + "\"" : "NULL"); + stream << (HAS_ATTR(taresult, tascxml::kXMLCharCurrentVaue) ? "\"" + escape(ATTR(taresult, tascxml::kXMLCharCurrentVaue)) + "\"" : "NULL") << ", "; + stream << std::endl << " /* valuemapping */ "; + stream << (HAS_ATTR(taresult, tascxml::kXMLCharValueMapping) ? "\"" + escape(ATTR(taresult, tascxml::kXMLCharValueMapping)) + "\"" : "NULL") << ", "; + stream << std::endl << " /* condition */ "; + stream << (HAS_ATTR(taresult, tascxml::kXMLCharCondition) ? "\"" + escape(ATTR(taresult, tascxml::kXMLCharCondition)) + "\"" : "NULL") << ", "; + stream << std::endl << " /* requirementid */ "; + stream << (HAS_ATTR(taresult, tascxml::kXMLChaRequirementId) ? "\"" + escape(ATTR(taresult, tascxml::kXMLChaRequirementId)) + "\"" : "NULL"); stream << std::endl << " }" << (i + 1 < taresults.size() ? "," : "") << std::endl; taresult->setAttribute(X("documentOrder"), X(toStr(i))); } diff --git a/src/uscxml/util/TASCXMLUtils.h b/src/uscxml/util/TASCXMLUtils.h index 613e837..2c70fab 100644 --- a/src/uscxml/util/TASCXMLUtils.h +++ b/src/uscxml/util/TASCXMLUtils.h @@ -9,13 +9,15 @@ namespace tascxml { static const uscxml::X NS_PREFIX = uscxml::X("tascxml:"); + static const uscxml::X kXMLCharResultId = uscxml::X("resultid"); static const uscxml::X kXMLCharVerdict = uscxml::X("verdict"); static const uscxml::X kXMLCharTimestamp = uscxml::X("timestamp"); static const uscxml::X kXMLCharTestStep = uscxml::X("teststep"); static const uscxml::X kXMLCharDescription = uscxml::X("description"); - static const uscxml::X kXMLCharResultId = uscxml::X("resultid"); - static const uscxml::X kXMLChaRequirementId = uscxml::X("requirementid"); static const uscxml::X kXMLCharCurrentVaue = uscxml::X("currentvalue"); + static const uscxml::X kXMLCharValueMapping = uscxml::X("valuemapping"); + static const uscxml::X kXMLCharCondition = uscxml::X("condition"); + static const uscxml::X kXMLChaRequirementId = uscxml::X("requirementid"); static const uscxml::X kXMLCharId = uscxml::X("id"); static const uscxml::X kXMLCharDataId = uscxml::X("dataid"); |