1 import pybind_wrapper_test
as pwt
3 p2 = pwt.sub.Point2(10, 20)
5 print(p2.func_with_default_args(10))
6 print(p2.func_with_default_args(10, 10))
7 p2.print_(
"test print")
9 p22 = pwt.sub.Point2(10)
12 p3 = pwt.Point3(10, 20, 30)
16 print(pwt.global_func_on_base(p2))
17 print(pwt.global_func_on_base(p3))
21 template_p2 = pwt.TemplatePoint2(p2)
22 print(template_p2.overload())
24 template_p3 = pwt.TemplatePoint3(p3)
25 print(template_p3.overload())
26 print(template_p3.overload(p3))
29 template_p3_copy = pwt.TemplatePoint3(template_p3)
30 print(template_p3_copy.overload())
31 print(template_p3.overload(template_p3_copy))
34 ret_p3 = template_p3.method_on_template_type(p3)
38 this = template_p3.method_on_this(p3)
39 print(this.method_on_template_type(p3).sum())
42 another_this = pwt.TemplatePoint2.static_method(other=template_p2, dummy=0.0)
45 print(another_this.template_methodPoint3(p3))
46 print(another_this.template_methodPoint2(p2))
49 inst = pwt.Template2Point2Point3Instantiation(p2, p3)
50 inst.property_t1 = pwt.sub.Point2(100)
51 print(
"inst overload: ", inst.sum_x())
54 print(inst.sum_x(p2, p3))
55 print(inst.property_t1.sum())
58 p4 = pwt.sub2.Point4(p2, 30, 40)