×

Determining the actual class of an object at run time

  • US 6,138,269 A
  • Filed: 05/20/1998
  • Issued: 10/24/2000
  • Est. Priority Date: 05/20/1998
  • Status: Expired due to Term
First Claim
Patent Images

1. A computer-implemented method of performing a dynamic cast operation for an object-oriented program at run time, said method comprising:

  • receiving an object pointer of a static type that points to an object having a dynamic type;

    receiving a target type to which said static type is to be cast;

    determining an object pointer offset associated with said object pointer indicative of the location pointed to within said object by said object pointer;

    determining a target offset associated with said target type indicative of the location of a target type sub-object within said object; and

    combining the value of said object pointer with said object pointer offset and said target offset to produce an adjusted object pointer, said adjusted object pointer being of said target type, whereby said dynamic cast operation is performed by the adjustment of said object pointer.

View all claims
  • 3 Assignments
Timeline View
Assignment View
    ×
    ×