File: ServiceDefinitionPython.i

package info (click to toggle)
robotraconteur 1.2.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 101,380 kB
  • sloc: cpp: 1,149,268; cs: 87,653; java: 58,127; python: 26,897; ansic: 356; sh: 152; makefile: 90; xml: 51
file content (57 lines) | stat: -rw-r--r-- 1,310 bytes parent folder | download
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
%feature("pythonappend") std::vector<boost::shared_ptr<RobotRaconteur::MemberDefinition> >::__getitem__ %{
a=MemberDefinitionUtil.ToProperty(val)
if (not a is None):
	return a
a=MemberDefinitionUtil.ToFunction(val)
if (not a is None):
	return a
a=MemberDefinitionUtil.ToEvent(val)
if (not a is None):
	return a
a=MemberDefinitionUtil.ToObjRef(val)
if (not a is None):
	return a
a=MemberDefinitionUtil.ToPipe(val)
if (not a is None):
	return a
a=MemberDefinitionUtil.ToCallback(val)
if (not a is None):
	return a
a=MemberDefinitionUtil.ToWire(val)
if (not a is None):
	return a
a=MemberDefinitionUtil.ToMemory(val)
if (not a is None):
	return a
return val

%}

%include "ServiceDefinition.i"

%extend RobotRaconteur::RobotRaconteurVersion {

%pythoncode %{
    def __eq__(self, other):
        return RobotRaconteurVersion_eq(self,other)

    def __ne___(self, other):
        return RobotRaconteurVersion_ne(self,other)

    def __gt__(self, other):
        return RobotRaconteurVersion_gt(self,other)

    def __ge__(self, other):
        return RobotRaconteurVersion_ge(self,other)

    def __lt__(self, other):
        return RobotRaconteurVersion_lt(self,other)

    def __le__(self, other):
        return RobotRaconteurVersion_le(self,other)

    def  __str__(self):
        return self.ToString()
%}

}