|
of_isancestorclass
|
|
Full name
|
pfc_n_cst_metaclass.of_isancestorclass
|
Access
|
public
|
Extend of
|
boolean
|
Return value
|
boolean
|
Prototype
|
public function boolean of_isancestorclass(classdefinition,string)
|
Name
|
Datatype
|
lb_ancestor
|
boolean
|
lcd_ancestor
|
classdefinition
|
lcd_test
|
classdefinition
|
public function boolean of_isancestorclass (classdefinition acd_source, string as_ancestorclass);//////////////////////////////////////////////////////////////////////////////
//
// Function:
// of_isAncestorClass
//
// Access:
// public
//
// Arguments:
// acd_source source classdefinition
// as_ancestorclass ancestor classname
//
// Returns:
// boolean
//
// Description:
// Determines if as_ancestorclass is an ancestor class of acd_source
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 6.0 Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
// Copyright © 1996-1997 Sybase, Inc. and its subsidiaries. All rights reserved.
// Any distribution of the PowerBuilder Foundation Classes (PFC)
// source code by other than Sybase, Inc. and its subsidiaries is prohibited.
//
//////////////////////////////////////////////////////////////////////////////
boolean lb_ancestor
classdefinition lcd_ancestor
classdefinition lcd_test
// Validate classnames
if not isValid (acd_source) or isNull (acd_source) then
return lb_ancestor
end if
lcd_ancestor = findClassDefinition (as_ancestorclass)
if not isValid (lcd_ancestor) or isNull (lcd_ancestor) then
return lb_ancestor
end if
// Check if there is an ancestor relationship
lcd_test = acd_source.ancestor
do while isValid (lcd_test) and not lb_ancestor
if lcd_test.name = lcd_ancestor.name then
lb_ancestor = true
else
lcd_test = lcd_test.ancestor
end if
loop
return lb_ancestor
end function
Name
|
Owner
|
systemfunctions.findclassdefinition |
systemfunctions
|
systemfunctions.isnull |
systemfunctions
|
systemfunctions.isvalid |
systemfunctions
|