summaryrefslogtreecommitdiffstats
path: root/src/uscxml/plugins/invoker/umundo/UmundoInvoker.cpp
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-07-22 12:38:43 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-07-22 12:38:43 (GMT)
commitf2d8c967076e5d8ebd3ca718e14edef8acb5f87c (patch)
tree0bed80b7ff8081a6108e7c847a4489de272679c8 /src/uscxml/plugins/invoker/umundo/UmundoInvoker.cpp
parent7bd0256239f247ed01ee6c673e31283c794bb3d0 (diff)
downloaduscxml-f2d8c967076e5d8ebd3ca718e14edef8acb5f87c.zip
uscxml-f2d8c967076e5d8ebd3ca718e14edef8acb5f87c.tar.gz
uscxml-f2d8c967076e5d8ebd3ca718e14edef8acb5f87c.tar.bz2
Removed iOS project again
Diffstat (limited to 'src/uscxml/plugins/invoker/umundo/UmundoInvoker.cpp')
-rw-r--r--src/uscxml/plugins/invoker/umundo/UmundoInvoker.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/uscxml/plugins/invoker/umundo/UmundoInvoker.cpp b/src/uscxml/plugins/invoker/umundo/UmundoInvoker.cpp
index 2b3377e..081842f 100644
--- a/src/uscxml/plugins/invoker/umundo/UmundoInvoker.cpp
+++ b/src/uscxml/plugins/invoker/umundo/UmundoInvoker.cpp
@@ -247,7 +247,11 @@ void UmundoInvoker::receive(void* object, umundo::Message* msg) {
// get meta fields into event
std::map<std::string, std::string>::const_iterator metaIter = msg->getMeta().begin();
while(metaIter != msg->getMeta().end()) {
- event.data.compound[metaIter->first] = Data(metaIter->second, Data::VERBATIM);
+ if (isNumeric(metaIter->second.c_str(), 10)) {
+ event.data.compound[metaIter->first] = Data(metaIter->second, Data::INTERPRETED);
+ } else {
+ event.data.compound[metaIter->first] = Data(metaIter->second, Data::VERBATIM);
+ }
metaIter++;
}
@@ -309,9 +313,13 @@ std::multimap<std::string, std::pair<std::string, boost::weak_ptr<umundo::Node>
boost::shared_ptr<umundo::Node> UmundoInvoker::getNode(InterpreterImpl* interpreter, const std::string& domain) {
std::pair<_nodes_t::iterator, _nodes_t::iterator> range = _nodes.equal_range(interpreter->getName());
for (_nodes_t::iterator it = range.first; it != range.second; it++) {
- if (it->second.first.compare(domain) == 0)
- return it->second.second.lock();
+ if (it->second.first.compare(domain) == 0) {
+ boost::shared_ptr<umundo::Node> node = it->second.second.lock();
+ if (node)
+ return node;
+ }
}
+ // create a new node
boost::shared_ptr<umundo::Node> node = boost::shared_ptr<umundo::Node>(new umundo::Node(domain));
std::pair<std::string, std::pair<std::string, boost::weak_ptr<umundo::Node> > > pair = std::make_pair(interpreter->getName(), std::make_pair(domain, node));
_nodes.insert(pair);