diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-08-26 15:11:47 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-08-26 15:11:47 (GMT) |
commit | 0a22a276cfff2155cbaf4939d75c257dfdb46932 (patch) | |
tree | efd057b2bfee89557636819433bc7ecf932153cd /src/uscxml/transform/FlatStateIdentifier.h | |
parent | f3e7f0bb9866edb30682b1e1b72db7c4f6946378 (diff) | |
download | uscxml-0a22a276cfff2155cbaf4939d75c257dfdb46932.zip uscxml-0a22a276cfff2155cbaf4939d75c257dfdb46932.tar.gz uscxml-0a22a276cfff2155cbaf4939d75c257dfdb46932.tar.bz2 |
Identify InterpreterIssues at runtime
Diffstat (limited to 'src/uscxml/transform/FlatStateIdentifier.h')
-rw-r--r-- | src/uscxml/transform/FlatStateIdentifier.h | 46 |
1 files changed, 34 insertions, 12 deletions
diff --git a/src/uscxml/transform/FlatStateIdentifier.h b/src/uscxml/transform/FlatStateIdentifier.h index 08451c2..0957e34 100644 --- a/src/uscxml/transform/FlatStateIdentifier.h +++ b/src/uscxml/transform/FlatStateIdentifier.h @@ -135,57 +135,79 @@ public: const std::list<std::string>& getActive() { return active; } + const std::string& getFlatActive() { + return flatActive; + } const std::list<std::string>& getVisited() { return visited; } + const std::string& getFlatVisited() { + return flatVisited; + } const std::map<std::string, std::list<std::string> > & getHistory() { return histories; } + const std::string& getFlatHistory() { + return flatHistories; + } protected: std::list<std::string> active; std::list<std::string> visited; std::map<std::string, std::list<std::string> > histories; + + std::string flatActive; + std::string flatVisited; + std::string flatHistories; + std::string stateId; void initStateId() { std::stringstream stateIdSS; - std::string seperator; - stateIdSS << "active:{"; + std::stringstream flatActiveSS; + flatActiveSS << "active:{"; for (std::list<std::string>::const_iterator actIter = active.begin(); actIter != active.end(); actIter++) { - stateIdSS << seperator << *actIter; + flatActiveSS << seperator << *actIter; seperator = ","; } - stateIdSS << "}"; + flatActiveSS << "}"; + flatActive = flatActiveSS.str(); + stateIdSS << flatActive; if (visited.size() > 0) { + std::stringstream flatVisitedSS; seperator = ""; - stateIdSS << ";visited:{"; + flatVisitedSS << "visited:{"; for (std::list<std::string>::const_iterator visitIter = visited.begin(); visitIter != visited.end(); visitIter++) { - stateIdSS << seperator << *visitIter; + flatVisitedSS << seperator << *visitIter; seperator = ","; } - stateIdSS << "}"; + flatVisitedSS << "}"; + flatVisited = flatVisitedSS.str(); + stateIdSS << ";" << flatVisited; } if (histories.size() > 0) { + std::stringstream flatHistorySS; seperator = ""; - stateIdSS << ";history:{"; + flatHistorySS << "history:{"; for (std::map<std::string, std::list<std::string> >::const_iterator histIter = histories.begin(); histIter != histories.end(); histIter++) { - stateIdSS << seperator << histIter->first << ":{"; + flatHistorySS << seperator << histIter->first << ":{"; seperator = ","; std::string itemSeperator; for (std::list<std::string>::const_iterator histItemIter = histIter->second.begin(); histItemIter != histIter->second.end(); histItemIter++) { - stateIdSS << itemSeperator << *histItemIter; + flatHistorySS << itemSeperator << *histItemIter; itemSeperator = ","; } - stateIdSS << "}"; + flatHistorySS << "}"; } - stateIdSS << "}"; + flatHistorySS << "}"; + flatHistories = flatHistorySS.str(); + stateIdSS << ";" << flatHistories; } stateId = stateIdSS.str(); |