summaryrefslogtreecommitdiffstats
path: root/src/uscxml/plugins/invoker/umundo
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-01-20 17:34:02 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-01-20 17:34:02 (GMT)
commita0666b3ab907c0036f5e3f036b32e9ec5a6e551d (patch)
treed3db8b6beb8622fa41b87b0934d4702cf0b61819 /src/uscxml/plugins/invoker/umundo
parentf4f05b40c8c464daf1e11df6fcdb63d05766ed1f (diff)
downloaduscxml-a0666b3ab907c0036f5e3f036b32e9ec5a6e551d.zip
uscxml-a0666b3ab907c0036f5e3f036b32e9ec5a6e551d.tar.gz
uscxml-a0666b3ab907c0036f5e3f036b32e9ec5a6e551d.tar.bz2
Regenerated V8 DOM and beautified code
Diffstat (limited to 'src/uscxml/plugins/invoker/umundo')
-rw-r--r--src/uscxml/plugins/invoker/umundo/UmundoInvoker.cpp68
-rw-r--r--src/uscxml/plugins/invoker/umundo/UmundoInvoker.h2
2 files changed, 35 insertions, 35 deletions
diff --git a/src/uscxml/plugins/invoker/umundo/UmundoInvoker.cpp b/src/uscxml/plugins/invoker/umundo/UmundoInvoker.cpp
index 2957078..c269869 100644
--- a/src/uscxml/plugins/invoker/umundo/UmundoInvoker.cpp
+++ b/src/uscxml/plugins/invoker/umundo/UmundoInvoker.cpp
@@ -20,12 +20,12 @@ UmundoInvoker::UmundoInvoker() : _node(NULL), _pub(NULL), _sub(NULL) {
}
UmundoInvoker::~UmundoInvoker() {
- if (_node) {
- if (_sub)
- _node->removeSubscriber(*_sub);
- if (_pub)
- _node->removePublisher(*_pub);
- }
+ if (_node) {
+ if (_sub)
+ _node->removeSubscriber(*_sub);
+ if (_pub)
+ _node->removePublisher(*_pub);
+ }
};
boost::shared_ptr<IOProcessorImpl> UmundoInvoker::create(Interpreter* interpreter) {
@@ -127,37 +127,37 @@ void UmundoInvoker::invoke(const InvokeRequest& req) {
return;
}
if (req.params.find("domain") != req.params.end()) {
- domain = req.params.find("domain")->second;
- }
+ domain = req.params.find("domain")->second;
+ }
_node = getNode(_interpreter, domain);
// add type from .proto or .desc files
if (req.params.find("type") != req.params.end()) {
std::pair<InvokeRequest::params_t::const_iterator, InvokeRequest::params_t::const_iterator> typeRange = req.params.equal_range("types");
for (InvokeRequest::params_t::const_iterator it = typeRange.first; it != typeRange.second; it++) {
- URL typeURI(it->second);
- if (typeURI.toAbsolute(_interpreter->getBaseURI())) {
- std::string filename = typeURI.asLocalFile(".proto");
- umundo::PBSerializer::addProto(filename);
- } else {
- LOG(ERROR) << "umundo invoker has relative type src but nor baseURI set with interpreter.";
- }
+ URL typeURI(it->second);
+ if (typeURI.toAbsolute(_interpreter->getBaseURI())) {
+ std::string filename = typeURI.asLocalFile(".proto");
+ umundo::PBSerializer::addProto(filename);
+ } else {
+ LOG(ERROR) << "umundo invoker has relative type src but nor baseURI set with interpreter.";
+ }
}
}
- // add directory with .proto or .desc files
- if (req.params.find("types") != req.params.end()) {
+ // add directory with .proto or .desc files
+ if (req.params.find("types") != req.params.end()) {
std::pair<InvokeRequest::params_t::const_iterator, InvokeRequest::params_t::const_iterator> typeRange = req.params.equal_range("types");
for (InvokeRequest::params_t::const_iterator it = typeRange.first; it != typeRange.second; it++) {
- URL typeURI(it->second);
- if (typeURI.toAbsolute(_interpreter->getBaseURI()) && typeURI.scheme().compare("file") == 0) {
- umundo::PBSerializer::addProto(typeURI.path());
- } else {
- LOG(ERROR) << "invoke element has relative src URI with no baseURI set.";
- }
+ URL typeURI(it->second);
+ if (typeURI.toAbsolute(_interpreter->getBaseURI()) && typeURI.scheme().compare("file") == 0) {
+ umundo::PBSerializer::addProto(typeURI.path());
+ } else {
+ LOG(ERROR) << "invoke element has relative src URI with no baseURI set.";
+ }
}
- }
-
+ }
+
if (!_isService) {
// use umundo to publish objects on a channel
_pub = new umundo::TypedPublisher(channelName);
@@ -257,15 +257,15 @@ void UmundoInvoker::changed(umundo::ServiceDescription desc) {
std::multimap<std::string, std::pair<std::string, umundo::Node*> > UmundoInvoker::_nodes;
umundo::Node* UmundoInvoker::getNode(Interpreter* 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;
- }
- umundo::Node* node = new umundo::Node(domain);
- std::pair<std::string, std::pair<std::string, umundo::Node*> > pair = std::make_pair(interpreter->getName(), std::make_pair(domain, node));
- _nodes.insert(pair);
- return node;
+ 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;
+ }
+ umundo::Node* node = new umundo::Node(domain);
+ std::pair<std::string, std::pair<std::string, umundo::Node*> > pair = std::make_pair(interpreter->getName(), std::make_pair(domain, node));
+ _nodes.insert(pair);
+ return node;
}
bool UmundoInvoker::protobufToData(Data& data, const google::protobuf::Message& msg) {
diff --git a/src/uscxml/plugins/invoker/umundo/UmundoInvoker.h b/src/uscxml/plugins/invoker/umundo/UmundoInvoker.h
index d54160e..58fa5d8 100644
--- a/src/uscxml/plugins/invoker/umundo/UmundoInvoker.h
+++ b/src/uscxml/plugins/invoker/umundo/UmundoInvoker.h
@@ -58,7 +58,7 @@ protected:
std::map<umundo::ServiceDescription, umundo::ServiceStub*> _svcs;
static std::multimap<std::string, std::pair<std::string, umundo::Node*> > _nodes;
- typedef std::multimap<std::string, std::pair<std::string, umundo::Node*> > _nodes_t;
+ typedef std::multimap<std::string, std::pair<std::string, umundo::Node*> > _nodes_t;
static umundo::Node* getNode(Interpreter* interpreter, const std::string& domain);
};