summaryrefslogtreecommitdiffstats
path: root/src/uscxml/transform/ChartToC.cpp
diff options
context:
space:
mode:
authorrlm <rlm@techsat.com>2020-09-17 15:34:26 (GMT)
committerrlm <rlm@techsat.com>2020-09-17 15:34:26 (GMT)
commite873288774fed79a563f890fd7beb9baf116aca5 (patch)
treed85a8d67f01c0808f237170f2c96eb8eb61d6cb6 /src/uscxml/transform/ChartToC.cpp
parentc7558dcb7565b132b66ecd42922b3d9681805866 (diff)
downloaduscxml-e873288774fed79a563f890fd7beb9baf116aca5.zip
uscxml-e873288774fed79a563f890fd7beb9baf116aca5.tar.gz
uscxml-e873288774fed79a563f890fd7beb9baf116aca5.tar.bz2
:Jira: ADSVHTNG-1251 - introduced id attribute for set, get and result actionsts-uscxml-tascxml
Change-Id: Ib94ab2585014519bb28ce6d5484f367df8aae04f
Diffstat (limited to 'src/uscxml/transform/ChartToC.cpp')
-rwxr-xr-xsrc/uscxml/transform/ChartToC.cpp21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/uscxml/transform/ChartToC.cpp b/src/uscxml/transform/ChartToC.cpp
index 036c670..69b046d 100755
--- a/src/uscxml/transform/ChartToC.cpp
+++ b/src/uscxml/transform/ChartToC.cpp
@@ -904,11 +904,12 @@ 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* id;" << 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* teststep;" << std::endl;
stream << " const char* currentvalue;" << std::endl;
stream << " const char* valuemapping;" << std::endl;
stream << " const char* condition;" << std::endl;
@@ -920,9 +921,9 @@ void ChartToC::writeTypes(std::ostream& stream) {
stream << " * All information pertaining to a <tascxml:set> element" << std::endl;
stream << " */" << std::endl;
stream << "struct uscxml_elem_taset {" << std::endl;
+ stream << " const char* id;" << std::endl;
stream << " const char* dataid;" << std::endl;
stream << " const char* value;" << std::endl;
- stream << " const char* valueexpr;" << std::endl;
stream << "};" << std::endl;
stream << std::endl;
@@ -930,6 +931,7 @@ void ChartToC::writeTypes(std::ostream& stream) {
stream << " * All information pertaining to a <tascxml:get> element" << std::endl;
stream << " */" << std::endl;
stream << "struct uscxml_elem_taget {" << std::endl;
+ stream << " const char* id;" << std::endl;
stream << " const char* dataid;" << std::endl;
stream << "};" << std::endl;
stream << std::endl;
@@ -1899,16 +1901,18 @@ void ChartToC::writeElementInfo(std::ostream& stream) {
for (auto iter = taresults.begin(); iter != taresults.end(); iter++, i++) {
DOMElement* taresult = *iter;
stream << " { ";
+ stream << std::endl << " /* id */ ";
+ stream << (HAS_ATTR(taresult, tascxml::kXMLCharId) ? "\"" + escape(ATTR(taresult, tascxml::kXMLCharId)) + "\"" : "NULL") << ", ";
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 */ ";
stream << (HAS_ATTR(taresult, tascxml::kXMLCharTimestamp) ? "\"" + escape(ATTR(taresult, tascxml::kXMLCharTimestamp)) + "\"" : "NULL") << ", ";
- stream << std::endl << " /* teststep */ ";
- 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 << " /* teststep */ ";
+ stream << (HAS_ATTR(taresult, tascxml::kXMLCharTestStep) ? "\"" + escape(ATTR(taresult, tascxml::kXMLCharTestStep)) + "\"" : "NULL") << ", ";
stream << std::endl << " /* currentvalue */ ";
stream << (HAS_ATTR(taresult, tascxml::kXMLCharCurrentVaue) ? "\"" + escape(ATTR(taresult, tascxml::kXMLCharCurrentVaue)) + "\"" : "NULL") << ", ";
stream << std::endl << " /* valuemapping */ ";
@@ -1928,14 +1932,14 @@ void ChartToC::writeElementInfo(std::ostream& stream) {
if (tasets.size() > 0) {
_hasElement.insert("set");
stream << "static const uscxml_elem_taset " << _prefix << "_elem_tasets[" << tasets.size() << "] = {" << std::endl;
- stream << " /* dataid, value, valueexpr */" << std::endl;
+ stream << " /* id, dataid, value */" << std::endl;
size_t i = 0;
for (auto iter = tasets.begin(); iter != tasets.end(); iter++, i++) {
DOMElement* taset = *iter;
stream << " { ";
+ stream << (HAS_ATTR(taset, tascxml::kXMLCharId) ? "\"" + escape(ATTR(taset, tascxml::kXMLCharId)) + "\"" : "NULL") << ", ";
stream << (HAS_ATTR(taset, tascxml::kXMLCharDataId) ? "\"" + escape(ATTR(taset, tascxml::kXMLCharDataId)) + "\"" : "NULL") << ", ";
- stream << (HAS_ATTR(taset, tascxml::kXMLCharValue) ? "\"" + escape(ATTR(taset, tascxml::kXMLCharValue)) + "\"" : "NULL") << ", ";
- stream << (HAS_ATTR(taset, tascxml::kXMLCharValueExpr) ? "\"" + escape(ATTR(taset, tascxml::kXMLCharValueExpr)) + "\"" : "NULL");
+ stream << (HAS_ATTR(taset, tascxml::kXMLCharValue) ? "\"" + escape(ATTR(taset, tascxml::kXMLCharValue)) + "\"" : "NULL");
stream << " }" << (i + 1 < tasets.size() ? "," : "") << std::endl;
taset->setAttribute(X("documentOrder"), X(toStr(i)));
}
@@ -1947,11 +1951,12 @@ void ChartToC::writeElementInfo(std::ostream& stream) {
if (tagets.size() > 0) {
_hasElement.insert("get");
stream << "static const uscxml_elem_taget " << _prefix << "_elem_tagets[" << tagets.size() << "] = {" << std::endl;
- stream << " /* dataid */" << std::endl;
+ stream << " /* id, dataid */" << std::endl;
size_t i = 0;
for (auto iter = tagets.begin(); iter != tagets.end(); iter++, i++) {
DOMElement* taget = *iter;
stream << " { ";
+ stream << (HAS_ATTR(taget, tascxml::kXMLCharId) ? "\"" + escape(ATTR(taget, tascxml::kXMLCharId)) + "\"" : "NULL") << ", ";
stream << (HAS_ATTR(taget, tascxml::kXMLCharDataId) ? "\"" + escape(ATTR(taget, tascxml::kXMLCharDataId)) + "\"" : "NULL");
stream << " }" << (i + 1 < tagets.size() ? "," : "") << std::endl;
taget->setAttribute(X("documentOrder"), X(toStr(i)));