blob: 77f0b66c441bcc3046af80faa5ca9a5aed085515 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
#include "uscxml/Common.h"
#include "SWIDataModel.h"
#include "uscxml/Message.h"
#include <glog/logging.h>
#ifdef BUILD_AS_PLUGINS
#include <Pluma/Connector.hpp>
#endif
namespace uscxml {
#ifdef BUILD_AS_PLUGINS
PLUMA_CONNECTOR
bool connect(pluma::Host& host) {
host.add( new SWIDataModelProvider() );
return true;
}
#endif
SWIDataModel::SWIDataModel() {
}
DataModel* SWIDataModel::create(Interpreter* interpreter) {
SWIDataModel* dm = new SWIDataModel();
dm->_interpreter = interpreter;
const char* swiPath = SWI_LIBRARY_PATH;
dm->_plEngine = new PlEngine((char*)swiPath);
return dm;
}
void SWIDataModel::registerIOProcessor(const std::string& name, IOProcessor* ioprocessor) {
std::cout << "SWIDataModel::registerIOProcessor" << std::endl;
}
void SWIDataModel::setSessionId(const std::string& sessionId) {
std::cout << "SWIDataModel::setSessionId" << std::endl;
_sessionId = sessionId;
}
void SWIDataModel::setName(const std::string& name) {
std::cout << "SWIDataModel::setName" << std::endl;
_name = name;
}
SWIDataModel::~SWIDataModel() {
}
void SWIDataModel::pushContext() {
std::cout << "SWIDataModel::pushContext" << std::endl;
}
void SWIDataModel::popContext() {
std::cout << "SWIDataModel::popContext" << std::endl;
}
void SWIDataModel::initialize() {
std::cout << "SWIDataModel::initialize" << std::endl;
}
void SWIDataModel::setEvent(const Event& event) {
std::cout << "SWIDataModel::setEvent" << std::endl;
_event = event;
}
Data SWIDataModel::getStringAsData(const std::string& content) {
std::cout << "SWIDataModel::getStringAsData" << std::endl;
Data data;
return data;
}
bool SWIDataModel::validate(const std::string& location, const std::string& schema) {
std::cout << "SWIDataModel::validate" << std::endl;
return true;
}
uint32_t SWIDataModel::getLength(const std::string& expr) {
std::cout << "SWIDataModel::getLength" << std::endl;
return 0;
}
void SWIDataModel::eval(const std::string& expr) {
std::cout << "SWIDataModel::eval" << std::endl;
}
bool SWIDataModel::evalAsBool(const std::string& expr) {
std::cout << "SWIDataModel::evalAsBool" << std::endl;
return true;
}
std::string SWIDataModel::evalAsString(const std::string& expr) {
std::cout << "SWIDataModel::evalAsString" << std::endl;
return std::string("");
}
void SWIDataModel::assign(const std::string& location, const Data& data) {
std::cout << "SWIDataModel::assign" << std::endl;
}
void SWIDataModel::assign(const std::string& location, const std::string& expr) {
std::cout << "SWIDataModel::assign" << std::endl;
}
}
|