summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Radomski <github@mintwerk.de>2017-02-03 15:30:56 (GMT)
committerStefan Radomski <github@mintwerk.de>2017-02-03 15:30:56 (GMT)
commitf7670b8d975d2d686095e98e7e7cc781b69dad0c (patch)
tree9df4dd3e721fbd26a4db14e5d3bc94cf88b8acf5
parent074e8a7db78bba7bdc184f6d18d16c2ab8045fed (diff)
downloaduscxml-f7670b8d975d2d686095e98e7e7cc781b69dad0c.zip
uscxml-f7670b8d975d2d686095e98e7e7cc781b69dad0c.tar.gz
uscxml-f7670b8d975d2d686095e98e7e7cc781b69dad0c.tar.bz2
Reduced dependencies to compile test-gen-c to smaller executable
-rw-r--r--CMakeLists.txt1
-rw-r--r--config.h.in2
-rw-r--r--src/uscxml/CMakeLists.txt1
-rw-r--r--src/uscxml/debug/DebuggerServlet.cpp2
-rw-r--r--src/uscxml/interpreter/BasicContentExecutor.cpp38
-rw-r--r--src/uscxml/interpreter/BasicContentExecutor.h2
-rw-r--r--src/uscxml/interpreter/ContentExecutor.cpp4
-rw-r--r--src/uscxml/interpreter/ContentExecutor.h2
-rw-r--r--src/uscxml/interpreter/ContentExecutorImpl.h2
-rw-r--r--src/uscxml/interpreter/InterpreterImpl.cpp10
-rw-r--r--src/uscxml/interpreter/InterpreterImpl.h8
-rw-r--r--src/uscxml/messages/Data.cpp4
-rw-r--r--src/uscxml/messages/Event.cpp1
-rw-r--r--src/uscxml/plugins/Factory.cpp8
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.cpp1
-rw-r--r--src/uscxml/plugins/datamodel/null/NullDataModel.cpp1
-rw-r--r--src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp2
-rw-r--r--src/uscxml/transform/ChartToVHDL.cpp4
-rw-r--r--src/uscxml/util/DOM.h2
-rw-r--r--test/CMakeLists.txt29
-rw-r--r--test/src/test-gen-c.cpp16
-rw-r--r--test/src/test-validating.cpp1
22 files changed, 94 insertions, 47 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 764fd8c..bd14bda 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -97,6 +97,7 @@ include_directories(contrib/src)
include_directories(${CMAKE_BINARY_DIR})
include_directories(${PROJECT_SOURCE_DIR}/contrib/src/jsmn)
include_directories(${PROJECT_SOURCE_DIR}/contrib/src/evws)
+# include_directories(${PROJECT_SOURCE_DIR}/contrib/src/uriparser/include)
set(GETOPT_FILES ${PROJECT_SOURCE_DIR}/contrib/src/uscxml/InterpreterOptions.cpp)
if (WIN32)
diff --git a/config.h.in b/config.h.in
index ae184c0..b1132f9 100644
--- a/config.h.in
+++ b/config.h.in
@@ -58,6 +58,7 @@
#cmakedefine BUILD_PROFILING
#cmakedefine SWI_BINARY "@SWI_BINARY@"
+#ifndef FEATS_ON_CMD
/** whether we want some feature */
#cmakedefine WITH_CACHE_FILES
#cmakedefine WITH_INV_SCXML
@@ -72,6 +73,7 @@
#cmakedefine WITH_DM_PYTHON
#cmakedefine WITH_DM_C89
#cmakedefine WITH_DM_PROMELA
+#endif
#cmakedefine BUILD_AS_PLUGINS
diff --git a/src/uscxml/CMakeLists.txt b/src/uscxml/CMakeLists.txt
index e1881e4..5c8f582 100644
--- a/src/uscxml/CMakeLists.txt
+++ b/src/uscxml/CMakeLists.txt
@@ -56,6 +56,7 @@ list (APPEND USCXML_FILES ${USCXML_SERVER})
file(GLOB USCXML_CORE
${CMAKE_SOURCE_DIR}/contrib/src/jsmn/jsmn.c
${CMAKE_SOURCE_DIR}/contrib/src/evws/evws.c
+ # ${CMAKE_SOURCE_DIR}/contrib/src/uriparser/src/*.c
*.cpp
*.h
)
diff --git a/src/uscxml/debug/DebuggerServlet.cpp b/src/uscxml/debug/DebuggerServlet.cpp
index c3d0f9f..1d2df6e 100644
--- a/src/uscxml/debug/DebuggerServlet.cpp
+++ b/src/uscxml/debug/DebuggerServlet.cpp
@@ -20,6 +20,8 @@
#include "uscxml/debug/DebuggerServlet.h"
#include "uscxml/debug/DebugSession.h"
#include "uscxml/util/UUID.h"
+
+#include <xercesc/dom/DOMDocument.hpp>
#include <boost/algorithm/string.hpp>
namespace uscxml {
diff --git a/src/uscxml/interpreter/BasicContentExecutor.cpp b/src/uscxml/interpreter/BasicContentExecutor.cpp
index a801f35..17dd611 100644
--- a/src/uscxml/interpreter/BasicContentExecutor.cpp
+++ b/src/uscxml/interpreter/BasicContentExecutor.cpp
@@ -235,7 +235,7 @@ void BasicContentExecutor::processIf(XERCESC_NS::DOMElement* content) {
// current block is true
if (blockIsTrue) {
// we do now that the prefix of content is correct
- process(childElem, XML_PREFIX(content));
+ process(childElem);
}
}
}
@@ -266,7 +266,7 @@ void BasicContentExecutor::processForeach(XERCESC_NS::DOMElement* content) {
_callbacks->setForeach(item, array, index, iteration);
for (auto childElem = content->getFirstElementChild(); childElem; childElem = childElem->getNextElementSibling()) {
- process(childElem, XML_PREFIX(content));
+ process(childElem);
}
}
}
@@ -289,18 +289,18 @@ void BasicContentExecutor::processScript(XERCESC_NS::DOMElement* content) {
}
-void BasicContentExecutor::process(XERCESC_NS::DOMElement* block, const X& xmlPrefix) {
+void BasicContentExecutor::process(XERCESC_NS::DOMElement* block) {
std::string tagName = TAGNAME(block);
+ std::string xmlPrefix = XML_PREFIX(block);
-
- if (iequals(tagName, xmlPrefix.str() + "onentry") ||
- iequals(tagName, xmlPrefix.str() + "onexit") ||
- iequals(tagName, xmlPrefix.str() + "transition")) {
+ if (iequals(tagName, xmlPrefix + "onentry") ||
+ iequals(tagName, xmlPrefix + "onexit") ||
+ iequals(tagName, xmlPrefix + "transition")) {
try {
for (auto childElem = block->getFirstElementChild(); childElem; childElem = childElem->getNextElementSibling()) {
// process any child eleents
- process(childElem, xmlPrefix);
+ process(childElem);
}
} catch (Event e) {
// there has been an error in an executable content block
@@ -310,18 +310,18 @@ void BasicContentExecutor::process(XERCESC_NS::DOMElement* block, const X& xmlPr
return;
}
- if (iequals(tagName, xmlPrefix.str() + "finalize")) {
+ if (iequals(tagName, xmlPrefix + "finalize")) {
std::list<DOMNode*> childElems = DOMUtils::filterChildType(DOMNode::ELEMENT_NODE, block, false);
if(childElems.size() > 0) {
for(auto elemIter = childElems.begin(); elemIter != childElems.end(); elemIter++) {
- process(static_cast<DOMElement*>(*elemIter), xmlPrefix);
+ process(static_cast<DOMElement*>(*elemIter));
}
} else {
// issue 67 - empty finalize element
DOMNode* parent = block->getParentNode();
if (parent && parent->getNodeType() == DOMNode::ELEMENT_NODE) {
DOMElement* invokeElem = static_cast<DOMElement*>(parent);
- if (iequals(X(invokeElem->getTagName()).str(), xmlPrefix.str() + "invoke")) {
+ if (iequals(X(invokeElem->getTagName()).str(), xmlPrefix + "invoke")) {
// we are the empth finalize element of an invoke
// Specification 6.5.2: http://www.w3.org/TR/scxml/#N110EF
@@ -347,21 +347,21 @@ void BasicContentExecutor::process(XERCESC_NS::DOMElement* block, const X& xmlPr
USCXML_MONITOR_CALLBACK1(_callbacks->getMonitors(), beforeExecutingContent, block);
if (false) {
- } else if (iequals(tagName, xmlPrefix.str() + "raise")) {
+ } else if (iequals(tagName, xmlPrefix + "raise")) {
processRaise(block);
- } else if (iequals(tagName, xmlPrefix.str() + "send")) {
+ } else if (iequals(tagName, xmlPrefix + "send")) {
processSend(block);
- } else if (iequals(tagName, xmlPrefix.str() + "cancel")) {
+ } else if (iequals(tagName, xmlPrefix + "cancel")) {
processCancel(block);
- } else if (iequals(tagName, xmlPrefix.str() + "if")) {
+ } else if (iequals(tagName, xmlPrefix + "if")) {
processIf(block);
- } else if (iequals(tagName, xmlPrefix.str() + "assign")) {
+ } else if (iequals(tagName, xmlPrefix + "assign")) {
processAssign(block);
- } else if (iequals(tagName, xmlPrefix.str() + "foreach")) {
+ } else if (iequals(tagName, xmlPrefix + "foreach")) {
processForeach(block);
- } else if (iequals(tagName, xmlPrefix.str() + "log")) {
+ } else if (iequals(tagName, xmlPrefix + "log")) {
processLog(block);
- } else if (iequals(tagName, xmlPrefix.str() + "script")) {
+ } else if (iequals(tagName, xmlPrefix + "script")) {
processScript(block);
} else {
LOG(_callbacks->getLogger(), USCXML_ERROR) << tagName;
diff --git a/src/uscxml/interpreter/BasicContentExecutor.h b/src/uscxml/interpreter/BasicContentExecutor.h
index 032da6f..9019b23 100644
--- a/src/uscxml/interpreter/BasicContentExecutor.h
+++ b/src/uscxml/interpreter/BasicContentExecutor.h
@@ -46,7 +46,7 @@ public:
void processLog(XERCESC_NS::DOMElement* content);
void processScript(XERCESC_NS::DOMElement* content);
- virtual void process(XERCESC_NS::DOMElement* block, const X& xmlPrefix);
+ virtual void process(XERCESC_NS::DOMElement* block);
virtual void invoke(XERCESC_NS::DOMElement* invoke);
virtual void uninvoke(XERCESC_NS::DOMElement* invoke);
diff --git a/src/uscxml/interpreter/ContentExecutor.cpp b/src/uscxml/interpreter/ContentExecutor.cpp
index de142a1..4aa6eb4 100644
--- a/src/uscxml/interpreter/ContentExecutor.cpp
+++ b/src/uscxml/interpreter/ContentExecutor.cpp
@@ -23,8 +23,8 @@
namespace uscxml {
-void ContentExecutor::process(XERCESC_NS::DOMElement* block, const X& xmlPrefix) {
- _impl->process(block, xmlPrefix);
+void ContentExecutor::process(XERCESC_NS::DOMElement* block) {
+ _impl->process(block);
}
void ContentExecutor::invoke(XERCESC_NS::DOMElement* invoke) {
diff --git a/src/uscxml/interpreter/ContentExecutor.h b/src/uscxml/interpreter/ContentExecutor.h
index 7a0b125..78fdf94 100644
--- a/src/uscxml/interpreter/ContentExecutor.h
+++ b/src/uscxml/interpreter/ContentExecutor.h
@@ -43,7 +43,7 @@ class USCXML_API ContentExecutor {
public:
PIMPL_OPERATORS(ContentExecutor);
- virtual void process(XERCESC_NS::DOMElement* block, const X& xmlPrefix);
+ virtual void process(XERCESC_NS::DOMElement* block);
virtual void invoke(XERCESC_NS::DOMElement* invoke);
virtual void uninvoke(XERCESC_NS::DOMElement* invoke);
virtual Data elementAsData(XERCESC_NS::DOMElement* element, bool asExpression = false);
diff --git a/src/uscxml/interpreter/ContentExecutorImpl.h b/src/uscxml/interpreter/ContentExecutorImpl.h
index e8c89f9..5f0acfe 100644
--- a/src/uscxml/interpreter/ContentExecutorImpl.h
+++ b/src/uscxml/interpreter/ContentExecutorImpl.h
@@ -89,7 +89,7 @@ public:
virtual std::shared_ptr<ContentExecutorImpl> create(ContentExecutorCallbacks* callbacks) = 0;
- virtual void process(XERCESC_NS::DOMElement* block, const X& xmlPrefix) = 0;
+ virtual void process(XERCESC_NS::DOMElement* block) = 0;
virtual void invoke(XERCESC_NS::DOMElement* invoke) = 0;
virtual void uninvoke(XERCESC_NS::DOMElement* invoke) = 0;
diff --git a/src/uscxml/interpreter/InterpreterImpl.cpp b/src/uscxml/interpreter/InterpreterImpl.cpp
index 1693462..ac6aa41 100644
--- a/src/uscxml/interpreter/InterpreterImpl.cpp
+++ b/src/uscxml/interpreter/InterpreterImpl.cpp
@@ -87,7 +87,7 @@ InterpreterImpl::~InterpreterImpl() {
// make sure we deallocate all user-data in the DOM,
// this is neccesary if we were aborted early
- std::list<DOMElement*> invokes = DOMUtils::filterChildElements(_xmlPrefix.str() + "invoke", _scxml, true);
+ std::list<DOMElement*> invokes = DOMUtils::filterChildElements(_xmlPrefix + "invoke", _scxml, true);
for (auto invoke : invokes) {
char* invokeId = (char*)invoke->getUserData(X("invokeid"));
if (invokeId != NULL) {
@@ -284,9 +284,9 @@ SCXML_STOP_SEARCH:
_scxml = dynamic_cast<XERCESC_NS::DOMElement*>(scxmls->item(0));
- _xmlPrefix = _scxml->getPrefix();
- _xmlNS = _scxml->getNamespaceURI();
- if (_xmlPrefix) {
+ _xmlPrefix = X(_scxml->getPrefix()).str();
+ _xmlNS = X(_scxml->getNamespaceURI()).str();
+ if (_xmlPrefix.size() > 0) {
_xmlPrefix = std::string(_xmlPrefix) + ":";
}
if (HAS_ATTR(_scxml, kXMLCharName)) {
@@ -467,7 +467,7 @@ Event InterpreterImpl::dequeueExternal(size_t blockMs) {
if (_currEvent.invokeid.size() > 0 &&
_invokers.find(_currEvent.invokeid) != _invokers.end() &&
_invokers[_currEvent.invokeid].getFinalize() != NULL) {
- _execContent.process(_invokers[_currEvent.invokeid].getFinalize(), _xmlPrefix);
+ _execContent.process(_invokers[_currEvent.invokeid].getFinalize());
}
for (auto invIter = _invokers.begin(); invIter != _invokers.end(); invIter++) {
diff --git a/src/uscxml/interpreter/InterpreterImpl.h b/src/uscxml/interpreter/InterpreterImpl.h
index 5b73939..8e8b810 100644
--- a/src/uscxml/interpreter/InterpreterImpl.h
+++ b/src/uscxml/interpreter/InterpreterImpl.h
@@ -37,7 +37,7 @@
#include "uscxml/interpreter/ContentExecutorImpl.h"
#include "uscxml/interpreter/EventQueue.h"
#include "uscxml/interpreter/EventQueueImpl.h"
-#include "uscxml/util/DOM.h"
+//#include "uscxml/util/DOM.h"
namespace uscxml {
@@ -109,7 +109,7 @@ public:
}
virtual void process(XERCESC_NS::DOMElement* block) {
- _execContent.process(block, _xmlPrefix);
+ _execContent.process(block);
}
virtual bool isMatched(const Event& event, const std::string& eventDesc);
@@ -290,8 +290,8 @@ protected:
friend class DebugSession;
friend class Debugger;
- X _xmlPrefix;
- X _xmlNS;
+ std::string _xmlPrefix;
+ std::string _xmlNS;
Factory* _factory;
URL _baseURL;
diff --git a/src/uscxml/messages/Data.cpp b/src/uscxml/messages/Data.cpp
index 8853b19..51e1191 100644
--- a/src/uscxml/messages/Data.cpp
+++ b/src/uscxml/messages/Data.cpp
@@ -22,7 +22,9 @@
#include <boost/algorithm/string.hpp>
+#ifndef NO_XERCESC
#include "uscxml/util/DOM.h"
+#endif
#include "uscxml/interpreter/Logging.h"
@@ -262,6 +264,7 @@ std::string Data::toJSON(const Data& data) {
} else {
os << data.atom;
}
+#ifndef NO_XERCESC
} else if (data.node) {
std::ostringstream xmlSerSS;
xmlSerSS << *data.node;
@@ -270,6 +273,7 @@ std::string Data::toJSON(const Data& data) {
// boost::replace_all(xmlSer, "\n", "\\n");
// boost::replace_all(xmlSer, "\t", "\\t");
os << "\"" << jsonEscape(xmlSer) << "\"";
+#endif
} else {
if (data.type == Data::VERBATIM) {
os << "\"\""; // empty string
diff --git a/src/uscxml/messages/Event.cpp b/src/uscxml/messages/Event.cpp
index f667e92..f657ddb 100644
--- a/src/uscxml/messages/Event.cpp
+++ b/src/uscxml/messages/Event.cpp
@@ -18,7 +18,6 @@
*/
#include "uscxml/messages/Event.h"
-#include "uscxml/util/DOM.h"
namespace uscxml {
diff --git a/src/uscxml/plugins/Factory.cpp b/src/uscxml/plugins/Factory.cpp
index 5b767b6..6ca599c 100644
--- a/src/uscxml/plugins/Factory.cpp
+++ b/src/uscxml/plugins/Factory.cpp
@@ -33,10 +33,11 @@
#include "uscxml/plugins/InvokerImpl.h"
#include "uscxml/plugins/DataModelImpl.h"
+#if 0
#include <xercesc/dom/DOM.hpp>
#include <xercesc/util/PlatformUtils.hpp>
#include "uscxml/util/DOM.h"
-
+#endif
// see http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_system
@@ -538,13 +539,14 @@ size_t DataModelImpl::replaceExpressions(std::string& content) {
Factory* Factory::getInstance() {
- // this needs to be here as some plugins use xercesc
+#if 0
+ // this needs to be here as some plugins use xercesc, now in X::X in DOM.h
try {
::xercesc_3_1::XMLPlatformUtils::Initialize();
} catch (const XERCESC_NS::XMLException& toCatch) {
ERROR_PLATFORM_THROW("Cannot initialize XercesC: " + X(toCatch.getMessage()).str());
}
-
+#endif
if (_instance == NULL) {
_instance = new Factory(Factory::_defaultPluginPath);
}
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.cpp
index 9eaa8c5..684604f 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.cpp
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.cpp
@@ -27,7 +27,6 @@
#include "uscxml/util/String.h"
#include "V8DataModel.h"
-//#include "V8SCXMLEvent.h"
#include "uscxml/messages/Event.h"
#include "uscxml/util/DOM.h"
diff --git a/src/uscxml/plugins/datamodel/null/NullDataModel.cpp b/src/uscxml/plugins/datamodel/null/NullDataModel.cpp
index efa77fa..cf608f5 100644
--- a/src/uscxml/plugins/datamodel/null/NullDataModel.cpp
+++ b/src/uscxml/plugins/datamodel/null/NullDataModel.cpp
@@ -21,7 +21,6 @@
#include "uscxml/Common.h"
#include "NullDataModel.h"
-#include "uscxml/util/DOM.h"
#ifdef BUILD_AS_PLUGINS
#include <Pluma/Connector.hpp>
diff --git a/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp b/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp
index d3bc5bf..783727a 100644
--- a/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp
+++ b/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp
@@ -18,6 +18,8 @@
*/
#include "USCXMLInvoker.h"
+#include "uscxml/util/DOM.h"
+
#ifdef BUILD_AS_PLUGINS
#include <Pluma/Connector.hpp>
diff --git a/src/uscxml/transform/ChartToVHDL.cpp b/src/uscxml/transform/ChartToVHDL.cpp
index 810d823..47ebf1c 100644
--- a/src/uscxml/transform/ChartToVHDL.cpp
+++ b/src/uscxml/transform/ChartToVHDL.cpp
@@ -1523,6 +1523,8 @@ void ChartToVHDL::writeOptimalTransitionSetSelection(std::ostream &stream) {
}
}
+ LOGD(USCXML_WARN) << ATTR(transition, X("postFixOrder"));
+
VBranch *tree = (VASSIGN,
VLINE("in_optimal_transition_set_" + ATTR(transition, X("postFixOrder")) + "_sig"),
(VAND,
@@ -1536,7 +1538,7 @@ void ChartToVHDL::writeOptimalTransitionSetSelection(std::ostream &stream) {
"_i"))
: (VNOP, VLINE("'1'")),
- VLINE("state_active_" + ATTR(transition, kXMLCharSource) + "_sig"),
+ VLINE("state_active_" + ATTR(transition, X("source")) + "_sig"),
nameMatchers,
(VNOT, conflicters)));
diff --git a/src/uscxml/util/DOM.h b/src/uscxml/util/DOM.h
index b26abc3..74133e8 100644
--- a/src/uscxml/util/DOM.h
+++ b/src/uscxml/util/DOM.h
@@ -201,7 +201,7 @@ public :
return _localForm;
}
- operator XMLCh* () const {
+ operator XMLCh* () const {
assert(_unicodeForm != NULL); // constructor with XMLCh
return _unicodeForm;
}
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 2b90b97..5cb9a01 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -83,9 +83,34 @@ add_executable(test-state-pass src/test-state-pass.cpp ${GETOPT_FILES})
target_link_libraries(test-state-pass uscxml)
set_target_properties(test-state-pass PROPERTIES FOLDER "Tests")
-add_executable(test-gen-c src/test-gen-c.cpp ${GETOPT_FILES})
-target_link_libraries(test-gen-c uscxml)
+add_executable(test-gen-c
+ src/test-gen-c.cpp
+ ${PROJECT_SOURCE_DIR}/src/uscxml/interpreter/BasicDelayedEventQueue.cpp
+ ${PROJECT_SOURCE_DIR}/src/uscxml/interpreter/BasicEventQueue.cpp
+ ${PROJECT_SOURCE_DIR}/src/uscxml/interpreter/EventQueue.cpp
+ ${PROJECT_SOURCE_DIR}/src/uscxml/interpreter/Logging.cpp
+ ${PROJECT_SOURCE_DIR}/src/uscxml/interpreter/StdOutLogger.cpp
+ ${PROJECT_SOURCE_DIR}/src/uscxml/util/UUID.cpp
+ # ${PROJECT_SOURCE_DIR}/src/uscxml/util/URL.cpp
+ ${PROJECT_SOURCE_DIR}/src/uscxml/util/Convenience.cpp
+ ${PROJECT_SOURCE_DIR}/src/uscxml/util/Base64.c
+ ${PROJECT_SOURCE_DIR}/src/uscxml/util/MD5.c
+ ${PROJECT_SOURCE_DIR}/src/uscxml/util/SHA1.c
+ ${PROJECT_SOURCE_DIR}/src/uscxml/messages/Data.cpp
+ ${PROJECT_SOURCE_DIR}/src/uscxml/messages/Event.cpp
+ ${PROJECT_SOURCE_DIR}/src/uscxml/messages/Blob.cpp
+ ${PROJECT_SOURCE_DIR}/src/uscxml/plugins/Factory.cpp
+ ${PROJECT_SOURCE_DIR}/src/uscxml/plugins/DataModel.cpp
+ ${PROJECT_SOURCE_DIR}/src/uscxml/plugins/Invoker.cpp
+ ${PROJECT_SOURCE_DIR}/src/uscxml/plugins/IOProcessor.cpp
+ ${PROJECT_SOURCE_DIR}/src/uscxml/plugins/datamodel/null/NullDataModel.cpp
+# ${PROJECT_SOURCE_DIR}/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.cpp
+ ${PROJECT_SOURCE_DIR}/contrib/src/jsmn/jsmn.c
+ ${PROJECT_SOURCE_DIR}/contrib/src/evws/evws.c
+ ${GETOPT_FILES})
+target_link_libraries(test-gen-c ${LIBEVENT_LIBRARIES})
set_target_properties(test-gen-c PROPERTIES FOLDER "Tests")
+set_target_properties(test-gen-c PROPERTIES COMPILE_DEFINITIONS "NO_XERCESC;FEATS_ON_CMD")
# issues
file(GLOB_RECURSE USCXML_ISSUES
diff --git a/test/src/test-gen-c.cpp b/test/src/test-gen-c.cpp
index c75492a..0b03129 100644
--- a/test/src/test-gen-c.cpp
+++ b/test/src/test-gen-c.cpp
@@ -23,7 +23,7 @@
//#include "/Users/sradomski/Documents/TK/Code/uscxml/build/cli/test/gen/c/ecma/test446.scxml.machine.c"
#endif
-#include "uscxml/util/URL.h"
+//#include "uscxml/util/URL.h"
//#include "uscxml/concurrency/Timer.h"
//#include "uscxml/dom/DOMUtils.h"
#include "uscxml/plugins/Factory.h"
@@ -44,6 +44,12 @@
using namespace uscxml;
+namespace XERCESC_NS {
+class DOMDocument;
+class DOMNode;
+}
+
+
class StateMachine : public DataModelCallbacks, public IOProcessorCallbacks, public DelayedEventQueueCallbacks {
public:
StateMachine(const uscxml_machine* machine) : machine(machine), parentMachine(NULL), topMostMachine(NULL), invocation(NULL) {
@@ -105,7 +111,7 @@ public:
}
XERCESC_NS::DOMDocument* getDocument() const {
- return document;
+ return NULL;
}
const std::map<std::string, Invoker>& getInvokers() {
return invokers;
@@ -675,6 +681,7 @@ public:
if (data->content) {
content << data->content;
} else {
+#if 0
URL sourceURL(data->src);
if (USER_DATA(ctx)->baseURL.size() > 0) {
sourceURL = URL::resolve(sourceURL, USER_DATA(ctx)->baseURL);
@@ -682,6 +689,7 @@ public:
sourceURL = URL::resolveWithCWD(sourceURL);
}
content << sourceURL.getInContent();
+#endif
}
/**
* first attempt to parse as structured data, we will try
@@ -947,8 +955,8 @@ protected:
size_t currIteration;
};
- X xmlPrefix;
- XERCESC_NS::DOMDocument* document;
+// X xmlPrefix;
+// XERCESC_NS::DOMDocument* document;
DelayedEventQueue delayQueue;
std::map<std::string, std::tuple<std::string, std::string, std::string> > sendUUIDs;
diff --git a/test/src/test-validating.cpp b/test/src/test-validating.cpp
index 528812b..e69c07d 100644
--- a/test/src/test-validating.cpp
+++ b/test/src/test-validating.cpp
@@ -2,6 +2,7 @@
#include "uscxml/Interpreter.h"
#include "uscxml/interpreter/InterpreterImpl.h"
#include "uscxml/debug/InterpreterIssue.h"
+#include "uscxml/util/DOM.h"
#include "uscxml/interpreter/Logging.h"
#include <xercesc/util/PlatformUtils.hpp>
#include <iostream>