发明名称 System and method for providing context to operator overloading
摘要 A method of operator overloading that enables a user of a program development environment to view both the structure of the operands of the operation being overloaded, and also the context in which the operator is being used is disclosed. The present invention utilizes a parse tree created by a language processor. The use of the parse tree, which may be represented as a class, allows the context information to be made available to a class designer. Objects of the parse tree class include methods designed to identify the operator at a root and to retrieve left and right trees. An assignment function is defined which uses two parse tree objects as arguments and performs an indicated mathematical operation based upon the context revealed by the parse tree objects. The assignment function may exist in more than one class and be overloaded. The overloading of the assignment function enables the context within which the mathematical operation is occurring to become visible and be acted upon.
申请公布号 US7636914(B1) 申请公布日期 2009.12.22
申请号 US20030692524 申请日期 2003.10.24
申请人 THE MATH WORKS, INC. 发明人 JOHNSON STEVE
分类号 G06F9/44;G06F9/45 主分类号 G06F9/44
代理机构 代理人
主权项
地址