Home | Links | Contact Us | More About Intellectual Property | Bookmark
Search patents:
Home Graphic Cards Determining-the-actual-class-of-an-object-at-run-time

 Multi-media reproduction processing apparatus
It is an object of the present invention to provide a multi-media reproduction processing apparatus ...


 Confinement of high temperature plasmas
This invention relates to the generation of energy by nuclear fusion, and in particular to the ...


 Method for solving geometric constraint systems
The problems of current computer-aided design systems and methods for solving geometric constraint ...


 Adjustable hydropneumatic active suspension apparatus
The present invention has been made to resolve the conventional problems described above, and has ...


 Apparatus for damping courses of motion
It is accordingly the object of the invention, on the one hand to drastically simplify the design ...


 Damping coefficient control device for vibration damper
Accordingly, an object of the present invention is to provide a damping coefficient control device ...


 Drive slip regulating system wherein a slippage threshold is determined from the speed and acceleration of non-driven wheels
OF THE PREFERRED EMBODIMENT The sensors 1 and 2 for the non-driven wheels supply signals which ...


 Dialysis apparatus
The invention claimed is: 1. A dialysis apparatus comprising: an elongated flow passage having a ...


 Laser Doppler flow monitor
As shown in the drawing, an optical system 2 is provided for illuminating a tissue sample 4 ...


 Noise rejecting detector for biomedical signals
It is an object of the present invention to overcome the difficulties of the prior art by providing ...


 Determining the actual class of an object at run time

Details
Inventors: Ball, Michael S.; Ebnesajjad, Soroor;
Assignee: Sun Microsystems, Inc. (Palo Alto, CA)
Primary Examiner: Chaki; Kakali
Assistant Examiner:
Attorney, Agent or Firm: Beyer Weaver & Thomas, LLP

A dynamic down cast or cross cast is performed at run time within an object-oriented programming language such as C++. The compiler generates data structures during a compile; at run time a routine in the language support library accesses the generated data structures in order to perform the dynamic cast. Class structure information is provided in a size that varies linearly as the total number of classes in the class hierarchy. Cryptographic hashing of class names is used to provide uniqueness. The dynamic cast addresses complications in C++ due to "virtual" and "nonvirtual" inheritance. A run time type identification (RTTI) data structure is created at compile time. An offset within an object description is calculated for each sub-object of the object. Those virtual base classes that are duplicates are skipped producing a data structure that may be searched linearly as the number of classes in the hierarchy. An identifier for each sub-object is stored in the data structure along with its offset. Each virtual table also stores the offset of its corresponding sub-object. A cast operation is performed at run time using the RTTI data structure. The static type object pointer is used to access the object through a particular sub-object. The virtual table associated with the sub-object is used to access the RTTI data structure. The data structure is searched for the target type, and the offset associated with the target type is combined with the offset from the virtual table to adjust the object pointer to cast it to the target type.

DETAILED DESCRIPTION To achieve the foregoing, and in accordance with the purpose of the present invention, dynamic cast techniques are disclosed that performs a down cast or cross cast simply and efficiently within an object-oriented programming language.
In one aspect of the invention, the dynamic cast technique is embodied within an object-oriented compiler and run time system.
The compiler generates data structures during a compile, while at run time a routine in the language support library is called to access the generated data structures to perform the dynamic cast.
The present invention provides class structure information in a size that varies linearly as the total number of classes in the class hierarchy to reduce the time necessary to perform a cast operation.
Also, cryptographic hashing of class names is used to provide uniqueness in another aspect of the invention.
Efficient algorithms are provided for modifying pointers to point to different sub-objects of an object to perform a cast operation.
The dynamic cast technique of the present invention addresses the complications in C++ due to the two kinds of inheritance in that language.
The present invention more quickly and more simply performs cast operations than the directed acyclical graph (DAG) of C++.
The present invention is useful not only to an object-oriented language such as C++, but to any object-oriented language that implements cast operations that are either too complex or too slow.
In particular, the present invention is applicable to other object-oriented programming language such as Eiffel, Java, and CLOS.
In one specific embodiment, a run time type identification (RTTI) data structure is created at compile time and linked to each object description.
An offset within the object description is calculated for each sub-object of the object.
Those virtual base classes that are duplicates of virtual base classes already encountered are skipped, thereby producing a data structure that may be searched using an algorithm that varies linearly with the number of classes in the hierarchy



Related patents
  Method, system, and computer program product for visualizing data using partial hierarchies
As discovered by the inventor, what is needed is a method and system for generating a partial hierarchy such that parent nodes are not forced apart to make room for ...
  Image forming apparatus with improved warning indication for plurality of troubles
One object of the present invention is to indicate accurately a warning for a trouble in an image forming apparatus. Another object of the present invention is to ...
  Method and apparatus for displaying mode setting information
It is an object of the present invention to provide an operation mode setting device and method which is free of the above-described problem. It is another object of ...
  Directing image capture sequences in a digital imaging device using scripts
The present invention provides a method and system for controlling user interaction in a digital imaging device having a display using dynamic overlay bars. The digital ...
  Parallel computer system providing multi-ported intelligent memory
Our invention deals with the use of a computing system device providing a multi-ported intelligent memory that can be used to connect (switch) a variety of computer ...
  Hierarchical fat hypercube architecture for parallel processing systems
The present invention is directed toward a hierarchical fat hypercube topology that provides a novel and unique approach to implementing multiprocessor systems in a ...
  Apparatus for generating character pattern according to contour information based on corrected stroke information
In consideration of the above-mentioned circumstances, the present invention provides a character generator in which stroke information (skeleton information) on radical ...
  Method and apparatus providing resizable views
A method and apparatus for aiding in increasing the number of views that can be displayed simultaneously is described. To aid a network administrator in the analysis of ...
  Network navigation and viewing system for network management system
The invention provides a new and improved network navigation and viewing system for use in connection with management of a network of computers and other digital devices,...
  Method and apparatus for generating a display based on logical groupings of network entities
The present invention provides a method and apparatus for grouping the network entities that belong to a network system into logical groups, and generating a display of ...

0.014

Archive: All patents - Links

Copyright (c)2006 Eipa-patents.org - All rights reserved