Claims
- 1. An object-oriented method for controlling execution of a program in a digital computer, comprising the steps of:
- defining a software object having one or more named properties;
- defining a software method implementing a predetermined behavior without associating the software method with any particular class of software objects;
- including in the definition of the software method an associated set of properties;
- comparing the associated set of properties of the software method to the named properties of the software object; and
- if the associated set of properties of the software method matches the named properties of the software object, executing the software method by applying the software method to the software object, whereby the behavior implemented by the software method is triggered by the properties of the software object.
- 2. A method according to claim 1 and further comprising:
- defining a selected condition for the software method;
- if the associated set of properties of the software method matches the named properties of the software object, testing for the defined condition; and
- executing the software method only if the defined condition also is satisfied.
- 3. A method according to claim 2 wherein the condition includes a selected one of the set of properties together with a predetermined value of the selected property; and said testing step includes determining whether the software object has a current value of the selected property equal to the predetermined value.
- 4. A method according to claim 1 wherein said comparing step includes determining whether the associated set of properties defining the software method is a subset of the named properties of the software object; and said executing step comprises executing the software method if the associated set of properties defining the software method is a subset of the named properties of the software object.
- 5. A method according to claim 4 and further comprising:
- defining a selected condition for the software method;
- if the associated set of properties of the software method is a subset of the named properties of the software object, testing for the defined condition; and
- executing the software method only if the defined condition also is satisfied.
- 6. A method according to claim 5 wherein the condition includes a selected one of the set of properties together with a predetermined value of the selected property; and said testing step includes determining whether the software object has a current value of the selected property equal to the predetermined value.
RELATED APPLICATION
This application is a continuation of U.S. application Ser. No. 08/546,316, filed Oct. 20, 1995 now U.S. Pat. No. 5,822,587.
US Referenced Citations (7)
Continuations (1)
|
Number |
Date |
Country |
| Parent |
546316 |
Oct 1995 |
|