Determine whether a class is derived from another class
// Create three classes and check their relations
#include "hbclass.ch"
FUNCTION main()
local oSuper, oObject, oDress
oSuper := TMood():New()
oObject := THappy():New()
oDress := TShirt():New()
? __objDerivedFrom( oObject, oSuper ) // .T.
? __objDerivedFrom( oSuper, oObject ) // .F.
? __objDerivedFrom( oObject, oDress ) // .F.
RETURN NIL
CLASS TMood
METHOD New() INLINE Self
ENDCLASS
CLASS THappy FROM TMood
METHOD Smile() INLINE qout( "*smile*" )
ENDCLASS
CLASS TShirt
DATA Color
DATA Size
METHOD New() INLINE Self
ENDCLASS