- Publicity: Public Only All
callback-procs.tcl
Supports the use of callbacks.
- Location:
- packages/acs-tcl/tcl/callback-procs.tcl
- Author:
- Lee Denison <lee@xarg.co.uk>
Procedures in this file
- callback::get_object_type_impl (public)
- callback::impl_exists (public)
Detailed information
callback::get_object_type_impl (public)
callback::get_object_type_impl -object_type object_type \ -callback callback
Finds the most type specific implementation of
callback
.
- Switches:
- -object_type (required)
- -callback (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
callback::impl_exists (public)
callback::impl_exists -callback callback -impl impl
Returns whether the specified implementation exists.
- Switches:
- -callback (required)
- -impl (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Content File Source
ad_library { Supports the use of callbacks. @author Lee Denison (lee@xarg.co.uk) } namespace eval callback {} d_proc -public callback::impl_exists { {-callback:required} {-impl:required} } { Returns whether the specified implementation exists. } { return [expr {[namespace which ::callback::${callback}::impl::${impl}] ne ""}] } d_proc -public callback::get_object_type_impl { {-object_type:required} {-callback:required} } { Finds the most type specific implementation of <code>callback</code>. } { if {[callback::impl_exists -callback $callback -impl $object_type]} { return $object_type } else { set supertypes [acs_object_type::supertypes \ -subtype $object_type] foreach type $supertypes { if {[callback::impl_exists -callback $callback -impl $type]} { return $type } } } return "" } # Local variables: # mode: tcl # tcl-indent-level: 4 # indent-tabs-mode: nil # End: