Patent ID: 7089242
Filing Date: 2006-08-08
Classification: G06F,Y10S

Abstract:
1. A method for controlling access to a sensitive function in a class, comprising: generating a friend object indicating external functions from external classes external to the class including the sensitive function, wherein the external functions indicated in the friend object are capable of being modified during runtime, wherein the sensitive function is capable of being associated with at least one of multiple friend objects, and wherein the sensitive function includes a check function statement indicating at least one friend object followed by at least one statement performing operations associated with the sensitive function; processing a call from a function in a class external to the class including the sensitive function during runtime; executing the check function statement in the sensitive function in response to processing the call to the sensitive function; determining whether the at least one friend object indicated in the executed check function statement indicates that the calling function is one of the indicated external functions that can access the sensitive function, wherein each of the at least one associated multiple friend objects indicates a different set of external functions that can access the sensitive function; and permitting the calling function access to the sensitive function in response to determining that the at least one friend object indicates that the calling function is one of the indicated external functions by executing the at least one statement in the sensitive function following the check function statement.