summaryrefslogtreecommitdiffstats
path: root/src/uscxml/Interpreter.h
diff options
context:
space:
mode:
authorStefan Radomski <sradomski@mintwerk.de>2016-02-23 11:28:18 (GMT)
committerStefan Radomski <sradomski@mintwerk.de>2016-02-23 11:28:18 (GMT)
commit7212d5a3dbbd2845d09df96b2c345132c8a24931 (patch)
tree194bf3525bc7b607013301b79dde6c9950ccbf2e /src/uscxml/Interpreter.h
parent8e62f3801b98bf4b7f7f85b848b2fe6339c99162 (diff)
downloaduscxml-7212d5a3dbbd2845d09df96b2c345132c8a24931.zip
uscxml-7212d5a3dbbd2845d09df96b2c345132c8a24931.tar.gz
uscxml-7212d5a3dbbd2845d09df96b2c345132c8a24931.tar.bz2
Some refactoring for improved compile times
Diffstat (limited to 'src/uscxml/Interpreter.h')
-rw-r--r--src/uscxml/Interpreter.h33
1 files changed, 10 insertions, 23 deletions
diff --git a/src/uscxml/Interpreter.h b/src/uscxml/Interpreter.h
index ce9354a..c3395d0 100644
--- a/src/uscxml/Interpreter.h
+++ b/src/uscxml/Interpreter.h
@@ -23,6 +23,7 @@
// this has to be the first include or MSVC will run amok
#include "uscxml/config.h"
#include "uscxml/Common.h"
+#include "uscxml/util/String.h"
#include <iostream> // arabica xpath uses cerr without iostream
#include <boost/shared_ptr.hpp>
@@ -34,11 +35,6 @@
#include <XPath/XPath.hpp>
#include <DOM/Document.hpp>
-#include <DOM/SAX2DOM/SAX2DOM.hpp>
-#include <SAX/helpers/CatchErrorHandler.hpp>
-#include <DOM/Events/EventTarget.hpp>
-#include <DOM/Events/EventListener.hpp>
-
#include "uscxml/concurrency/BlockingQueue.h"
#include "uscxml/messages/Data.h"
#include "uscxml/messages/SendRequest.h"
@@ -50,11 +46,13 @@
#include "uscxml/plugins/Invoker.h"
#include "uscxml/plugins/ExecutableContent.h"
-#ifdef BUILD_PROFILING
-#include "uscxml/concurrency/Timer.h"
-#define TIME_BLOCK Measurement msm(&timer);
-#else
-#define TIME_BLOCK (0);
+#ifndef TIME_BLOCK
+# ifdef BUILD_PROFILING
+# include "uscxml/concurrency/Timer.h"
+# define TIME_BLOCK Measurement msm(&timer);
+# else
+# define TIME_BLOCK
+# endif
#endif
#define ERROR_PLATFORM_THROW(msg) \
@@ -399,18 +397,6 @@ public:
virtual Arabica::XPath::NodeSet<std::string> getTargetStates(const Arabica::XPath::NodeSet<std::string>& transitions);
virtual Arabica::DOM::Node<std::string> getSourceState(const Arabica::DOM::Element<std::string>& transition);
- static Arabica::XPath::NodeSet<std::string> filterChildElements(const std::string& tagname, const Arabica::DOM::Node<std::string>& node, bool recurse = false);
- static Arabica::XPath::NodeSet<std::string> filterChildElements(const std::string& tagName, const Arabica::XPath::NodeSet<std::string>& nodeSet, bool recurse = false);
- static Arabica::XPath::NodeSet<std::string> filterChildType(const Arabica::DOM::Node_base::Type type, const Arabica::DOM::Node<std::string>& node, bool recurse = false);
- static Arabica::XPath::NodeSet<std::string> filterChildType(const Arabica::DOM::Node_base::Type type, const Arabica::XPath::NodeSet<std::string>& nodeSet, bool recurse = false);
-
- static std::list<std::string> tokenizeIdRefs(const std::string& idRefs) {
- return tokenize(idRefs, ' ', true);
- }
- static std::list<std::string> tokenize(const std::string& line, const char seperator = ' ', bool trimWhiteSpace = false);
-
- static std::string spaceNormalize(const std::string& text);
- static bool nameMatch(const std::string& eventDescs, const std::string& event);
Arabica::DOM::Node<std::string> findLCCA(const Arabica::XPath::NodeSet<std::string>& states);
virtual Arabica::XPath::NodeSet<std::string> getProperAncestors(const Arabica::DOM::Node<std::string>& s1, const Arabica::DOM::Node<std::string>& s2);
@@ -827,7 +813,8 @@ protected:
return _impl->setInvokeRequest(req);
}
- static Interpreter fromInputSource(Arabica::SAX::InputSource<std::string>& source, const std::string& sourceURL);
+ // we use a void ptr here as Arabica::SAX::InputSource complicates includes
+ static Interpreter fromInputSource(void* source, const std::string& sourceURL);
boost::shared_ptr<InterpreterImpl> _impl;
static std::map<std::string, boost::weak_ptr<InterpreterImpl> > _instances;