Interface code generation and maintenance method and device, equipment and medium

By automatically generating C++ interface code using JSON configuration files, the inefficiency and consistency issues of property management in C++ software development are resolved, and automated interface code generation and persistent storage are achieved.

CN122064338APending Publication Date: 2026-05-19HANGZHOU MAITANG TECH CO LTD
0 Cites 0 Cited by

Patent Information

Application Number
CN202610233934.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-02-27
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

In C++ software development, property management requires manually writing Get/Set interfaces. In particular, the lack of automation for composite types and notification mechanisms leads to low development efficiency, error-proneness, and inconsistent code.

Method used

Attribute information is defined through JSON configuration files, and the interface code is automatically generated using a template engine, including attribute read/write interfaces and notification callback mechanisms. Automated persistence is achieved by combining MMKV storage.

Benefits of technology

It achieves automated generation of interface code, reduces manual coding work, improves development efficiency, eliminates type errors and omissions, and ensures code consistency and standardization.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

The invention discloses an interface code generation and maintenance method and device, equipment and a medium, and relates to the field of software codes, and the interface code generation and maintenance method comprises the steps that after environment verification and resource loading are completed, legality verification is conducted on all attribute configuration JSON files, and after verification succeeds, text content of the attribute configuration JSON files is read; extracting a target field of a root node of the attribute configuration JSON file according to the text information, obtaining attribute information based on the target field, and generating a target interface code based on the attribute information and the template file; creating a callback management container for the target attribute needing to be notified, and generating a public interface corresponding to the target attribute, so as to add or remove a callback function in the callback management container of the target attribute through the public interface; and when the target attribute is changed, traversing and executing the callback function in the callback management container at the public interface according to the target sequence so as to complete the attribute change notification. Therefore, the code can be automatically generated, and the maintenance cost is reduced.
Need to check novelty before this filing date? Find Prior Art