!ASIS Issue #091 !topic Add additional OOP interfaces to ASIS !reference ASIS 95-17 and 18 !from Bill Pritchett !keywords dispatching operations OO object-oriented !discussion Add Is_Dispatching_Operation and Corresponding_Called_Function_Unwound to Clause 17 (package Asis.Expressions). Add Is_Dispatching_Call and Corresponding_Called_Entity_Unwound to Clause 18 (package Asis.Statements). These are necessary to support OOP queries. !resolution Accept, with Modification. !date 98-05-06 !Notes Functions Corresponding_Called_Function_Unwound and Corresponding_Called_Entity_Unwound have nothing to do with OOP; they are best implemented as secondary queries. The following three interfaces were added to ASIS 2.0.Q to support OOP: --------------------------------------------------------------------------------------- -- 17.40 function Is_Dispatching_Operation --------------------------------------------------------------------------------------- function Is_Dispatching_Operation (Declaration : in Asis.Element) return Boolean; --------------------------------------------------------------------------------------- -- Declaration - Specifies the declaration to query. -- -- Returns True if the declaration is a primitive subprogram of a tagged type. -- -- Returns False for any unexpected argument. -- -- Expected Element_Kinds: -- A_Procedure_Declaration -- A_Function_Declaration -- A_Procedure_Renaming_Declaration -- A_Function_Renaming_Declaration -- --------------------------------------------------------------------------------------- -- 18.42 function Is_Dispatching_Call --------------------------------------------------------------------------------------- function Is_Dispatching_Call (Call : in Asis.Element) return Boolean; --------------------------------------------------------------------------------------- -- Call - Specifies the element to query. -- -- Returns True if the controlling tag of Call is dynamically determined. -- -- This function shall always return False when pragma Restrictions(No_Dispatch) -- applies. -- -- Returns False for any unexpected Element. -- -- Expected Element_Kinds: -- A_Function_Call -- A_Procedure_Call_Statement --------------------------------------------------------------------------------------- -- 18.43 function Is_Call_On_Dispatching_Operation --------------------------------------------------------------------------------------- function Is_Call_On_Dispatching_Operation (Call : in Asis.Element) return Boolean; --------------------------------------------------------------------------------------- -- Call - Specifies the element to query. -- -- Returns True if the name or prefix of Call denotes the declaration of a -- primitive operation of a tagged type. -- -- Returns False for any unexpected Element. -- -- Expected Element_Kinds: -- A_Function_Call -- A_Procedure_Call_Statement