1 import bind_virtual_factory
as bvf
7 bvf.MyVirtualClass.__init__(self)
14 print(
"Hello from doSomething!")
15 assert isinstance(data, ImplData)
16 print(
"Data value:", data.value)
21 print(
"Hello from doSomethingRef!")
23 assert isinstance(data, ImplData)
24 print(
"Data value:", data.value)
31 bvf.MyVirtualData.__init__(self, c)
37 data = obj.createData()
43 print(
"Calling doSomething (by ptr)")
44 d1 = bvf.callDoSomethingPtr(obj)
45 print(
"Output data.value:", d1.value)
51 d2 = bvf.callDoSomethingRef(obj)
64 assert isinstance(d1, ImplData)
67 d2 = bvf.iden_shared(d)
68 assert isinstance(d2, ImplData)
71 print(
"copy shared ptr -> py -> cpp")
72 d3 = bvf.copy_shared(d)
73 assert isinstance(d3, ImplData)
def test_instantiate_child()
def test_call_do_something_ptr()
def doSomethingPtr(self, data)
def test_call_do_something_ref()
def doSomethingRef(self, data)
void print(const Tensor &tensor)