DETERMINING THE ACTUAL CLASS OF AN OBJECT AT RUN TIME

Patent №

US 6,138,269

Granted

2000-10-24

Filed 1998

Owner

SUN MICROSYSTEMS, INC.

+1 more

Lab

AI components

1

nlp

Assignment

Recorded

Dataset

AIPD

2023_r1 edition

Application

09082316

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.

Natural languageG06F 9/4492Y10S 707/99944

AI classification

Natural language0.90
AI hardware0.12
Knowledge representation0.10
Planning0.01
Machine learning0.00
Vision0.00
Evolutionary computation0.00
Speech0.00

Ownership

SUN MICROSYSTEMS, INC.

assignment · 93770952

CORNELL DUBILIER MARKETING, INC.

assignment · 102040156

Assignors

BALL, MICHAEL S., EBNESAJJAD, SOROOR

On an employer assignment, the assignors are typically the inventors.

© 2026 NYSGPT2525 LLC