summaryrefslogtreecommitdiffstats
path: root/src/uscxml/plugins
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-10-26 23:47:24 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-10-26 23:47:24 (GMT)
commit45ba8b93098f4f64a2dbc1e0a4c15c5ddb1d6559 (patch)
treec82a47a2dfb417bb5f0305254f45fa84d69e0a57 /src/uscxml/plugins
parentcb4356f33044fd42958cdede5dfe93ef4516173a (diff)
downloaduscxml-45ba8b93098f4f64a2dbc1e0a4c15c5ddb1d6559.zip
uscxml-45ba8b93098f4f64a2dbc1e0a4c15c5ddb1d6559.tar.gz
uscxml-45ba8b93098f4f64a2dbc1e0a4c15c5ddb1d6559.tar.bz2
Performance: replaced boost::iequals for strings by inline function
Diffstat (limited to 'src/uscxml/plugins')
-rw-r--r--src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp10
-rw-r--r--src/uscxml/plugins/datamodel/xpath/XPathDataModel.cpp18
-rw-r--r--src/uscxml/plugins/element/fetch/FetchElement.cpp16
-rw-r--r--src/uscxml/plugins/element/file/FileElement.cpp16
-rw-r--r--src/uscxml/plugins/element/postpone/PostponeElement.cpp6
-rw-r--r--src/uscxml/plugins/invoker/audio/OpenALInvoker.cpp18
-rw-r--r--src/uscxml/plugins/invoker/ffmpeg/FFMPEGInvoker.cpp8
-rw-r--r--src/uscxml/plugins/invoker/filesystem/dirmon/DirMonInvoker.cpp8
-rw-r--r--src/uscxml/plugins/invoker/graphics/openscenegraph/OSGInvoker.cpp32
-rw-r--r--src/uscxml/plugins/invoker/graphics/openscenegraph/converter/OSGConverter.cpp6
-rw-r--r--src/uscxml/plugins/invoker/heartbeat/HeartbeatInvoker.cpp8
-rw-r--r--src/uscxml/plugins/invoker/im/IMInvoker.cpp2
-rw-r--r--src/uscxml/plugins/invoker/miles/MilesSessionInvoker.cpp6
-rw-r--r--src/uscxml/plugins/invoker/xhtml/XHTMLInvoker.cpp8
-rw-r--r--src/uscxml/plugins/ioprocessor/scxml/SCXMLIOProcessor.cpp4
15 files changed, 83 insertions, 83 deletions
diff --git a/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp b/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp
index 5391d68..1c50e1d 100644
--- a/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp
+++ b/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp
@@ -351,7 +351,7 @@ void SWIDataModel::setForeach(const std::string& item,
void SWIDataModel::eval(const Element<std::string>& scriptElem, const std::string& expr) {
SET_PL_CONTEXT
- if (scriptElem && HAS_ATTR(scriptElem, "type") && boost::iequals(ATTR(scriptElem, "type"), "query")) {
+ if (scriptElem && HAS_ATTR(scriptElem, "type") && iequals(ATTR(scriptElem, "type"), "query")) {
evalAsBool(expr);
} else {
URL localPLFile = URL::toLocalFile(expr, ".pl");
@@ -451,9 +451,9 @@ void SWIDataModel::assign(const Element<std::string>& assignElem,
std::string type;
if (HAS_ATTR(assignElem, "type")) {
type = ATTR(assignElem, "type");
- if(boost::iequals(type, "append")) {
+ if(iequals(type, "append")) {
callAssert = "assertz";
- } else if(boost::iequals(type, "prepend")) {
+ } else if(iequals(type, "prepend")) {
callAssert = "asserta";
}
}
@@ -471,13 +471,13 @@ void SWIDataModel::assign(const Element<std::string>& assignElem,
child = node.getNextSibling();
}
domUrl = URL::toLocalFile(xmlDoc.str(), ".pl");
- if (boost::iequals(type, "retract"))
+ if (iequals(type, "retract"))
PlCall("retractall", PlCompound(predicate.c_str(), 1));
dataInitStr << "load_xml_file('" << domUrl.asLocalFile(".pl") << "', XML), copy_term(XML,DATA), " << callAssert << "(" << predicate << "(DATA))";
PlCall(dataInitStr.str().c_str());
} else if (json) {
std::stringstream dataInitStr;
- if (boost::iequals(type, "retract"))
+ if (iequals(type, "retract"))
PlCall("retractall", PlCompound(predicate.c_str(), 1));
dataInitStr << "json_to_prolog(" << expr << ", JSON), assert(" << predicate << "(JSON))";
PlCall(dataInitStr.str().c_str());
diff --git a/src/uscxml/plugins/datamodel/xpath/XPathDataModel.cpp b/src/uscxml/plugins/datamodel/xpath/XPathDataModel.cpp
index 35f46ef..9f8ff90 100644
--- a/src/uscxml/plugins/datamodel/xpath/XPathDataModel.cpp
+++ b/src/uscxml/plugins/datamodel/xpath/XPathDataModel.cpp
@@ -208,7 +208,7 @@ void XPathDataModel::setEvent(const Event& event) {
Node<std::string> oldEventElem = _datamodel.getFirstChild();
while(oldEventElem) {
if (oldEventElem.getNodeType() == Node_base::ELEMENT_NODE) {
- if (HAS_ATTR(oldEventElem, "id") && boost::iequals(ATTR(oldEventElem, "id"), "_event"))
+ if (HAS_ATTR(oldEventElem, "id") && iequals(ATTR(oldEventElem, "id"), "_event"))
break;
}
oldEventElem = oldEventElem.getNextSibling();
@@ -640,7 +640,7 @@ void XPathDataModel::assign(const NodeSet<std::string>& key,
}
case Node_base::ELEMENT_NODE: {
Element<std::string> element(node);
- if (HAS_ATTR(assignElem, "type") && boost::iequals(ATTR(assignElem, "type"), "addattribute")) {
+ if (HAS_ATTR(assignElem, "type") && iequals(ATTR(assignElem, "type"), "addattribute")) {
// addattribute: Add an attribute with the name specified by 'attr'
// and value specified by 'expr' to the node specified by 'location'.
if (!HAS_ATTR(assignElem, "attr"))
@@ -703,19 +703,19 @@ void XPathDataModel::assign(const Element<std::string>& key,
return;
if (false) {
- } else if (assignElem && HAS_ATTR(assignElem, "type") && boost::iequals(ATTR(assignElem, "type"), "firstchild")) {
+ } else if (assignElem && HAS_ATTR(assignElem, "type") && iequals(ATTR(assignElem, "type"), "firstchild")) {
// firstchild: Insert the value specified by 'expr' before all of the children at 'location'.
for (int i = value.size(); i; i--) {
Node<std::string> importedNode = (value[i-1].getOwnerDocument() == _doc ? value[i-1].cloneNode(true) : _doc.importNode(value[i-1], true));
element.insertBefore(importedNode, element.getFirstChild());
}
- } else if (assignElem && HAS_ATTR(assignElem, "type") && boost::iequals(ATTR(assignElem, "type"), "lastchild")) {
+ } else if (assignElem && HAS_ATTR(assignElem, "type") && iequals(ATTR(assignElem, "type"), "lastchild")) {
// lastchild: Insert the value specified by 'expr' after all of the children at 'location'.
for (int i = 0; i < value.size(); i++) {
Node<std::string> importedNode = (value[i].getOwnerDocument() == _doc ? value[i].cloneNode(true) : _doc.importNode(value[i], true));
element.appendChild(importedNode);
}
- } else if (assignElem && HAS_ATTR(assignElem, "type") && boost::iequals(ATTR(assignElem, "type"), "previoussibling")) {
+ } else if (assignElem && HAS_ATTR(assignElem, "type") && iequals(ATTR(assignElem, "type"), "previoussibling")) {
// previoussibling: Insert the value specified by 'expr' before the
// node specified by 'location', keeping the same parent.
Node<std::string> parent = element.getParentNode();
@@ -725,7 +725,7 @@ void XPathDataModel::assign(const Element<std::string>& key,
Node<std::string> importedNode = (value[i].getOwnerDocument() == _doc ? value[i].cloneNode(true) : _doc.importNode(value[i], true));
parent.insertBefore(importedNode, element);
}
- } else if (assignElem && HAS_ATTR(assignElem, "type") && boost::iequals(ATTR(assignElem, "type"), "nextsibling")) {
+ } else if (assignElem && HAS_ATTR(assignElem, "type") && iequals(ATTR(assignElem, "type"), "nextsibling")) {
// nextsibling: Insert the value specified by 'expr' after the node
// specified by 'location', keeping the same parent.
Node<std::string> parent = element.getParentNode();
@@ -740,7 +740,7 @@ void XPathDataModel::assign(const Element<std::string>& key,
parent.appendChild(importedNode);
}
}
- } else if (assignElem && HAS_ATTR(assignElem, "type") && boost::iequals(ATTR(assignElem, "type"), "replace")) {
+ } else if (assignElem && HAS_ATTR(assignElem, "type") && iequals(ATTR(assignElem, "type"), "replace")) {
// replace: Replace the node specified by 'location' by the value specified by 'expr'.
Node<std::string> parent = element.getParentNode();
if (!parent)
@@ -749,7 +749,7 @@ void XPathDataModel::assign(const Element<std::string>& key,
throw Event("error.execution", Event::PLATFORM);
Node<std::string> importedNode = (value[0].getOwnerDocument() == _doc ? value[0].cloneNode(true) : _doc.importNode(value[0], true));
parent.replaceChild(importedNode, element);
- } else if (assignElem && HAS_ATTR(assignElem, "type") && boost::iequals(ATTR(assignElem, "type"), "delete")) {
+ } else if (assignElem && HAS_ATTR(assignElem, "type") && iequals(ATTR(assignElem, "type"), "delete")) {
// delete: Delete the node specified by 'location'. ('expr' is ignored.).
Node<std::string> parent = element.getParentNode();
if (!parent)
@@ -819,7 +819,7 @@ XPathFunction<std::string>*
XPathFunctionResolver::resolveFunction(const std::string& namespace_uri,
const std::string& name,
const std::vector<XPathExpression<std::string> >& argExprs) const {
- if (boost::iequals(name, "in")) {
+ if (iequals(name, "in")) {
return new XPathFunctionIn(1, -1, argExprs, _interpreter);
}
return _xpathFuncRes.resolveFunction(namespace_uri, name, argExprs);
diff --git a/src/uscxml/plugins/element/fetch/FetchElement.cpp b/src/uscxml/plugins/element/fetch/FetchElement.cpp
index da64bcf..37dd6c0 100644
--- a/src/uscxml/plugins/element/fetch/FetchElement.cpp
+++ b/src/uscxml/plugins/element/fetch/FetchElement.cpp
@@ -57,13 +57,13 @@ void FetchElement::downloadCompleted(const URL& url) {
std::map<std::string, std::string> headerFields = url.getInHeaderFields();
if (false) {
- } else if (boost::iequals(_type, "text")) {
+ } else if (iequals(_type, "text")) {
event.data.atom = content;
event.data.type = Data::VERBATIM;
- } else if (boost::iequals(_type, "url")) {
- } else if (boost::iequals(_type, "json")) {
+ } else if (iequals(_type, "url")) {
+ } else if (iequals(_type, "json")) {
event.data = Data::fromJSON(content);
- } else if (boost::iequals(_type, "xml")) {
+ } else if (iequals(_type, "xml")) {
event = Event::fromXML(content);
}
@@ -101,10 +101,10 @@ void FetchElement::enterElement(const Arabica::DOM::Node<std::string>& node) {
_callback = (HAS_ATTR(node, "callback") ? ATTR(node, "callback") : _interpreter->getDataModel().evalAsString(ATTR(node, "callbackexpr")));
_type = (HAS_ATTR(node, "type") ? ATTR(node, "type") : "text");
- if (!boost::iequals(_type, "text") &&
- !boost::iequals(_type, "url") &&
- !boost::iequals(_type, "json") &&
- !boost::iequals(_type, "xml")) {
+ if (!iequals(_type, "text") &&
+ !iequals(_type, "url") &&
+ !iequals(_type, "json") &&
+ !iequals(_type, "xml")) {
LOG(ERROR) << "Fetch element type attribute not one of text, url, json, xml.";
return;
}
diff --git a/src/uscxml/plugins/element/file/FileElement.cpp b/src/uscxml/plugins/element/file/FileElement.cpp
index 8a2ca8f..346c75d 100644
--- a/src/uscxml/plugins/element/file/FileElement.cpp
+++ b/src/uscxml/plugins/element/file/FileElement.cpp
@@ -55,17 +55,17 @@ void FileElement::enterElement(const Arabica::DOM::Node<std::string>& node) {
_givenUrl = (HAS_ATTR(node, "url") ? ATTR(node, "url") : _interpreter->getDataModel().evalAsString(ATTR(node, "urlexpr")));
std::string sandBoxStr = (HAS_ATTR(node, "sandbox") ? ATTR(node, "sandbox") : "on");
- if (boost::iequals(sandBoxStr, "off") || boost::iequals(sandBoxStr, "false") || boost::iequals(sandBoxStr, "no")) {
+ if (iequals(sandBoxStr, "off") || iequals(sandBoxStr, "false") || iequals(sandBoxStr, "no")) {
_sandBoxed = false;
}
if (HAS_ATTR(node, "operation")) {
std::string operation = ATTR(node, "operation");
- if (boost::iequals(operation, "read") || boost::iequals(operation, "load")) {
+ if (iequals(operation, "read") || iequals(operation, "load")) {
_operation = READ;
- } else if(boost::iequals(operation, "write")) {
+ } else if(iequals(operation, "write")) {
_operation = WRITE;
- } else if(boost::iequals(operation, "append")) {
+ } else if(iequals(operation, "append")) {
_operation = APPEND;
} else {
LOG(ERROR) << "File element operation attribute not one of read, write or append.";
@@ -112,13 +112,13 @@ void FileElement::enterElement(const Arabica::DOM::Node<std::string>& node) {
} else if(HAS_ATTR(node, "typeexpr")) {
type = _interpreter->getDataModel().evalAsString(ATTR(node, "typeexpr"));
}
- if (boost::iequals(type, "text")) {
+ if (iequals(type, "text")) {
_type = TEXT;
- } else if (boost::iequals(type, "json")) {
+ } else if (iequals(type, "json")) {
_type = JSON;
- } else if (boost::iequals(type, "binary")) {
+ } else if (iequals(type, "binary")) {
_type = BINARY;
- } else if(boost::iequals(type, "xml")) {
+ } else if(iequals(type, "xml")) {
_type = XML;
} else {
LOG(ERROR) << "File element type attribute not one of text, json, xml or binary.";
diff --git a/src/uscxml/plugins/element/postpone/PostponeElement.cpp b/src/uscxml/plugins/element/postpone/PostponeElement.cpp
index de2426c..f9ddd5f 100644
--- a/src/uscxml/plugins/element/postpone/PostponeElement.cpp
+++ b/src/uscxml/plugins/element/postpone/PostponeElement.cpp
@@ -64,7 +64,7 @@ void PostponeElement::enterElement(const Arabica::DOM::Node<std::string>& node)
// chaining causes the event to fire if the condition was true since postponing
bool chained = false;
if (HAS_ATTR(node, "chaining")) {
- chained = boost::iequals(ATTR(node, "chaining"), "true");
+ chained = iequals(ATTR(node, "chaining"), "true");
}
// when will we refire the event?
@@ -102,9 +102,9 @@ void PostponeElement::enterElement(const Arabica::DOM::Node<std::string>& node)
uint64_t timeout = 0;
NumAttr timeoutAttr(timeoutStr);
- if (boost::iequals(timeoutAttr.unit, "s")) {
+ if (iequals(timeoutAttr.unit, "s")) {
timeout = strTo<int>(timeoutAttr.value) * 1000;
- } else if (boost::iequals(timeoutAttr.unit, "ms")) {
+ } else if (iequals(timeoutAttr.unit, "ms")) {
timeout = strTo<int>(timeoutAttr.value);
}
if (timeout > 0) {
diff --git a/src/uscxml/plugins/invoker/audio/OpenALInvoker.cpp b/src/uscxml/plugins/invoker/audio/OpenALInvoker.cpp
index c4e7cf3..004eb84 100644
--- a/src/uscxml/plugins/invoker/audio/OpenALInvoker.cpp
+++ b/src/uscxml/plugins/invoker/audio/OpenALInvoker.cpp
@@ -88,7 +88,7 @@ void OpenALInvoker::send(const SendRequest& req) {
if (!_isStarted)
start();
- if (boost::iequals(req.name, "play")) {
+ if (iequals(req.name, "play")) {
if (req.params.find("src") == req.params.end()) {
LOG(ERROR) << "Sent event play with no src URL";
}
@@ -100,7 +100,7 @@ void OpenALInvoker::send(const SendRequest& req) {
}
_sources[req.sendid] = new OpenALSource();
- _sources[req.sendid]->loop = req.params.find("loop") != req.params.end() && boost::iequals(req.params.find("loop")->second.atom, "true");
+ _sources[req.sendid]->loop = req.params.find("loop") != req.params.end() && iequals(req.params.find("loop")->second.atom, "true");
_sources[req.sendid]->file = srcURL;
#ifdef LIBSNDFILE_FOUND
_sources[req.sendid]->transform = new LibSoundFile(srcURL.asLocalFile(".audio"));
@@ -142,7 +142,7 @@ void OpenALInvoker::send(const SendRequest& req) {
_sourcesAvailable.notify_all();
}
- if (boost::iequals(req.name, "move.source")) {
+ if (iequals(req.name, "move.source")) {
std::string sourceId;
if (req.params.find("source") == req.params.end()) {
LOG(WARNING) << "Cannot move source with no source given in parameters";
@@ -163,7 +163,7 @@ void OpenALInvoker::send(const SendRequest& req) {
}
}
- if (boost::iequals(req.name, "move.listener")) {
+ if (iequals(req.name, "move.listener")) {
getPosFromParams(req.params, _listenerPos);
try {
@@ -284,11 +284,11 @@ void OpenALInvoker::invoke(const InvokeRequest& req) {
std::multimap<std::string, Data>::const_iterator paramIter = req.params.begin();
while(paramIter != req.params.end()) {
- if (boost::iequals(paramIter->first, "maxX"))
+ if (iequals(paramIter->first, "maxX"))
_maxPos[0] = strTo<float>(paramIter->second.atom);
- if (boost::iequals(paramIter->first, "maxY"))
+ if (iequals(paramIter->first, "maxY"))
_maxPos[1] = strTo<float>(paramIter->second.atom);
- if (boost::iequals(paramIter->first, "maxZ"))
+ if (iequals(paramIter->first, "maxZ"))
_maxPos[2] = strTo<float>(paramIter->second.atom);
paramIter++;
}
@@ -384,7 +384,7 @@ float OpenALInvoker::posToRadian(const std::string& pos) {
std::string trimmedPos = boost::trim_copy(pos);
float rad = 0;
- if (trimmedPos.size() > 3 && boost::iequals("deg", trimmedPos.substr(trimmedPos.length() - 3, 3))) {
+ if (trimmedPos.size() > 3 && iequals("deg", trimmedPos.substr(trimmedPos.length() - 3, 3))) {
rad = boost::lexical_cast<float>(trimmedPos.substr(0, trimmedPos.size() - 3));
rad = fmodf(rad, 360); // into range [0-360]
rad /= 180; // into range [0-2]
@@ -392,7 +392,7 @@ float OpenALInvoker::posToRadian(const std::string& pos) {
rad -= M_PI_2; // 0 to top;
rad *= -1; // make clockwise
rad += 2 * M_PI; // make positive
- } else if (trimmedPos.size() > 3 && boost::iequals("rad", trimmedPos.substr(trimmedPos.length() - 3, 3))) {
+ } else if (trimmedPos.size() > 3 && iequals("rad", trimmedPos.substr(trimmedPos.length() - 3, 3))) {
rad = boost::lexical_cast<float>(trimmedPos.substr(0, trimmedPos.size() - 3));
rad = fmodf(rad, M_PI * 2); // into range [0-2*PI]
} else {
diff --git a/src/uscxml/plugins/invoker/ffmpeg/FFMPEGInvoker.cpp b/src/uscxml/plugins/invoker/ffmpeg/FFMPEGInvoker.cpp
index 67c338d..f43e406 100644
--- a/src/uscxml/plugins/invoker/ffmpeg/FFMPEGInvoker.cpp
+++ b/src/uscxml/plugins/invoker/ffmpeg/FFMPEGInvoker.cpp
@@ -101,7 +101,7 @@ void FFMPEGInvoker::invoke(const InvokeRequest& req) {
void FFMPEGInvoker::send(const SendRequest& req) {
SendRequest reqCopy = req;
- if (boost::iequals(req.name, "render.start")) {
+ if (iequals(req.name, "render.start")) {
// create a new encoding context
int ret;
EncodingContext* ctx = new EncodingContext();
@@ -167,9 +167,9 @@ void FFMPEGInvoker::send(const SendRequest& req) {
ctx->frame->pts = 0;
_encoders[context] = ctx;
- } else if(boost::iequals(req.name, "render.frame")) {
+ } else if(iequals(req.name, "render.frame")) {
_workQueue.push(req);
- } else if(boost::iequals(req.name, "render.end")) {
+ } else if(iequals(req.name, "render.end")) {
_workQueue.push(req);
}
}
@@ -242,7 +242,7 @@ void FFMPEGInvoker::process(const SendRequest& req) {
tthread::lock_guard<tthread::recursive_mutex> lock(ctx->mutex);
// finish encoding and return
- if(boost::iequals(req.name, "render.end")) {
+ if(iequals(req.name, "render.end")) {
finish(ctx, req);
delete _encoders[context];
_encoders.erase(context);
diff --git a/src/uscxml/plugins/invoker/filesystem/dirmon/DirMonInvoker.cpp b/src/uscxml/plugins/invoker/filesystem/dirmon/DirMonInvoker.cpp
index 07f5fcd..902b825 100644
--- a/src/uscxml/plugins/invoker/filesystem/dirmon/DirMonInvoker.cpp
+++ b/src/uscxml/plugins/invoker/filesystem/dirmon/DirMonInvoker.cpp
@@ -107,13 +107,13 @@ void DirMonInvoker::invoke(const InvokeRequest& req) {
}
if (req.params.find("reportexisting") != req.params.end() &&
- boost::iequals(req.params.find("reportexisting")->second.atom, "false"))
+ iequals(req.params.find("reportexisting")->second.atom, "false"))
_reportExisting = false;
if (req.params.find("recurse") != req.params.end() &&
- boost::iequals(req.params.find("recurse")->second.atom, "true"))
+ iequals(req.params.find("recurse")->second.atom, "true"))
_recurse = true;
if (req.params.find("reporthidden") != req.params.end() &&
- boost::iequals(req.params.find("reporthidden")->second.atom, "true"))
+ iequals(req.params.find("reporthidden")->second.atom, "true"))
_reportHidden = true;
std::string suffixList;
@@ -138,7 +138,7 @@ void DirMonInvoker::invoke(const InvokeRequest& req) {
while(dirIter != req.params.upper_bound("dir")) {
// this is simplified - Data might be more elaborate than a simple string atom
URL url(dirIter->second.atom);
- if (!url.toAbsolute(_interpreter->getBaseURI()) || !boost::iequals(url.scheme(), "file")) {
+ if (!url.toAbsolute(_interpreter->getBaseURI()) || !iequals(url.scheme(), "file")) {
LOG(ERROR) << "Given directory '" << dirIter->second << "' cannot be transformed to absolute path";
} else {
_dir = url.path();
diff --git a/src/uscxml/plugins/invoker/graphics/openscenegraph/OSGInvoker.cpp b/src/uscxml/plugins/invoker/graphics/openscenegraph/OSGInvoker.cpp
index 63eb970..d615238 100644
--- a/src/uscxml/plugins/invoker/graphics/openscenegraph/OSGInvoker.cpp
+++ b/src/uscxml/plugins/invoker/graphics/openscenegraph/OSGInvoker.cpp
@@ -65,7 +65,7 @@ bool pluginConnect(pluma::Host& host) {
#endif
#define OSG_TAG_HANDLE(tagName, procFunc) \
-} else if (boost::iequals(LOCALNAME(childs.item(i)), tagName) && \
+} else if (iequals(LOCALNAME(childs.item(i)), tagName) && \
validChildren.find(tagName) != validChildren.end()) { \
procFunc(childs.item(i));\
@@ -88,7 +88,7 @@ Data OSGInvoker::getDataModelVariables() {
}
void OSGInvoker::send(const SendRequest& req) {
- if (boost::iequals(req.name, "intersect")) {
+ if (iequals(req.name, "intersect")) {
}
}
@@ -114,7 +114,7 @@ void OSGInvoker::invoke(const InvokeRequest& req) {
validChilds.insert("display");
// this is somewhat unfortunate, if content contains a single child, we will get that, otherwise its parent (<content>)
- if (boost::iequals(LOCALNAME(req.dom), "display")) {
+ if (iequals(LOCALNAME(req.dom), "display")) {
processChildren(validChilds, req.dom.getParentNode());
} else {
processChildren(validChilds, req.dom);
@@ -160,7 +160,7 @@ void OSGInvoker::handleEvent(Arabica::DOM::Events::Event<std::string>& event) {
if (_nodes.find(node) != _nodes.end()) {
osg::ref_ptr<osg::Node> osgNode = _nodes[node];
if (false) {
- } else if (boost::iequals(LOCALNAME(node), "rotation")) {
+ } else if (iequals(LOCALNAME(node), "rotation")) {
updateRotation(osgNode, event);
}
}
@@ -294,7 +294,7 @@ void OSGInvoker::processRotation(const Arabica::DOM::Node<std::string>& element)
void OSGInvoker::updateRotation(osg::ref_ptr<osg::Node> node, Arabica::DOM::Events::Event<std::string>& event) {
osg::ref_ptr<osg::MatrixTransform> transform = static_cast<osg::MatrixTransform*>(node->asTransform());
if (false) {
- } else if (boost::iequals(event.getType(), "DOMAttrModified")) {
+ } else if (iequals(event.getType(), "DOMAttrModified")) {
osg::Matrix rotation = rotationFromElement(Arabica::DOM::Node<std::string>(event.getTarget()));
transform->setMatrix(rotation);
}
@@ -304,9 +304,9 @@ osg::Matrix OSGInvoker::rotationFromElement(const Arabica::DOM::Node<std::string
double pitch = 0, roll = 0, yaw = 0;
if (HAS_ATTR(element, "pitch")) {
NumAttr pitchAttr = NumAttr(ATTR(element, "pitch"));
- if (boost::iequals(pitchAttr.unit, "deg")) {
+ if (iequals(pitchAttr.unit, "deg")) {
pitch = osg::DegreesToRadians(strTo<float>(pitchAttr.value));
- } else if (boost::iequals(pitchAttr.unit, "%")) {
+ } else if (iequals(pitchAttr.unit, "%")) {
pitch = osg::DegreesToRadians((strTo<float>(pitchAttr.value) * 360) / 100);
} else {
pitch = strTo<float>(pitchAttr.value);
@@ -314,9 +314,9 @@ osg::Matrix OSGInvoker::rotationFromElement(const Arabica::DOM::Node<std::string
}
if (HAS_ATTR(element, "roll")) {
NumAttr rollAttr = NumAttr(ATTR(element, "roll"));
- if (boost::iequals(rollAttr.unit, "deg")) {
+ if (iequals(rollAttr.unit, "deg")) {
roll = osg::DegreesToRadians(strTo<float>(rollAttr.value));
- } else if (boost::iequals(rollAttr.unit, "%")) {
+ } else if (iequals(rollAttr.unit, "%")) {
roll = osg::DegreesToRadians((strTo<float>(rollAttr.value) * 360) / 100);
} else {
roll = strTo<float>(rollAttr.value);
@@ -324,9 +324,9 @@ osg::Matrix OSGInvoker::rotationFromElement(const Arabica::DOM::Node<std::string
}
if (HAS_ATTR(element, "yaw")) {
NumAttr yawAttr = NumAttr(ATTR(element, "yaw"));
- if (boost::iequals(yawAttr.unit, "deg")) {
+ if (iequals(yawAttr.unit, "deg")) {
yaw = osg::DegreesToRadians(strTo<float>(yawAttr.value));
- } else if (boost::iequals(yawAttr.unit, "%")) {
+ } else if (iequals(yawAttr.unit, "%")) {
yaw = osg::DegreesToRadians((strTo<float>(yawAttr.value) * 360) / 100);
} else {
yaw = strTo<float>(yawAttr.value);
@@ -683,32 +683,32 @@ void OSGInvoker::getViewport(const Arabica::DOM::Node<std::string>& element,
if (HAS_ATTR(element, "x")) {
NumAttr xAttr = NumAttr(ATTR(element, "x"));
x = strTo<float>(xAttr.value);
- if (boost::iequals(xAttr.unit, "%"))
+ if (iequals(xAttr.unit, "%"))
x = (x * fullWidth) / 100;
}
if (HAS_ATTR(element, "y")) {
NumAttr yAttr = NumAttr(ATTR(element, "y"));
y = strTo<float>(yAttr.value);
- if (boost::iequals(yAttr.unit, "%"))
+ if (iequals(yAttr.unit, "%"))
y = (y * fullHeight) / 100;
}
if (HAS_ATTR(element, "width")) {
NumAttr widthAttr = NumAttr(ATTR(element, "width"));
width = strTo<float>(widthAttr.value);
- if (boost::iequals(widthAttr.unit, "%"))
+ if (iequals(widthAttr.unit, "%"))
width = (width * fullWidth) / 100;
}
if (HAS_ATTR(element, "height")) {
NumAttr heightAttr = NumAttr(ATTR(element, "height"));
height = strTo<float>(heightAttr.value);
- if (boost::iequals(heightAttr.unit, "%"))
+ if (iequals(heightAttr.unit, "%"))
height = (height * fullHeight) / 100;
}
}
osgViewer::View* OSGInvoker::getView(const Arabica::DOM::Node<std::string>& element) {
Arabica::DOM::Node<std::string> curr = element;
- while(curr && !boost::iequals(LOCALNAME(curr), "viewport")) {
+ while(curr && !iequals(LOCALNAME(curr), "viewport")) {
curr = curr.getParentNode();
}
if (curr && _views.find(curr) != _views.end())
diff --git a/src/uscxml/plugins/invoker/graphics/openscenegraph/converter/OSGConverter.cpp b/src/uscxml/plugins/invoker/graphics/openscenegraph/converter/OSGConverter.cpp
index 7be93f3..f25d0b9 100644
--- a/src/uscxml/plugins/invoker/graphics/openscenegraph/converter/OSGConverter.cpp
+++ b/src/uscxml/plugins/invoker/graphics/openscenegraph/converter/OSGConverter.cpp
@@ -213,9 +213,9 @@ void OSGConverter::process(const SendRequest& req) {
bool autoRotate = true;
if (req.params.find("autorotate") != req.params.end()) {
- if (boost::iequals(req.params.find("autorotate")->second.atom, "off") ||
- boost::iequals(req.params.find("autorotate")->second.atom, "0") ||
- boost::iequals(req.params.find("autorotate")->second.atom, "false")) {
+ if (iequals(req.params.find("autorotate")->second.atom, "off") ||
+ iequals(req.params.find("autorotate")->second.atom, "0") ||
+ iequals(req.params.find("autorotate")->second.atom, "false")) {
autoRotate = false;
}
}
diff --git a/src/uscxml/plugins/invoker/heartbeat/HeartbeatInvoker.cpp b/src/uscxml/plugins/invoker/heartbeat/HeartbeatInvoker.cpp
index 498292c..cee98bd 100644
--- a/src/uscxml/plugins/invoker/heartbeat/HeartbeatInvoker.cpp
+++ b/src/uscxml/plugins/invoker/heartbeat/HeartbeatInvoker.cpp
@@ -69,20 +69,20 @@ void HeartbeatInvoker::invoke(const InvokeRequest& req) {
unsigned long intervalMs = 0;
InvokeRequest::params_t::const_iterator paramIter = req.params.begin();
while(paramIter != req.params.end()) {
- if (boost::iequals(paramIter->first, "interval")) {
+ if (iequals(paramIter->first, "interval")) {
intervalStr = paramIter->second.atom;
NumAttr intervalAttr(paramIter->second.atom);
interval = strTo<double>(intervalAttr.value);
if (false) {
- } else if (boost::iequals(intervalAttr.unit, "s")) {
+ } else if (iequals(intervalAttr.unit, "s")) {
intervalMs = interval * 1000;
- } else if (boost::iequals(intervalAttr.unit, "ms")) {
+ } else if (iequals(intervalAttr.unit, "ms")) {
intervalMs = interval;
} else {
intervalMs = interval;
}
}
- if (boost::iequals(paramIter->first, "eventname")) {
+ if (iequals(paramIter->first, "eventname")) {
_event.name = paramIter->second.atom;
}
paramIter++;
diff --git a/src/uscxml/plugins/invoker/im/IMInvoker.cpp b/src/uscxml/plugins/invoker/im/IMInvoker.cpp
index d1063bd..9c10bf2 100644
--- a/src/uscxml/plugins/invoker/im/IMInvoker.cpp
+++ b/src/uscxml/plugins/invoker/im/IMInvoker.cpp
@@ -603,7 +603,7 @@ void IMInvoker::send(void *userdata, const std::string event) {
// we are in the thread that manages all of libpurple
EventContext* ctx = (EventContext*)userdata;
- if (boost::iequals(ctx->sendReq.name, "im.send")) {
+ if (iequals(ctx->sendReq.name, "im.send")) {
if (ctx->instance->_account) {
std::string receiver;
Event::getParam(ctx->sendReq.params, "receiver", receiver);
diff --git a/src/uscxml/plugins/invoker/miles/MilesSessionInvoker.cpp b/src/uscxml/plugins/invoker/miles/MilesSessionInvoker.cpp
index 1ec6dce..bd466b6 100644
--- a/src/uscxml/plugins/invoker/miles/MilesSessionInvoker.cpp
+++ b/src/uscxml/plugins/invoker/miles/MilesSessionInvoker.cpp
@@ -59,7 +59,7 @@ Data MilesSessionInvoker::getDataModelVariables() {
void MilesSessionInvoker::send(const SendRequest& req) {
// std::cout << req;
- if (boost::iequals(req.name, "disconnect")) {
+ if (iequals(req.name, "disconnect")) {
std::string reflectorIP = "127.0.0.1";
Event::getParam(req.params, "reflectorip", reflectorIP);
@@ -72,7 +72,7 @@ void MilesSessionInvoker::send(const SendRequest& req) {
LOG(ERROR) << "Could not disconnect from reflector session";
return;
}
- } else if (boost::iequals(req.name, "image")) {
+ } else if (iequals(req.name, "image")) {
// client wants an image
URL imageURL1("test1.jpeg");
URL imageURL2("test2.jpeg");
@@ -102,7 +102,7 @@ void MilesSessionInvoker::send(const SendRequest& req) {
returnEvent(retEv);
- } else if (boost::iequals(req.name, "connect")) {
+ } else if (iequals(req.name, "connect")) {
std::string email = "someSaneDefault";
Event::getParam(req.params, "email", email);
diff --git a/src/uscxml/plugins/invoker/xhtml/XHTMLInvoker.cpp b/src/uscxml/plugins/invoker/xhtml/XHTMLInvoker.cpp
index 8d694d2..13c3e40 100644
--- a/src/uscxml/plugins/invoker/xhtml/XHTMLInvoker.cpp
+++ b/src/uscxml/plugins/invoker/xhtml/XHTMLInvoker.cpp
@@ -64,8 +64,8 @@ bool XHTMLInvoker::httpRecvRequest(const HTTPServer::Request& req) {
tthread::lock_guard<tthread::recursive_mutex> lock(_mutex);
// these are the XHR requests
- if (boost::iequals(req.data["header"]["X-Requested-With"].atom, "XMLHttpRequest")) {
- if (boost::iequals(req.data["type"].atom, "get")) {
+ if (iequals(req.data["header"]["X-Requested-With"].atom, "XMLHttpRequest")) {
+ if (iequals(req.data["type"].atom, "get")) {
// the long-polling GET
if (_longPoll) {
evhttp_send_error(_longPoll.curlReq, 204, NULL);
@@ -101,7 +101,7 @@ bool XHTMLInvoker::httpRecvRequest(const HTTPServer::Request& req) {
// initial request for a document
if (!req.data["query"] && // no query parameters
- boost::iequals(req.data["type"].atom, "get") && // request type is GET
+ iequals(req.data["type"].atom, "get") && // request type is GET
req.content.length() == 0) { // no content
HTTPServer::Reply reply(req);
@@ -184,7 +184,7 @@ void XHTMLInvoker::reply(const SendRequest& req, const HTTPServer::Request& long
std::stringstream ss;
// Arabica::DOM::Node<std::string> content = req.dom.getDocumentElement();
Arabica::DOM::Node<std::string> content = req.dom;
- if (content && boost::iequals(content.getLocalName(), "content")) {
+ if (content && iequals(content.getLocalName(), "content")) {
reply.headers["X-SCXML-Type"] = (HAS_ATTR(content, "type") ? ATTR(content, "type") : "replacechildren");
reply.headers["X-SCXML-XPath"] = (HAS_ATTR(content, "xpath") ? ATTR(content, "xpath") : "/html/body");
if (HAS_ATTR(content, "attr"))
diff --git a/src/uscxml/plugins/ioprocessor/scxml/SCXMLIOProcessor.cpp b/src/uscxml/plugins/ioprocessor/scxml/SCXMLIOProcessor.cpp
index cfdfa18..5ae76a9 100644
--- a/src/uscxml/plugins/ioprocessor/scxml/SCXMLIOProcessor.cpp
+++ b/src/uscxml/plugins/ioprocessor/scxml/SCXMLIOProcessor.cpp
@@ -107,7 +107,7 @@ void SCXMLIOProcessor::send(const SendRequest& req) {
// reqCopy.sendid = "";
// test 198
_interpreter->receive(reqCopy);
- } else if (boost::iequals(reqCopy.target, "#_internal")) {
+ } else if (iequals(reqCopy.target, "#_internal")) {
/**
* #_internal: If the target is the special term '#_internal', the Processor
* must add the event to the internal event queue of the sending session.
@@ -133,7 +133,7 @@ void SCXMLIOProcessor::send(const SendRequest& req) {
error.sendid = reqCopy.sendid;
_interpreter->receiveInternal(error);
}
- } else if (boost::iequals(reqCopy.target, "#_parent")) {
+ } else if (iequals(reqCopy.target, "#_parent")) {
/**
* #_parent: If the target is the special term '#_parent', the Processor must
* add the event to the external event queue of the SCXML session that invoked