Check patentability & draft patents in minutes with Patsnap Eureka AI!

Type conversion method and device and computer equipment

A type conversion and type technology, applied in the computer field, to achieve the effect of shortening the conversion process, enriching the type conversion method, and improving the conversion efficiency

Pending Publication Date: 2022-07-12
TENCENT TECH (SHENZHEN) CO LTD
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, there is currently no method for performing type conversion during the running of the program, so how to perform type conversion at runtime has become an urgent problem to be solved

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Type conversion method and device and computer equipment
  • Type conversion method and device and computer equipment
  • Type conversion method and device and computer equipment

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0024] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0025] Table I

[0026]

[0027] Please refer to Table 1. Table 1 is a schematic diagram of a type conversion system disclosed in an embodiment of the application. As shown in Table 1, the system includes a management class KFMetaManager for managing runtime type information, a user-defined class ClassX, a type of The conversion interface class IKFMeta, and the type information definition class ClassX::Meta matching the user-defined ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a type conversion method and device and computer device.The method comprises the steps that in the program running process, when a type conversion request for a target object pointer in a program is received, the original type of the target object pointer is determined, and a type inheritance relation tree corresponding to the original type is obtained, the types corresponding to the adjacent type information in the type inheritance relation tree meet the type inheritance relation, obtaining a target type corresponding to the target type identifier in the type inheritance relation tree, and converting the type of the target object pointer into the target type. Through the method, the types of the pointers can be converted during operation, and the conversion efficiency is improved.

Description

technical field [0001] The present application relates to the field of computer technology, and in particular, to a type conversion method, apparatus, and computer equipment. Background technique [0002] In programming languages, the conversion of objects (or variables) between types can realize code sharing and reduce code redundancy. Currently, most type conversions are implemented at compile time, such as functions static_cast, const_cast, and reinterpret_cast, etc., these functions can implement type conversions at compile time. However, there is no method for type conversion in the process of running a program, so how to perform type conversion at runtime becomes an urgent problem to be solved. SUMMARY OF THE INVENTION [0003] The embodiments of the present application provide a type conversion method, apparatus, and computer equipment, which can realize the type conversion of pointers during operation and improve conversion efficiency. [0004] One aspect of the ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F8/41
CPCG06F8/44
Inventor 唐声福
Owner TENCENT TECH (SHENZHEN) CO LTD
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More