Claims
- 1. A method of processing data comprising:
defining a first class with a first option data structure of a first form which supports, in instances of the class, references to option values without preallocation of memory space for the full option values; defining a second class with a second option data structure of a second form which supports, in instances of the second class, references to option values without preallocation of memory space for the full option values, the second form being different from the first form; and during compilation, encoding an option operation on an option value as a method call to an object of the first class or of the second class without regard to the form of the option data structures supported by the classes.
- 2. A method as claimed in claim 1 wherein the option data structure identifies change handler code that is executed when an option value changes.
- 3. A method as claimed in claim 2 wherein change handler code for one option is defined in different classes within a class inheritance hierarchy and the change handler code from each class is executed when the option value changes.
- 4. A method as claimed in claim 1 wherein an option data structure includes a default value, the method further comprising, in a get operation to an instance of the class, if an option value which applies to the instance has been set, getting the set option value and, if a value which applies has not been set, getting the default value for the class.
- 5. A method as claimed in claim 1 further comprising:
notifying objects of a change in an option value through a change handler identified by an option binding, the option binding being located by first searching a mapping data structure for a previously computed mapping to the option binding and, if no mapping was previously computed, by then computing the mapping to the option binding and storing the mapping in the mapping data structure.
- 6. A method as claimed in claim 1 wherein the first option data structure of the first form comprises a linked list of option items having option values.
- 7. A method as claimed in claim 6 wherein the second option data structure of the second form comprises a hash table.
- 8. A method as claimed in claim 1 wherein a nonlocal option value applies to other objects in a nonlocal option hierarchy.
- 9. A method as claimed in claim 8 wherein the nonlocal option hierarchy is a graphical hierarchy.
- 10. A method as claimed in claim 1 wherein the class which supports the option data structure includes defined fields to support values in preallocated memory space.
- 11. A data processing system comprising:
a first class with a first option data structure of a first form which supports, in instances of the class, references to option values without preallocation of memory space for the fall option values; a second class with a second option data structure of a second form which supports, in instances of the second class, references to option values without preallocation of memory space for the full option values, the second form being different from the first form; and a compiler which processes an option operation on an option value as a method call to an object of the first class or of the second class without regard to the form of the option data structures supported by the classes.
- 12. A system as claimed in claim 11 wherein the option data structure identifies change handler code that is executed when an option value changes.
- 13. A system as claimed in claim 12 wherein change handler code for one option is defined in different classes within a class inheritance hierarchy and the change handler code from each class is executed when the option value changes.
- 14. A system as claimed in claim 11 wherein an option data structure includes a default value which is obtained when an option value has not been set in an applicable instance object.
- 15. A system as claimed in claim 11 further comprising change handlers which notify objects of a change in an option value and a mapping data structure which maps an option name and class to an option binding which identifies a change handler.
- 16. A system as claimed in claim 11 wherein the first option data structure of the first form comprises a linked list of option items having option values.
- 17. A system as claimed in claim 16 wherein the second option data structure of the second form comprises a hash table.
- 18. A system as claimed in claim 11 wherein a nonlocal option value applies to other objects in a nonlocal option hierarchy.
- 19. A system as claimed in claim 18 wherein the nonlocal option hierarchy is a graphical hierarchy.
- 20. A system as claimed in claim 11 wherein the class which supports the option data structure includes defined fields to support values in preallocated memory space.
- 21. A data processing system comprising:
means for defining a first class with a first option data structure of a first form which supports, in instances of the class, references to option values without preallocation of memory space for the full option values; means for defining a second class with a second option data structure of a second form which supports, in instances of the second class, references to option values without preallocation of memory space for the fall option values, the second form being different from the first form; and compiler means for processing an option operation on an option value as a method call to an object of the first class or of the second class without regard to the form of the option data structures supported by the classes.
- 22. A computer program product comprising:
a computer usable medium for storing data; and a set of computer program instructions embodied on the computer usable medium, including instructions to:
define a first class with a first option data structure of a first form which supports, in instances of the class, references to option values without preallocation of memory space for the full option values; define a second class with a second option data structure of a second form which supports, in instances of the second class, references to option values without preallocation of memory space for the full option values, the second form being different from the first form; and during compilation, encode an option operation on an option value as a method call to an object of the first class or of the second class without regard to the form of the option data structures supported by the classes.
- 23. A product as claimed in claim 22 wherein the first option data structure of the first form comprises a linked list of option items having option values.
- 24. A product as claimed in claim 23 wherein the second option data structure of the second form comprises a hash table.
- 25. A computer data signal comprising a code segment including instructions to:
define a first class with a first option data structure of a first form which supports, in instances of the class, references to option values without preallocation of memory space for the full option values; define a second class with a second option data structure of a second form which supports, in instances of the second class, references to option values without preallocation of memory space for the full option values, the second form being different from the first form; and during compilation, encode an option operation on an option value as a method call to an object of the first class or of the second class without regard to the form of the option data structures supported by the classes.
RELATED APPLICATION(S)
[0001] This application is a Continuation-in-Part application of U.S. Application Ser. No. 09/672,564 filed Sep. 28, 2000 which claims priority to U.S. Provisional Application No. 60/162,825 filed Nov. 1, 1999, the entire teachings of which are incorporated herein by reference.
Provisional Applications (1)
|
Number |
Date |
Country |
|
60162825 |
Nov 1999 |
US |
Continuation in Parts (1)
|
Number |
Date |
Country |
Parent |
09672564 |
Sep 2000 |
US |
Child |
09760265 |
Jan 2001 |
US |