def l(self, l):
     _ret_c = lib.cw__enum_usage_interface_l(
         self._cpp_impl, CPyObject.fromPy(ListEnumColorHelper.c_data_set,
                                          l))
     CPyException.toPyCheckAndRaise(_ret_c)
     _ret = CPyObject.toPy(ListEnumColorHelper.c_data_set, _ret_c)
     assert _ret is not None
     return _ret
Example #2
0
 def __get_elem(cself, index):
     try:
         _ret = CPyObject.fromPy(ListStringHelper.c_data_set, CPyObject.toPy(None, cself)[index])
         assert _ret != ffi.NULL
         return _ret
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
Example #3
0
 def __get_elem(cself, index):
     try:
         _ret = CPyObject.fromPy(ListStringHelper.c_data_set,
                                 CPyObject.toPy(None, cself)[index])
         assert _ret != ffi.NULL
         return _ret
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
Example #4
0
 def __get_elem(cself, index):
     try:
         _ret = CPyPrimitive.fromPy(CPyObject.toPy(None, cself)[index])
         return _ret
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
Example #5
0
 def get_list_binary(self):
     _ret_c = lib.cw__foo_containers_interface_get_list_binary(
         self._cpp_impl)
     CPyException.toPyCheckAndRaise(_ret_c)
     _ret = CPyObject.toPy(ListBinaryHelper.c_data_set, _ret_c)
     assert _ret is not None
     return _ret
Example #6
0
 def __get_elem(cself, index):
     try:
         _ret = CPyPrimitive.fromPy(CPyObject.toPy(None, cself)[index])
         return _ret
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
Example #7
0
 def __get_elem(cself, index):
     try:
         with CPyBinary.fromPyOpt(CPyObject.toPy(None, cself)[index]) as py_obj:
             return py_obj.release_djinni_binary()
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
Example #8
0
 def get_primitive_list_f1(cself):
     try:
         _ret = CPyObject.fromPy(ListInt64THelper.c_data_set, CPyRecord.toPy(None, cself).list)
         assert _ret != ffi.NULL
         return _ret
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
 def python_create_enum_usage_record(e, o, l, s, m):
     py_rec = EnumUsageRecord(
         CPyEnum.toPy(Color, e), CPyEnum.toPyOpt(Color, o),
         CPyObject.toPy(ListEnumColorHelper.c_data_set, l),
         CPyObjectProxy.toPyObj(SetEnumColorHelper.c_data_set, s),
         CPyObjectProxy.toPyObj(MapEnumColorEnumColorHelper.c_data_set, m))
     return CPyRecord.fromPy(EnumUsageRecord.c_data_set,
                             py_rec)  #to do: can be optional?
 def get_foo_containers_record_f6(cself):
     try:
         _ret = CPyObject.fromPy(ListRecordFooSomeOtherRecordHelper.c_data_set, CPyRecord.toPy(None, cself).list_record)
         assert _ret != ffi.NULL
         return _ret
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
Example #11
0
 def get_nested_collection_f1(cself):
     try:
         _ret = CPyObject.fromPy(ListSetStringHelper.c_data_set, CPyRecord.toPy(None, cself).set_list)
         assert _ret != ffi.NULL
         return _ret
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
 def __get_elem(cself, index):
     try:
         _ret = CPyRecord.fromPy(FooSomeOtherRecord.c_data_set, CPyObject.toPy(None, cself)[index])
         assert _ret != ffi.NULL
         return _ret
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
 def get_foo_containers_record_f1(cself):
     try:
         return CPyObject.fromPyOpt(
             ListInt32THelper.c_data_set,
             CPyRecord.toPy(None, cself).optional_list_int)
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
 def get_foo_containers_record_f4(cself):
     try:
         _ret = CPyObject.fromPy(ListOptionalBinaryHelper.c_data_set, CPyRecord.toPy(None, cself).list_optional_binary)
         assert _ret != ffi.NULL
         return _ret
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
Example #15
0
 def __get_elem(cself, index):
     try:
         with CPyBinary.fromPyOpt(CPyObject.toPy(None,
                                                 cself)[index]) as py_obj:
             return py_obj.release_djinni_binary()
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
 def get_foo_containers_record_f5(cself):
     try:
         _ret = CPyObject.fromPy(ListListStringHelper.c_data_set, CPyRecord.toPy(None, cself).list_list_string)
         assert _ret != ffi.NULL
         return _ret
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
Example #17
0
 def __get_elem(cself, index):
     try:
         with CPyString.fromPy(CPyObject.toPy(None, cself)[index]) as py_obj:
             _ret = py_obj.release_djinni_string()
             assert _ret != ffi.NULL
             return _ret
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
 def get_map_list_record_f1(cself):
     try:
         _ret = CPyObject.fromPy(ListMapStringInt64THelper.c_data_set,
                                 CPyRecord.toPy(None, cself).map_list)
         assert _ret != ffi.NULL
         return _ret
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
Example #19
0
 def get_item_list_f1(cself):
     try:
         _ret = CPyObject.fromPy(ListStringHelper.c_data_set,
                                 CPyRecord.toPy(None, cself).items)
         assert _ret != ffi.NULL
         return _ret
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
Example #20
0
 def get_all_datatypes_f11(cself):
     try:
         _ret = CPyObject.fromPy(ListBoolHelper.c_data_set,
                                 CPyRecord.toPy(None, cself).listData)
         assert _ret != ffi.NULL
         return _ret
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
 def __get_elem(cself, index):
     try:
         _ret = CPyRecord.fromPy(FooSomeOtherRecord.c_data_set,
                                 CPyObject.toPy(None, cself)[index])
         assert _ret != ffi.NULL
         return _ret
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
Example #22
0
 def __get_elem(cself, index):
     try:
         with CPyString.fromPy(CPyObject.toPy(None, cself)[index]) as py_obj:
             _ret = py_obj.release_djinni_string()
             assert _ret != ffi.NULL
             return _ret
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
 def get_foo_containers_record_f3(cself):
     try:
         _ret = CPyObject.fromPy(ListBinaryHelper.c_data_set,
                                 CPyRecord.toPy(None, cself).list_binary)
         assert _ret != ffi.NULL
         return _ret
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
Example #24
0
 def get_my_record_f3(cself):
     try:
         _ret = CPyObject.fromPy(ListUint32THelper.c_data_set,
                                 CPyRecord.toPy(None, cself).test2)
         assert _ret != ffi.NULL
         return _ret
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
 def get_enum_usage_record_f3(cself):
     try:
         _ret = CPyObject.fromPy(ListEnumColorHelper.c_data_set,
                                 CPyRecord.toPy(None, cself).l)
         assert _ret != ffi.NULL
         return _ret
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
 def __get_elem(cself, index):
     try:
         _ret = CPyObjectProxy.fromPy(
             MapStringInt64THelper.c_data_set,
             MapStringInt64TProxy(CPyObject.toPy(None, cself)[index]))
         assert _ret != ffi.NULL
         return _ret
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
Example #27
0
 def __get_value(cself, key):
     pyKey = CPyPrimitive.toPy(key)
     assert pyKey is not None
     try:
         _ret = CPyObject.fromPy(ListDateHelper.c_data_set, CPyObjectProxy.toPyObj(None, cself)[pyKey])
         assert _ret != ffi.NULL
         return _ret
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
Example #28
0
 def __get_value(cself, key):
     pyKey = CPyPrimitive.toPy(key)
     assert pyKey is not None
     try:
         _ret = CPyObject.fromPy(ListDateHelper.c_data_set,
                                 CPyObjectProxy.toPyObj(None, cself)[pyKey])
         assert _ret != ffi.NULL
         return _ret
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
Example #29
0
 def python_create_my_record(test, test1, test2, test3, test3_1, test4,
                             test4_1, test5, test6, test7, test8, test9,
                             test10, test10_1, test11, test13, test14,
                             test15, test16, test17):
     py_rec = MyRecord(
         CPyPrimitive.toPy(test), CPyBoxedU32.toPyOpt(test1),
         CPyObject.toPy(ListUint32THelper.c_data_set, test2),
         CPyString.toPy(test3), CPyString.toPyOpt(test3_1),
         CPyDate.toPy(test4), CPyBoxedDate.toPyOpt(test4_1),
         CPyBinary.toPy(test5),
         CPyObject.toPy(ListBinaryHelper.c_data_set, test6),
         CPyObjectProxy.toPyObj(SetInt32THelper.c_data_set, test7),
         CPyObjectProxy.toPyObj(MapInt32TStringHelper.c_data_set, test8),
         CPyRecord.toPy(Rc.c_data_set, test9),
         CPyRecord.toPyOpt(Rc.c_data_set, test10),
         CPyObject.toPy(ListRecordRcHelper.c_data_set, test10_1),
         CPyEnum.toPy(MyEnum, test11), CPyEnum.toPyOpt(MyEnum, test13),
         CPyBoxedI16.toPyOpt(test14),
         CPyObject.toPy(ListEnumMyEnumHelper.c_data_set, test15),
         CPyObjectProxy.toPyObj(SetEnumMyEnumHelper.c_data_set, test16),
         CPyObjectProxy.toPyObj(MapEnumMyEnumInt16THelper.c_data_set,
                                test17))
     return CPyRecord.fromPy(MyRecord.c_data_set,
                             py_rec)  #to do: can be optional?
Example #30
0
 def python_create_all_datatypes(booleanData, integer8Data, integer16Data,
                                 integer32Data, integer64Data, float32Data,
                                 float64Data, stringData, binaryData,
                                 dateData, listData, setData, mapData,
                                 optionalData):
     py_rec = AllDatatypes(
         CPyPrimitive.toPy(booleanData), CPyPrimitive.toPy(integer8Data),
         CPyPrimitive.toPy(integer16Data), CPyPrimitive.toPy(integer32Data),
         CPyPrimitive.toPy(integer64Data), CPyPrimitive.toPy(float32Data),
         CPyPrimitive.toPy(float64Data), CPyString.toPy(stringData),
         CPyBinary.toPy(binaryData), CPyDate.toPy(dateData),
         CPyObject.toPy(ListBoolHelper.c_data_set, listData),
         CPyObjectProxy.toPyObj(SetBoolHelper.c_data_set, setData),
         CPyObjectProxy.toPyObj(MapInt8TBoolHelper.c_data_set, mapData),
         CPyBoxedBool.toPyOpt(optionalData))
     return CPyRecord.fromPy(AllDatatypes.c_data_set,
                             py_rec)  #to do: can be optional?
 def python_create_foo_containers_record(optional_list_int,list_int,list_binary,list_optional_binary,list_list_string,list_record,optional_map_string_int,map_string_int,map_string_string,map_optional_string_optional_string,map_int_list_date,optional_set_string,set_string,set_optional_string,map_int_set_string,map_optional_int_set_string):
     py_rec = FooContainersRecord(
         CPyObject.toPyOpt(ListInt32THelper.c_data_set, optional_list_int),
         CPyObject.toPy(ListInt32THelper.c_data_set, list_int),
         CPyObject.toPy(ListBinaryHelper.c_data_set, list_binary),
         CPyObject.toPy(ListOptionalBinaryHelper.c_data_set, list_optional_binary),
         CPyObject.toPy(ListListStringHelper.c_data_set, list_list_string),
         CPyObject.toPy(ListRecordFooSomeOtherRecordHelper.c_data_set, list_record),
         CPyObjectProxy.toPyObjOpt(MapStringInt32THelper.c_data_set, optional_map_string_int),
         CPyObjectProxy.toPyObj(MapStringInt32THelper.c_data_set, map_string_int),
         CPyObjectProxy.toPyObj(MapStringStringHelper.c_data_set, map_string_string),
         CPyObjectProxy.toPyObj(MapOptionalStringOptionalStringHelper.c_data_set, map_optional_string_optional_string),
         CPyObjectProxy.toPyObj(MapInt8TListDateHelper.c_data_set, map_int_list_date),
         CPyObjectProxy.toPyObjOpt(SetStringHelper.c_data_set, optional_set_string),
         CPyObjectProxy.toPyObj(SetStringHelper.c_data_set, set_string),
         CPyObjectProxy.toPyObj(SetOptionalStringHelper.c_data_set, set_optional_string),
         CPyObjectProxy.toPyObj(MapInt8TSetStringHelper.c_data_set, map_int_set_string),
         CPyObjectProxy.toPyObj(MapBoxedInt32TSetStringHelper.c_data_set, map_optional_int_set_string))
     return CPyRecord.fromPy(FooContainersRecord.c_data_set, py_rec) #to do: can be optional?
 def python_create_foo_containers_record(
         optional_list_int, list_int, list_binary, list_optional_binary,
         list_list_string, list_record, optional_map_string_int,
         map_string_int, map_string_string,
         map_optional_string_optional_string, map_int_list_date,
         optional_set_string, set_string, set_optional_string,
         map_int_set_string, map_optional_int_set_string):
     py_rec = FooContainersRecord(
         CPyObject.toPyOpt(ListInt32THelper.c_data_set, optional_list_int),
         CPyObject.toPy(ListInt32THelper.c_data_set, list_int),
         CPyObject.toPy(ListBinaryHelper.c_data_set, list_binary),
         CPyObject.toPy(ListOptionalBinaryHelper.c_data_set,
                        list_optional_binary),
         CPyObject.toPy(ListListStringHelper.c_data_set, list_list_string),
         CPyObject.toPy(ListRecordFooSomeOtherRecordHelper.c_data_set,
                        list_record),
         CPyObjectProxy.toPyObjOpt(MapStringInt32THelper.c_data_set,
                                   optional_map_string_int),
         CPyObjectProxy.toPyObj(MapStringInt32THelper.c_data_set,
                                map_string_int),
         CPyObjectProxy.toPyObj(MapStringStringHelper.c_data_set,
                                map_string_string),
         CPyObjectProxy.toPyObj(
             MapOptionalStringOptionalStringHelper.c_data_set,
             map_optional_string_optional_string),
         CPyObjectProxy.toPyObj(MapInt8TListDateHelper.c_data_set,
                                map_int_list_date),
         CPyObjectProxy.toPyObjOpt(SetStringHelper.c_data_set,
                                   optional_set_string),
         CPyObjectProxy.toPyObj(SetStringHelper.c_data_set, set_string),
         CPyObjectProxy.toPyObj(SetOptionalStringHelper.c_data_set,
                                set_optional_string),
         CPyObjectProxy.toPyObj(MapInt8TSetStringHelper.c_data_set,
                                map_int_set_string),
         CPyObjectProxy.toPyObj(MapBoxedInt32TSetStringHelper.c_data_set,
                                map_optional_int_set_string))
     return CPyRecord.fromPy(FooContainersRecord.c_data_set,
                             py_rec)  #to do: can be optional?
 def __get_size(cself):
     return len(CPyObject.toPy(None, cself))
Example #34
0
 def set_list_record(self, lr):
     lib.cw__foo_containers_interface_set_list_record(
         self._cpp_impl,
         CPyObject.fromPy(ListRecordFooSomeOtherRecordHelper.c_data_set,
                          lr))
     CPyException.toPyCheckAndRaise(ffi.NULL)
Example #35
0
 def __python_add(cself, key, value):
     CPyObjectProxy.toPyObj(None, cself)[CPyPrimitive.toPy(key)] = CPyObject.toPy(ListDateHelper.c_data_set, value)
 def __get_size(cself):
     return len(CPyObject.toPy(None, cself))
Example #37
0
 def set_optional_list_int(self, m):
     lib.cw__foo_containers_interface_set_optional_list_int(
         self._cpp_impl, CPyObject.fromPyOpt(ListInt32THelper.c_data_set,
                                             m))
     CPyException.toPyCheckAndRaise(ffi.NULL)
Example #38
0
 def python_create_primitive_list(list):
     py_rec = PrimitiveList(
         CPyObject.toPy(ListInt64THelper.c_data_set, list))
     return CPyRecord.fromPy(PrimitiveList.c_data_set, py_rec) #to do: can be optional?
Example #39
0
 def set_optional_list_int(self, m):
     lib.cw__foo_containers_interface_set_optional_list_int(self._cpp_impl, CPyObject.fromPyOpt(ListInt32THelper.c_data_set, m))
     CPyException.toPyCheckAndRaise(ffi.NULL)
Example #40
0
 def python_create_nested_collection(set_list):
     py_rec = NestedCollection(
         CPyObject.toPy(ListSetStringHelper.c_data_set, set_list))
     return CPyRecord.fromPy(NestedCollection.c_data_set, py_rec) #to do: can be optional?
Example #41
0
 def __python_add(cself, el):
     CPyObject.toPy(None, cself).append(CPyPrimitive.toPy(el))
 def __python_add(cself, el):
     CPyObject.toPy(None, cself).append(CPyRecord.toPy(FooSomeOtherRecord.c_data_set, el))
Example #43
0
 def __python_add(cself, el):
     CPyObject.toPy(None, cself).append(CPyBinary.toPy(el))
Example #44
0
 def __python_add(cself, el):
     CPyObject.toPy(None, cself).append(CPyBinary.toPyOpt(el))
Example #45
0
 def python_create_item_list(items):
     py_rec = ItemList(CPyObject.toPy(ListStringHelper.c_data_set, items))
     return CPyRecord.fromPy(ItemList.c_data_set,
                             py_rec)  #to do: can be optional?
Example #46
0
 def get_optional_list_int(self):
     _ret_c = lib.cw__foo_containers_interface_get_optional_list_int(self._cpp_impl)
     CPyException.toPyCheckAndRaise(_ret_c)
     _ret = CPyObject.toPyOpt(ListInt32THelper.c_data_set, _ret_c)
     return _ret
Example #47
0
 def __python_add(cself, el):
     CPyObject.toPy(None, cself).append(CPyString.toPy(el))
Example #48
0
 def set_list_record(self, lr):
     lib.cw__foo_containers_interface_set_list_record(self._cpp_impl, CPyObject.fromPy(ListRecordFooSomeOtherRecordHelper.c_data_set, lr))
     CPyException.toPyCheckAndRaise(ffi.NULL)
 def __python_add(cself, el):
     CPyObject.toPy(None, cself).append(
         CPyRecord.toPy(FooSomeOtherRecord.c_data_set, el))
Example #50
0
 def set_list_binary(self, lb):
     lib.cw__foo_containers_interface_set_list_binary(self._cpp_impl, CPyObject.fromPy(ListBinaryHelper.c_data_set, lb))
     CPyException.toPyCheckAndRaise(ffi.NULL)
Example #51
0
 def get_optional_list_int(self):
     _ret_c = lib.cw__foo_containers_interface_get_optional_list_int(
         self._cpp_impl)
     CPyException.toPyCheckAndRaise(_ret_c)
     _ret = CPyObject.toPyOpt(ListInt32THelper.c_data_set, _ret_c)
     return _ret
Example #52
0
 def get_list_binary(self):
     _ret_c = lib.cw__foo_containers_interface_get_list_binary(self._cpp_impl)
     CPyException.toPyCheckAndRaise(_ret_c)
     _ret = CPyObject.toPy(ListBinaryHelper.c_data_set, _ret_c)
     assert _ret is not None
     return _ret
Example #53
0
 def set_list_binary(self, lb):
     lib.cw__foo_containers_interface_set_list_binary(
         self._cpp_impl, CPyObject.fromPy(ListBinaryHelper.c_data_set, lb))
     CPyException.toPyCheckAndRaise(ffi.NULL)
Example #54
0
 def __python_add(cself, el):
     CPyObject.toPy(None, cself).append(CPyObject.toPy(ListStringHelper.c_data_set, el))
 def __get_elem(cself, index):
     try:
         _ret = CPyObjectProxy.fromPy(MapStringInt64THelper.c_data_set, MapStringInt64TProxy(CPyObject.toPy(None, cself)[index]))
         assert _ret != ffi.NULL
         return _ret
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
Example #56
0
 def __python_add(cself, el):
     CPyObject.toPy(None, cself).append(
         CPyObject.toPy(ListStringHelper.c_data_set, el))
 def __python_add(cself, el):
     CPyObject.toPy(None, cself).append(CPyObjectProxy.toPyObj(MapStringInt64THelper.c_data_set, el))
Example #58
0
 def python_create_item_list(items):
     py_rec = ItemList(
         CPyObject.toPy(ListStringHelper.c_data_set, items))
     return CPyRecord.fromPy(ItemList.c_data_set, py_rec) #to do: can be optional?
 def __python_add(cself, el):
     CPyObject.toPy(None, cself).append(CPyEnum.toPy(MyEnum, el))
 def get_foo_containers_record_f1(cself):
     try:
         return CPyObject.fromPyOpt(ListInt32THelper.c_data_set, CPyRecord.toPy(None, cself).optional_list_int)
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL