def __len__(self): if self._is_private: pub_ptr = native_bt.component_from_private(self._component._ptr) count = self._get_port_count_fn(pub_ptr) native_bt.put(pub_ptr) else: count = self._get_port_count_fn(self._component._ptr) assert (count >= 0) return count
def __len__(self): if self._is_private: pub_ptr = native_bt.component_from_private(self._component._ptr) count = self._get_port_count_fn(pub_ptr) native_bt.put(pub_ptr) else: count = self._get_port_count_fn(self._component._ptr) assert(count >= 0) return count
def component(self): comp_ptr = native_bt.private_port_get_private_component(self._ptr) if comp_ptr is None: return pub_comp_ptr = native_bt.component_from_private(comp_ptr) assert (pub_comp_ptr) comp = bt2.component._create_generic_component_from_ptr(pub_comp_ptr) native_bt.put(comp_ptr) return comp
def component(self): comp_ptr = native_bt.private_port_get_private_component(self._ptr) if comp_ptr is None: return pub_comp_ptr = native_bt.component_from_private(comp_ptr) assert(pub_comp_ptr) comp = bt2.component._create_generic_component_from_ptr(pub_comp_ptr) native_bt.put(comp_ptr) return comp
def component_class(self): pub_ptr = native_bt.component_from_private(self._ptr) cc_ptr = native_bt.component_get_class(pub_ptr) native_bt.put(pub_ptr) assert (cc_ptr) return _create_generic_component_class_from_ptr(cc_ptr)
def graph(self): pub_ptr = native_bt.component_from_private(self._ptr) ptr = native_bt.component_get_graph(pub_ptr) native_bt.put(pub_ptr) assert (ptr) return bt2.Graph._create_from_ptr(ptr)
def name(self): pub_ptr = native_bt.component_from_private(self._ptr) name = native_bt.component_get_name(pub_ptr) native_bt.put(pub_ptr) assert (name is not None) return name
def component_class(self): pub_ptr = native_bt.component_from_private(self._ptr) cc_ptr = native_bt.component_get_class(pub_ptr) native_bt.put(pub_ptr) assert(cc_ptr) return _create_generic_component_class_from_ptr(cc_ptr)
def graph(self): pub_ptr = native_bt.component_from_private(self._ptr) ptr = native_bt.component_get_graph(pub_ptr) native_bt.put(pub_ptr) assert(ptr) return bt2.Graph._create_from_ptr(ptr)
def name(self): pub_ptr = native_bt.component_from_private(self._ptr) name = native_bt.component_get_name(pub_ptr) native_bt.put(pub_ptr) assert(name is not None) return name