Inferior class relationship
Syntax
inferiorto('class1','class2',...)
Description
The inferiorto
function establishes a hierarchy which determines the order in which MATLAB calls object methods.
inferiorto('class1','class2',...)
invoked within a class constructor method (say myclass.m
) indicates that myclass
's method should not be invoked if a function is called with an object of class myclass
and one or more objects of class class1
, class2
, and so on.
Remarks
Suppose A
is of class 'class_a
', B
is of class 'class_b
' and C
is of class 'class_c'
. Also suppose the constructor class_c.m
contains the statement: inferiorto('class_a')
. Then e = fun(a,c)
or e = fun(c,a)
invokes class_a/fun
.
If a function is called with two objects having an unspecified relationship, the two objects are considered to have equal precedence, and the leftmost object's method is called. So, fun(b,c)
calls class_b/fun
, while fun(c,b)
calls class_c/fun
.
See Also
superiorto
Superior class relationship
[ Previous | Help Desk | Next ]