summaryrefslogtreecommitdiffstats
path: root/src/bindings
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-04-30 17:48:25 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-04-30 17:48:25 (GMT)
commitaa635ecc06213bfb7f4f6c62cbb8e99832d99d48 (patch)
tree11e7a8c6a18ba979c00fa6a466a7296001b1dfb1 /src/bindings
parent3d3f434c5be68a7e2b86ecccbaba40887852db99 (diff)
downloaduscxml-aa635ecc06213bfb7f4f6c62cbb8e99832d99d48.zip
uscxml-aa635ecc06213bfb7f4f6c62cbb8e99832d99d48.tar.gz
uscxml-aa635ecc06213bfb7f4f6c62cbb8e99832d99d48.tar.bz2
Started to offer state predicates for php
Diffstat (limited to 'src/bindings')
-rw-r--r--src/bindings/swig/php/uscxml.i12
-rw-r--r--src/bindings/swig/php/uscxmlNativePHP.php20
2 files changed, 26 insertions, 6 deletions
diff --git a/src/bindings/swig/php/uscxml.i b/src/bindings/swig/php/uscxml.i
index 5f0b930..5dd59b9 100644
--- a/src/bindings/swig/php/uscxml.i
+++ b/src/bindings/swig/php/uscxml.i
@@ -42,6 +42,18 @@ void*** tsrm_ls;
%ignore uscxml::InterpreterImpl;
//***********************************************
+// Beautify interpreter class
+//***********************************************
+
+%ignore uscxml::Interpreter::isAtomic(Arabica::DOM::Node<std::string>);
+%extend uscxml::Interpreter {
+ bool isAtomic(const std::string stateId) {
+ Arabica::DOM::Node<std::string> state = self->getState(stateId);
+ return self->isAtomic(state);
+ }
+}
+
+//***********************************************
// Parse the header file to generate wrappers
//***********************************************
diff --git a/src/bindings/swig/php/uscxmlNativePHP.php b/src/bindings/swig/php/uscxmlNativePHP.php
index e7ef93d..61e7c2e 100644
--- a/src/bindings/swig/php/uscxmlNativePHP.php
+++ b/src/bindings/swig/php/uscxmlNativePHP.php
@@ -274,8 +274,12 @@ class Event {
return $r;
}
- function setData($invokeId) {
- Event_setData($this->_cPtr,$invokeId);
+ function setData($data) {
+ Event_setData($this->_cPtr,$data);
+ }
+
+ function initContent($content) {
+ Event_initContent($this->_cPtr,$content);
}
static function fromXML($xmlString) {
@@ -747,10 +751,6 @@ class Interpreter {
return Interpreter_isTargetless($transition);
}
- static function isAtomic($state) {
- return Interpreter_isAtomic($state);
- }
-
static function isFinal($state) {
return Interpreter_isFinal($state);
}
@@ -832,6 +832,14 @@ class Interpreter {
static function getUUID() {
return Interpreter_getUUID();
}
+
+ function isAtomic($stateId=null) {
+ switch (func_num_args()) {
+ case 0: $r=Interpreter_isAtomic($this->_cPtr); break;
+ default: $r=Interpreter_isAtomic($this->_cPtr,$stateId);
+ }
+ return $r;
+ }
}
class InterpreterMonitor {