summaryrefslogtreecommitdiffstats
path: root/src/uscxml/transform/ChartToC.cpp
diff options
context:
space:
mode:
authorrlm <rlm@techsat.com>2019-10-14 16:06:00 (GMT)
committerrlm <rlm@techsat.com>2019-10-14 16:06:00 (GMT)
commitaaff09b1bb94f5353337e0aa9ce8cbd50afb0aec (patch)
treefbb177659fd6cc9c507fb849aee7dafd9cca688e /src/uscxml/transform/ChartToC.cpp
parent52e69b435d5213f37473d54767141d1a3db7f345 (diff)
downloaduscxml-aaff09b1bb94f5353337e0aa9ce8cbd50afb0aec.zip
uscxml-aaff09b1bb94f5353337e0aa9ce8cbd50afb0aec.tar.gz
uscxml-aaff09b1bb94f5353337e0aa9ce8cbd50afb0aec.tar.bz2
:Jira: ADSVHTNG-1055 - separate header file in util/ defining tascxml constantsrefs/changes/52/8952/1
Change-Id: Id754a7faf2a548c8e10e45853c202cdad59ef1e7
Diffstat (limited to 'src/uscxml/transform/ChartToC.cpp')
-rwxr-xr-xsrc/uscxml/transform/ChartToC.cpp29
1 files changed, 11 insertions, 18 deletions
diff --git a/src/uscxml/transform/ChartToC.cpp b/src/uscxml/transform/ChartToC.cpp
index 475e423..979103a 100755
--- a/src/uscxml/transform/ChartToC.cpp
+++ b/src/uscxml/transform/ChartToC.cpp
@@ -27,6 +27,8 @@
#include <boost/algorithm/string.hpp>
#include "uscxml/interpreter/Logging.h"
+#include "uscxml/util/TASCXMLUtils.h"
+
#include <algorithm>
#include <iomanip>
@@ -1818,13 +1820,6 @@ void ChartToC::writeElementInfo(std::ostream& stream) {
stream << std::endl;
}
- static const X kXMLCharVerdict = X("verdict");
- static const X kXMLCharTimestamp = X("timestamp");
- static const X kXMLCharTestStep = X("teststep");
- static const X kXMLCharDescription = X("description");
- static const X kXMLCharResultId = X("resultid");
- static const X kXMLChaRequirementId = X("requirementid");
- static const X kXMLCharCurrentVaue = X("currentvalue");
std::list<DOMElement*> tascxmlresults = DOMUtils::inDocumentOrder({ "tascxml:result" }, _scxml);
if (tascxmlresults.size() > 0) {
_hasElement.insert("result");
@@ -1834,19 +1829,19 @@ void ChartToC::writeElementInfo(std::ostream& stream) {
DOMElement* tascxmlresult = *iter;
stream << " { ";
stream << std::endl << " /* verdict */ ";
- stream << (HAS_ATTR(tascxmlresult, kXMLCharVerdict) ? "\"" + escape(ATTR(tascxmlresult, kXMLCharVerdict)) + "\"" : "NULL") << ", ";
+ stream << (HAS_ATTR(tascxmlresult, tascxml::kXMLCharVerdict) ? "\"" + escape(ATTR(tascxmlresult, tascxml::kXMLCharVerdict)) + "\"" : "NULL") << ", ";
stream << std::endl << " /* timestamp */ ";
- stream << (HAS_ATTR(tascxmlresult, kXMLCharTimestamp) ? "\"" + escape(ATTR(tascxmlresult, kXMLCharTimestamp)) + "\"" : "NULL") << ", ";
+ stream << (HAS_ATTR(tascxmlresult, tascxml::kXMLCharTimestamp) ? "\"" + escape(ATTR(tascxmlresult, tascxml::kXMLCharTimestamp)) + "\"" : "NULL") << ", ";
stream << std::endl << " /* teststep */ ";
- stream << (HAS_ATTR(tascxmlresult, kXMLCharTestStep) ? "\"" + escape(ATTR(tascxmlresult, kXMLCharTestStep)) + "\"" : "NULL") << ", ";
+ stream << (HAS_ATTR(tascxmlresult, tascxml::kXMLCharTestStep) ? "\"" + escape(ATTR(tascxmlresult, tascxml::kXMLCharTestStep)) + "\"" : "NULL") << ", ";
stream << std::endl << " /* description */ ";
- stream << (HAS_ATTR(tascxmlresult, kXMLCharDescription) ? "\"" + escape(ATTR(tascxmlresult, kXMLCharDescription)) + "\"" : "NULL") << ", ";
+ stream << (HAS_ATTR(tascxmlresult, tascxml::kXMLCharDescription) ? "\"" + escape(ATTR(tascxmlresult, tascxml::kXMLCharDescription)) + "\"" : "NULL") << ", ";
stream << std::endl << " /* resultid */ ";
- stream << (HAS_ATTR(tascxmlresult, kXMLCharResultId) ? "\"" + escape(ATTR(tascxmlresult, kXMLCharResultId)) + "\"" : "NULL") << ", ";
+ stream << (HAS_ATTR(tascxmlresult, tascxml::kXMLCharResultId) ? "\"" + escape(ATTR(tascxmlresult, tascxml::kXMLCharResultId)) + "\"" : "NULL") << ", ";
stream << std::endl << " /* requirementid */ ";
- stream << (HAS_ATTR(tascxmlresult, kXMLChaRequirementId) ? "\"" + escape(ATTR(tascxmlresult, kXMLChaRequirementId)) + "\"" : "NULL") << ", ";
+ stream << (HAS_ATTR(tascxmlresult, tascxml::kXMLChaRequirementId) ? "\"" + escape(ATTR(tascxmlresult, tascxml::kXMLChaRequirementId)) + "\"" : "NULL") << ", ";
stream << std::endl << " /* currentvalue */ ";
- stream << (HAS_ATTR(tascxmlresult, kXMLCharCurrentVaue) ? "\"" + escape(ATTR(tascxmlresult, kXMLCharCurrentVaue)) + "\"" : "NULL");
+ stream << (HAS_ATTR(tascxmlresult, tascxml::kXMLCharCurrentVaue) ? "\"" + escape(ATTR(tascxmlresult, tascxml::kXMLCharCurrentVaue)) + "\"" : "NULL");
stream << std::endl << " }" << (i + 1 < tascxmlresults.size() ? ",": "") << std::endl;
tascxmlresult->setAttribute(X("documentOrder"), X(toStr(i)));
@@ -1855,8 +1850,6 @@ void ChartToC::writeElementInfo(std::ostream& stream) {
stream << std::endl;
}
- static const X kXMLCharDataId = X("dataid");
- static const X kXMLCharValue = X("value");
std::list<DOMElement*> tascxmlsets = DOMUtils::inDocumentOrder({ "tascxml:set" }, _scxml);
if (tascxmlsets.size() > 0) {
_hasElement.insert("set");
@@ -1866,9 +1859,9 @@ void ChartToC::writeElementInfo(std::ostream& stream) {
DOMElement* tascxmlset = *iter;
stream << " { ";
stream << std::endl << " /* dataid */ ";
- stream << (HAS_ATTR(tascxmlset, kXMLCharDataId) ? "\"" + escape(ATTR(tascxmlset, kXMLCharDataId)) + "\"" : "NULL") << ", ";
+ stream << (HAS_ATTR(tascxmlset, tascxml::kXMLCharDataId) ? "\"" + escape(ATTR(tascxmlset, tascxml::kXMLCharDataId)) + "\"" : "NULL") << ", ";
stream << std::endl << " /* value */ ";
- stream << (HAS_ATTR(tascxmlset, kXMLCharValue) ? "\"" + escape(ATTR(tascxmlset, kXMLCharValue)) + "\"" : "NULL");
+ stream << (HAS_ATTR(tascxmlset, tascxml::kXMLCharValue) ? "\"" + escape(ATTR(tascxmlset, tascxml::kXMLCharValue)) + "\"" : "NULL");
stream << std::endl << " }" << (i + 1 < tascxmlsets.size() ? ",": "") << std::endl;
tascxmlset->setAttribute(X("documentOrder"), X(toStr(i)));