acs_object::is_type_p (private)
acs_object::is_type_p -object_id object_id -object_types object_types \ [ -no_hierarchy ]
Defined in packages/acs-tcl/tcl/object-procs.tcl
Returns whether an object is of a given object type.
- Switches:
- -object_id
(required)- -object_types
(required)- -no_hierarchy
(boolean) (optional)- Returns:
- boolean
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- is_object_type_p
Source code: if { ![string is integer -strict $object_id] } { return 0 } set object [acs::per_request_cache eval -key acs-tcl.acs_object.is_type_p($object_id,$object_types,$no_hierarchy_p) { set object_type [acs_object_type $object_id] if {$object_type eq ""} { # Object was not found return 0 } elseif {$object_type in $object_types} { # Object is one of the types we look for return 1 } elseif {$no_hierarchy_p} { # Object is not one of the types we look # for and we were told to not look into # the hierarchy return 0 } else { # We expand the object type hierarchy and # see if one of our supertypes is a type # we look for foreach supertype [acs_object_type::supertypes -subtype $object_type] { if {$supertype in $object_types} { return 1 } } return 0 } }]XQL Not present: PostgreSQL, Oracle Generic XQL file: packages/acs-tcl/tcl/object-procs.xql