get_slots and is_instance added to readonly api + is_instance implementation
This commit is contained in:
parent
5e5865d0d5
commit
756b3f30da
2 changed files with 7 additions and 2 deletions
|
|
@ -143,7 +143,7 @@ class ODAPI:
|
|||
typ = self.cdapi.get_type(type_name)
|
||||
types = set(typ) if not include_subtypes else self.cdapi.transitive_sub_types[type_name]
|
||||
for type_of_obj in self.bottom.read_outgoing_elements(obj, "Morphism"):
|
||||
if type_of_obj in types:
|
||||
if self.get_name(type_of_obj) in types:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
|
@ -262,6 +262,7 @@ def bind_api_readonly(odapi):
|
|||
'get_target': odapi.get_target,
|
||||
'get_source': odapi.get_source,
|
||||
'get_slot': odapi.get_slot,
|
||||
'get_slots': odapi.get_slots,
|
||||
'get_slot_value': odapi.get_slot_value,
|
||||
'get_slot_value_default': odapi.get_slot_value_default,
|
||||
'get_all_instances': odapi.get_all_instances,
|
||||
|
|
@ -270,6 +271,7 @@ def bind_api_readonly(odapi):
|
|||
'get_outgoing': odapi.get_outgoing,
|
||||
'get_incoming': odapi.get_incoming,
|
||||
'has_slot': odapi.has_slot,
|
||||
'is_instance': odapi.is_instance,
|
||||
}
|
||||
return funcs
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue