summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-06-12 23:33:52 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-06-12 23:33:52 (GMT)
commitbbd892b435c12395a6cf53bc53ed5acf195e4cbd (patch)
tree86ca106d7d347eb6361fca8c1dec4d7fc7cae965 /src
parent57510db0f3f10f85ecea53376ccf40688e2475bd (diff)
downloaduscxml-bbd892b435c12395a6cf53bc53ed5acf195e4cbd.zip
uscxml-bbd892b435c12395a6cf53bc53ed5acf195e4cbd.tar.gz
uscxml-bbd892b435c12395a6cf53bc53ed5acf195e4cbd.tar.bz2
Fixed build for unices
Diffstat (limited to 'src')
-rw-r--r--src/bindings/swig/php/uscxmlNativePHP.php34
-rw-r--r--src/uscxml/Factory.cpp16
-rw-r--r--src/uscxml/plugins/datamodel/CMakeLists.txt29
3 files changed, 60 insertions, 19 deletions
diff --git a/src/bindings/swig/php/uscxmlNativePHP.php b/src/bindings/swig/php/uscxmlNativePHP.php
index 7ca2e84..7d8b0aa 100644
--- a/src/bindings/swig/php/uscxmlNativePHP.php
+++ b/src/bindings/swig/php/uscxmlNativePHP.php
@@ -270,6 +270,10 @@ class Data {
return Data_isValid($this->_cPtr);
}
+ function hasKey($key) {
+ return Data_hasKey($this->_cPtr,$key);
+ }
+
static function fromJSON($jsonString) {
$r=Data_fromJSON($jsonString);
if (is_resource($r)) {
@@ -796,6 +800,20 @@ class Interpreter {
return Interpreter_getBaseURI($this->_cPtr);
}
+ function setNameSpaceInfo($namespaceInfo) {
+ Interpreter_setNameSpaceInfo($this->_cPtr,$namespaceInfo);
+ }
+
+ function getNameSpaceInfo() {
+ $r=Interpreter_getNameSpaceInfo($this->_cPtr);
+ if (is_resource($r)) {
+ $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
+ if (class_exists($c)) return new $c($r);
+ return new StringMap($r);
+ }
+ return $r;
+ }
+
function setCmdLineOptions($argc,$argv) {
Interpreter_setCmdLineOptions($this->_cPtr,$argc,$argv);
}
@@ -822,6 +840,14 @@ class Interpreter {
Interpreter_setParentQueue($this->_cPtr,$parentQueue);
}
+ function setFactory($factory) {
+ Interpreter_setFactory($this->_cPtr,$factory);
+ }
+
+ function getFactory() {
+ return Interpreter_getFactory($this->_cPtr);
+ }
+
function getXPathPrefix() {
return Interpreter_getXPathPrefix($this->_cPtr);
}
@@ -1014,6 +1040,14 @@ class Interpreter {
return Interpreter_getUUID();
}
+ function getImpl() {
+ return Interpreter_getImpl($this->_cPtr);
+ }
+
+ static function getInstances() {
+ return Interpreter_getInstances();
+ }
+
function getConfiguration() {
$r=Interpreter_getConfiguration($this->_cPtr);
if (is_resource($r)) {
diff --git a/src/uscxml/Factory.cpp b/src/uscxml/Factory.cpp
index 667c6f0..84d7632 100644
--- a/src/uscxml/Factory.cpp
+++ b/src/uscxml/Factory.cpp
@@ -11,7 +11,6 @@
#else
# include "uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.h"
-# include "uscxml/plugins/ioprocessor/modality/MMIHTTPIOProcessor.h"
# include "uscxml/plugins/ioprocessor/scxml/SCXMLIOProcessor.h"
# include "uscxml/plugins/invoker/scxml/USCXMLInvoker.h"
# include "uscxml/plugins/invoker/http/HTTPServletInvoker.h"
@@ -19,6 +18,10 @@
# include "uscxml/plugins/invoker/filesystem/dirmon/DirMonInvoker.h"
# include "uscxml/plugins/invoker/system/SystemInvoker.h"
+#ifdef PROTOBUF_FOUND
+# include "uscxml/plugins/ioprocessor/modality/MMIHTTPIOProcessor.h"
+#endif
+
# ifdef UMUNDO_FOUND
# include "uscxml/plugins/invoker/umundo/UmundoInvoker.h"
# include "uscxml/plugins/invoker/vxml/VoiceXMLInvoker.h"
@@ -166,6 +169,13 @@ Factory::Factory() {
}
#endif
+#ifdef PROTOBUF_FOUND
+ {
+ MMIHTTPIOProcessor* ioProcessor = new MMIHTTPIOProcessor();
+ registerIOProcessor(ioProcessor);
+ }
+#endif
+
// these are always available
{
NULLDataModel* dataModel = new NULLDataModel();
@@ -199,10 +209,6 @@ Factory::Factory() {
BasicHTTPIOProcessor* ioProcessor = new BasicHTTPIOProcessor();
registerIOProcessor(ioProcessor);
}
- {
- MMIHTTPIOProcessor* ioProcessor = new MMIHTTPIOProcessor();
- registerIOProcessor(ioProcessor);
- }
{
SCXMLIOProcessor* ioProcessor = new SCXMLIOProcessor();
registerIOProcessor(ioProcessor);
diff --git a/src/uscxml/plugins/datamodel/CMakeLists.txt b/src/uscxml/plugins/datamodel/CMakeLists.txt
index 8acbcf7..c1a6961 100644
--- a/src/uscxml/plugins/datamodel/CMakeLists.txt
+++ b/src/uscxml/plugins/datamodel/CMakeLists.txt
@@ -48,25 +48,26 @@ endif()
# XPath datamodel
-file(GLOB XPATH_DATAMODEL
- xpath/*.cpp
- xpath/*.h
-)
-source_group("Datamodel\\xpath" FILES ${XPATH_DATAMODEL})
-if (BUILD_AS_PLUGINS)
- add_library(datamodel_xpath SHARED ${XPATH_DATAMODEL})
- target_link_libraries(datamodel_xpath uscxml)
- set_target_properties(datamodel_xpath PROPERTIES FOLDER "Plugin DataModel")
-else()
- list (APPEND USCXML_FILES ${XPATH_DATAMODEL})
+if (BUILD_DM_XPATH)
+ file(GLOB XPATH_DATAMODEL
+ xpath/*.cpp
+ xpath/*.h
+ )
+ source_group("Datamodel\\xpath" FILES ${XPATH_DATAMODEL})
+ if (BUILD_AS_PLUGINS)
+ add_library(datamodel_xpath SHARED ${XPATH_DATAMODEL})
+ target_link_libraries(datamodel_xpath uscxml)
+ set_target_properties(datamodel_xpath PROPERTIES FOLDER "Plugin DataModel")
+ else()
+ list (APPEND USCXML_FILES ${XPATH_DATAMODEL})
+ endif()
endif()
-
# GOOGLE V8 ecmascript datamodel
#if (NOT APPLE OR IOS)
# set(ENV{V8_SRC} ${CMAKE_SOURCE_DIR}/../v8)
- if (V8_FOUND)
+ if (V8_FOUND AND BUILD_DM_ECMA)
file(GLOB V8_DATAMODEL
ecmascript/v8/*.cpp
ecmascript/v8/*.h
@@ -97,7 +98,7 @@ endif()
# SWI PROLOG datamodel
-if (SWI_FOUND)
+if (SWI_FOUND AND BUILD_DM_PROLOG)
# message(FATAL_ERROR "SWI_INCLUDE_DIR: ${SWI_INCLUDE_DIR}")
# if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")