Programming environment with support for handle and non-handle user-created classes
AssigneeThe MathWorks, Inc.
InventorDavid A. Foti
Life of this patent
Estimating the term…
Abstract
A language processing environment provides facilities for defining and using handle classes. A handle class is a class that always and only exists as a handle to stored data, yet that data is accessed in the same manner as with non-handle classes. The language processing environment provides syntax such that all values in the language are members of some class and all classes are defined using the same syntax. Methods and properties are supported on both handle and non-handle classes.
Claims33
A non-transitory computer-readable medium storing computer executable instructions, the instructions comprising:
- one or more instructions that, when executed by a processor, cause the processor to:
- provide a handle base class;
- define one or more handle subclasses, where the one or more handle subclasses have a class hierarchy that includes the handle base class;
- construct handle objects from the one or more handle subclasses;
- use the handle objects, where the handle objects are used exclusively through references to the handle objects;
- define one or more non-handle base classes and one or more non-handle subclasses, where the one or more non-handle subclasses have a class hierarchy that includes at least one of the one or more non-handle base classes and does not include the handle base class;
- construct non-handle objects from the one or more non-handle subclasses;
- use the non-handle objects, where the non-handle objects are used exclusively by value;
- store the handle objects and the non-handle objects in a memory coupled to the processor;
- provide a first syntax for constructing both the handle objects and the non-handle objects;
- and
- provide a second syntax for using both the handle objects and the non-handle objects.
A computer-implemented method comprising:
- providing a handle base class;
- receiving computer code, the computer code:
- defining one or more handle subclasses, where the one or more handle subclasses have a class hierarchy that includes the handle base class;
- constructing handle objects from the one or more handle subclasses;
- using the handle objects, where the handle objects are used exclusively through references to the handle objects;
- defining one or more non-handle base classes and one or more non-handle subclasses, where the one or more non-handle subclasses have a class hierarchy that includes at least one of the one or more non-handle base classes and does not include the handle base class;
- constructing non-handle objects from the one or more non-handle subclasses;
- and
- using the non-handle objects, where the non-handle objects are used exclusively by value;
- providing a first syntax for constructing both the handle objects and the non-handle objects;
- and
- providing a second syntax for using both the handle objects and the non-handle objects;
- processing, by a processor, the computer code, the processing producing results;
- and
- storing the results in a memory coupled to the processor.
A method comprising:
- providing, in a language processing environment, a handle base class;
- receiving a first class definition, the first class definition defining a handle subclass, where the handle subclass has a class hierarchy that includes the handle base class;
- constructing, by a processor, one or more handle objects from the handle subclass;
- using the one or more handle objects, where the one or more handle objects are used exclusively through references to the one or more handle objects;
- receiving a second class definition, the second class definition defining a non-handle base class;
- receiving a third class definition, the third class definition defining a non-handle subclass, where the non-handle subclass has a class hierarchy that includes the non-handle base class and does not include the handle base class;
- constructing, by the processor, non-handle objects from the non-handle subclass;
- using the non-handle objects, where the non-handle objects are used exclusively by value;
- storing the one or more handle objects and the non-handle objects in a memory coupled to the processor;
- providing, in the language processing environment, a first syntax for constructing both the non-handle objects and the one or more handle objects;
- and
- providing, in the language processing environment, a second syntax for using both the non-handle objects and the one or more handle objects.
A non-transitory computer-readable medium storing computer executable instructions, the instructions comprising:
- one or more instructions that, when executed by a processor, cause the processor to:
- identify a handle base class;
- define one or more handle subclasses, where the one or more handle subclasses have a class hierarchy that includes the handle base class;
- construct handle objects from the one or more handle subclasses;
- use the handle objects, where the handle objects are used exclusively through references to the handle objects;
- define one or more non-handle base classes and one or more non-handle subclasses, where the one or more non-handle subclasses have a class hierarchy that includes at least one of the one or more non-handle base classes and does not include the handle base class;
- construct non-handle objects from the one or more non-handle subclasses;
- use the non-handle objects, where the non-handle objects are used exclusively by value;
- store the handle objects and the non-handle objects in a memory coupled to the processor;
- provide a first syntax for constructing both the handle objects and the non-handle objects;
- and
- provide a second syntax for using both the handle objects and the non-handle objects.
Dependencies are inferred from the claim text.