summaryrefslogtreecommitdiffstats
path: root/src/bindings/swig/uscxml_beautify.i
blob: 6892f95c33402089b679d4b9214b3e71f7dcdacc (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
%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, kXMLCharId))
				config.push_back(ATTR(state, kXMLCharId));
		}
		return config;
	}
		
};

%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;
	}
	
};