blob: 159bcaa4bc6e074f0c338ed343fc2433980ba6c3 (
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
|
%rename(NativeActionLanguage) ActionLanguage;
%rename(ActionLanguage) WrappedActionLanguage;
%rename(NativeDataModel) DataModel;
%rename(DataModel) WrappedDataModel;
//%rename(NativeDataModelExtension) DataModelExtension;
//%rename(DataModelExtension) WrappedDataModelExtension;
%rename(NativeExecutableContent) ExecutableContent;
%rename(ExecutableContent) WrappedExecutableContent;
%rename(NativeInvoker) Invoker;
%rename(Invoker) WrappedInvoker;
%rename(NativeIOProcessor) IOProcessor;
%rename(IOProcessor) WrappedIOProcessor;
%rename(NativeInterpreterMonitor) InterpreterMonitor;
%rename(InterpreterMonitor) WrappedInterpreterMonitor;
%rename(getInvokersNative) uscxml::Interpreter::getInvokers();
%rename(getIOProcessorsNative) uscxml::Interpreter::getIOProcessors();
%extend uscxml::ErrorEvent {
std::string toString() {
std::stringstream ss;
ss << *self;
return ss.str();
}
};
%extend uscxml::Interpreter {
std::vector<std::string> getConfiguration() {
std::list<XERCESC_NS::DOMElement*> nativeConfig = self->getConfiguration();
std::vector<std::string> config;
for (auto state : nativeConfig) {
if (HAS_ATTR(state, "id"))
config.push_back(ATTR(state, "id"));
}
return config;
}
};
%{
#include <easylogging++.h>
%}
%extend uscxml::Data {
std::vector<std::string> getCompoundKeys() {
std::vector<std::string> keys;
std::map<std::string, Data>::const_iterator iter = self->compound.begin();
while(iter != self->compound.end()) {
keys.push_back(iter->first);
iter++;
}
return keys;
}
};
|