CN116301879A - Source code file generation method and device, storage medium and computer equipment - Google Patents

Source code file generation method and device, storage medium and computer equipment Download PDF

Info

Publication number
CN116301879A
CN116301879A CN202211706592.XA CN202211706592A CN116301879A CN 116301879 A CN116301879 A CN 116301879A CN 202211706592 A CN202211706592 A CN 202211706592A CN 116301879 A CN116301879 A CN 116301879A
Authority
CN
China
Prior art keywords
adapter
source code
file
generating
work queue
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211706592.XA
Other languages
Chinese (zh)
Inventor
黄宗成
邱钰锋
陈伟民
胡王耀
吴小伟
贾国晓
唐芳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yuanguang Software Co Ltd
Original Assignee
Yuanguang Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yuanguang Software Co Ltd filed Critical Yuanguang Software Co Ltd
Priority to CN202211706592.XA priority Critical patent/CN116301879A/en
Publication of CN116301879A publication Critical patent/CN116301879A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/443Optimisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • G06F8/427Parsing

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application discloses a method and a device for generating a source code file, a storage medium and computer equipment, and relates to the field of low-code development. Analyzing a configuration file to obtain an engineering source code structure; generating an adapter work queue according to the adapters of each directory node; retrieving an adapter from the adapter work queue according to a first-in first-out order; converting the design content of the low-code development platform through the extracted adapter to obtain an output result; the output result is assembled into a code template corresponding to the extracted adapter to generate a source code file, and in the generation process of the abstract source code file, the adapter refers to a pipeline working mode, and the adapter on the pipeline processes data according to a preset instruction without paying attention to the specific content of the data, the action of the data and the final use.

Description

Source code file generation method and device, storage medium and computer equipment
Technical Field
The present invention relates to the field of low code development, and in particular, to a method and apparatus for generating a source code file, a storage medium, and a computer device.
Background
The low-code development platform is a development platform capable of quickly generating application programs through a small amount of codes, and can be used for performing application program development through visualization, so that developers with different experience levels can use drag components and model-driven logic to create web pages and mobile application programs through a graphical user interface. After a developer completes design work through a user interface, the content designed by the user is exported as a source code file of the application, and the method for exporting the source code file comprises the following steps: the manufacturer presets a set of compressed package or catalog files of standard engineering structure in the low code development platform, and according to the standard engineering structure, the content designed by the user is hard coded, and the source code file corresponding to the content is generated in the catalog of the standard engineering structure. Besides a preset standard engineering structure, the low-code development platform can customize a personalized engineering structure according to the requirements of a user, at the moment, a generated source code file has complex logic codes and is not single in function, other irrelevant code logics are mixed, the same data is read for multiple times in different places to read a database, even other source code files or directory structures can be generated in the current logic, so that the business logic for generating the current source code file is disordered, has high coupling degree, is eventually more and more bulky and complex, and can become no harder and harder to maintain and add new functions along with the increase of business capability. In the maintenance phase, it becomes quite difficult for a developer to find out even what logic a certain piece of code in the source code file is generated by and where a certain file directory in the source code file is generated if he wants the business code in the source code file.
Disclosure of Invention
The embodiment of the application provides a method, a device, a storage medium and computer equipment for generating a source code file, which can solve the problem that the source code file generated in the prior art is difficult to maintain. The technical scheme is as follows:
in a first aspect, an embodiment of the present application provides a method for generating a source code file, where the method includes:
receiving a configuration file;
analyzing the configuration file to obtain an engineering source code structure; the engineering source code structure comprises at least one directory node, each directory node corresponds to a structure object, and the structure object comprises an adapter and a buffer;
generating an adapter work queue according to the adapters of each directory node;
retrieving an adapter from said adapter work queue according to a first-in first-out order;
analyzing the extracted buffer associated with the adapter, and dynamically assigning the expression in the configuration file by utilizing the numerical value in the buffer;
converting the design content through the adapter to obtain an output result;
and assembling the output result into a code template corresponding to the fetched adapter to generate a source code file.
In a second aspect, an embodiment of the present application provides a device for generating a source code file, where the device includes:
the receiving and transmitting unit is used for receiving the configuration file;
the analysis unit is used for analyzing the configuration file to obtain an engineering source code structure; the engineering source code structure comprises at least one directory node, each directory node corresponds to a structure object, and the structure object comprises an adapter and a buffer;
a generating unit, configured to generate an adapter work queue according to the adapters of the directory nodes;
a fetch unit for fetching an adapter from the adapter work queue according to a first-in first-out order;
the assignment unit is used for analyzing the extracted adapter associated buffer memory and dynamically assigning the expression in the configuration file by utilizing the numerical value in the buffer memory;
the conversion unit is used for converting the design content through the extracted adapter to obtain an output result;
and the generating unit is used for assembling the output result into the code template corresponding to the extracted adapter to generate a source code file.
In a third aspect, embodiments of the present application provide a computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the above-described method steps.
In a fourth aspect, embodiments of the present application provide a computer device, which may include: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the above-mentioned method steps.
The technical scheme provided by some embodiments of the present application has the beneficial effects that at least includes:
analyzing the configuration file to obtain an engineering source code structure; generating an adapter work queue according to the adapters of each directory node; retrieving an adapter from the adapter work queue according to a first-in first-out order; converting the design content of the low-code development platform through the extracted adapter to obtain an output result; the method and the device have the advantages that the output result is assembled into the code template corresponding to the extracted adapter to generate the source code file, a developer does not need to pay attention to a project structure, does not need to know code generation logic, does not need to find out how a certain file is generated through code debugging and global searching through the generation process of abstracting the source code file, does not need to pay attention to contents other than the generated file, and is convenient for maintenance work of the source code file.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of a network architecture provided in an embodiment of the present application;
FIG. 2 is a flowchart illustrating a method for generating a source code file according to an embodiment of the present application;
FIG. 3 is a schematic structural diagram of a configuration file according to an embodiment of the present application;
FIG. 4 is a life cycle change schematic of an adapter provided by an embodiment of the present application;
FIG. 5 is a schematic diagram of a source code file generating device provided in the present application;
fig. 6 is a schematic structural diagram of a computer device provided in the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the following detailed description of the embodiments of the present application will be given with reference to the accompanying drawings.
It should be noted that, the method for generating the source code file provided in the present application is generally executed by a computer device, and accordingly, the device for generating the source code file is generally disposed in the computer device.
Fig. 1 shows an exemplary system architecture of a source code file generation method or a source code file generation apparatus that can be applied to the present application.
As shown in fig. 1, the system architecture may include: a computer device 101 and a server 102. Communication between the computer device 101 and the server 102 may be through a network that is used as a medium to provide communication links between the various elements described above. The network may include various types of wired or wireless communication links, such as: the wired communication link includes an optical fiber, a twisted pair wire, a coaxial cable, or the like, and the WIreless communication link includes a bluetooth communication link, a WIreless-FIdelity (Wi-Fi) communication link, a microwave communication link, or the like.
The server 102 is deployed with a configuration file and a low-code development platform, and the computer device 101 parses a source code file of an application derived from the configuration file for the design content of the low-code development platform.
The method comprises the steps of describing an engineering structure, a code specification, a code content generator (adapter) and a buffer by a set of structured description languages, binding the content of a configuration file through a visual interface, and inputting enterprise specifications by a user to obtain an enterprise specification expression. And reading the expression on the structured configuration file when the application is generated, and outputting the application conforming to the content of the expression.
The configuration file of the application is used for: 1. what does it describe the directory structure of the project (what does it do what do it get a complete project structure; 2. describing a provider of a buffer, wherein the provider is used for achieving the capability of dynamically assigning the device analytic expression and the capability of sharing the buffer by data; 3. describing a provider of the adapter for the device to generate a source code file; 4. code templates employed by the adapter are described for the device to generate templates for source code files.
After the computer device 101 is started, it analyzes the engineering source code structure description data in the configuration file, and obtains a complete engineering source code structure by analyzing the data, each directory node corresponds to a structure object, the structure object includes an adapter, a buffer, and extended engineering source code structure description data, and adds the adapter and the buffer of each directory node into an adapter work queue. By adopting a first-in first-out rule, analyzing a buffer according to the sequence, carrying out dynamic assignment on expressions in the current description data, then starting to execute business logic codes of a source code content generator (adapter), and assembling an adapter output result into a code template and automatically generating a source code file by a device. The next step is that the computer device 101 parses the structure object for the presence of extended engineering source code structure description data, which allows the adapter to load another set of engineering source code structure description data, and if so, performs a new device start method under the current thread, taking the new device start method as the current value, and starting the recursive work task. After completing the work of the current adapter, computer device 101 continues to execute the next adapter until all adapters in the adapter work queue have completed execution.
The computer device 101 and the server 102 may be hardware or software. When the computer device 101 and the server 102 are hardware, they may be implemented as a distributed server cluster formed by a plurality of servers, or as a single server. When the computer device 101 and the server 102 are software, they may be implemented as a plurality of software or software modules (for example, to provide distributed services), or may be implemented as a single software or software module, which is not specifically limited herein.
Various communication client applications may be installed on the computer device of the present application, such as: video recording applications, video playing applications, voice interaction applications, search class applications, instant messaging tools, mailbox clients, social platform software, and the like.
The computer device may be hardware or software. When the computer device is hardware, it may be a variety of computer devices with a display screen including, but not limited to, smartphones, tablet computers, laptop and desktop computers, and the like. When the computer device is software, the computer device may be installed in the above-listed computer device. Which may be implemented as multiple software or software modules (e.g., to provide distributed services), or as a single software or software module, without limitation.
When the computer equipment is hardware, a display device and a camera can be arranged on the computer equipment, the display device can be various equipment capable of realizing the display function, and the camera is used for collecting video streams; for example: the display device may be a cathode ray tube display (cathode ray tube display, CR), a light-emitting diode display (light-emitting diode display, LED), an electronic ink screen, a liquid crystal display (liquid crystal display, LCD), a plasma display panel (plasma display panel, PDP), or the like. A user may utilize a display device on a computer device to view displayed text, pictures, video, etc.
It should be understood that the number of computer devices, networks, and servers in fig. 1 are illustrative only. Any number of computer devices, networks, and servers may be used as desired for implementation.
The method for generating the source code file according to the embodiment of the present application will be described in detail with reference to fig. 2. The generating device of the source code file in the embodiment of the present application may be a computer device shown in fig. 1.
Referring to fig. 2, a flowchart of a method for generating a source code file is provided in an embodiment of the present application. As shown in fig. 2, the method according to the embodiment of the present application may include the following steps:
s201, receiving a configuration file.
The configuration file is preconfigured, and after the source code file generating device (hereinafter referred to as generating device) is started, a current processing thread is created, and the current processing thread receives the configuration file transmitted by the server, wherein the configuration file is used for describing the engineering source code structure, the code specification, the adapter (code generator) and the attribute of the buffer.
For example, referring to the schematic view of the configuration file shown in fig. 3, the application structure configuration file in fig. 3 is the configuration file in S201, the upper half of fig. 3 represents the reference relationship of each sub-file in the configuration file, and the lower half of fig. 3 represents the source code of the configuration file, and it can be seen that the configuration file adopts a structured description.
S202, analyzing the configuration file to obtain an engineering source code structure.
The configuration file comprises engineering source code structure description data used for describing a directory structure representing engineering source codes, the engineering source code structure comprises at least one directory node, each directory node corresponds to a structure object, and the structure object comprises an adapter and a buffer.
S203, generating an adapter work queue according to the adapters of all directory nodes.
S204, taking out an adapter from the work queue according to the first-in first-out sequence.
The method comprises the steps that adapters corresponding to all directory nodes are added into an empty work queue to generate an adapter work queue, the adapters in the adapter work queue perform enqueuing operation or dequeuing operation in a first-out mode, 1 adapter is added to the tail of the queue during enqueuing operation, and 1 adapter is taken out from the head of the queue during dequeuing operation.
S205, analyzing the fetched adapter associated buffer, and dynamically assigning the expression in the configuration file by using the value in the buffer.
Each adapter is associated with a buffer, the buffer associated with the adapter is determined by using the configuration file, the buffer stores a numerical value, and the numerical value is used for dynamically assigning the expression in the configuration file.
Further, to better monitor the lifecycle of each adapter in the adapter work queue, each adapter is divided into four states as follows: created, started, running, completed.
For example: referring to the life cycle change schematic of the adapter shown in fig. 4, the change process is: when an adapter is fetched from the adapter work queue, the state of the adapter is set to created; when the fetched adapter is started, the state of the adapter is set to started. When the adapter is successfully started and in the executing process, setting the state of the adapter to be running; when the adapter execution is completed, the state of the adapter is set to complete. Then judging whether the queue is an empty queue, namely whether the next adapter exists in the queue, if so, releasing the resources of the queue, wherein the resources comprise hardware resources and software resources; if not, the next adapter is taken out of the queue.
In some embodiments, the processing of all adapters in the adapter work queue is one transaction. All data of the DAO layer are cached in the buffer, and the data required by the adapter is acquired or created from the buffer, so that the database query times can be reduced, and the data processing efficiency is improved.
S206, converting the design content through the extracted adapter to obtain an output result.
Executing the service logic code of the adapter, and converting the design content appointed in the low-code development platform through the extracted adapter to obtain an output result.
S207, assembling the output result into a code template corresponding to the extracted adapter to generate a source code file.
Wherein, for each of the adapters, the output result of each adapter is assembled into the corresponding code file, and the superposition result of all adapters generates the final source code file.
In some embodiments, the configuration file may further include extended engineering source code structure description data, that is, the configuration file is a nested structure, where the extended engineering source code structure description data is used to describe source code results of a third party engineering, for example: the configuration file of the project A comprises source code result description data of the project B, and functions of the application can be enriched through a nested structure.
In some embodiments, the current adapter-used adapter (e.g., tianhong version of high beam software) and adapter path may be specified from the configuration file, e.g.: see the content of the configuration file shown in fig. 3; a single request transaction shares DAO (Data Access Object ) layer data or other adapter-provided data throughout. For design content of different engineering structures but the same code content, the configuration file can be directly modified for reuse. When the target structure is changed, only the result of the configuration file needs to be changed.
In some embodiments, the generating an adapter work queue from adapters of respective directory nodes includes:
acquiring the creation time of each adapter;
generating an adapter work queue based on the creation time; wherein the earlier the creation time of the adapter, the earlier its position, i.e. the earlier the creation time, the closer the adapter is to the position of the queue head.
In some embodiments, the assembling the output result into the code template corresponding to the fetched adapter to generate the source code file includes:
querying a locator in the code template; the number of locators in the code object is one or more and the locators may be different from each other.
And inserting the output result into the code template according to the locator to generate a source code file.
When the source code file of the low-code development platform is generated, analyzing the configuration file to obtain an engineering source code structure; generating an adapter work queue according to the adapters of each directory node; retrieving an adapter from the adapter work queue according to a first-in first-out order; converting the design content of the low-code development platform through the extracted adapter to obtain an output result; the method and the device have the advantages that the output result is assembled into the code template corresponding to the extracted adapter to generate the source code file, a developer does not need to pay attention to a project structure, does not need to know code generation logic, does not need to find out how a certain file is generated through code debugging and global searching through the generation process of abstracting the source code file, does not need to pay attention to contents other than the generated file, and is convenient for maintenance work of the source code file.
In this embodiment, the places where the developer needs to pay attention to are very single, the code logic is also very single, the developer only needs to know what content should be in the file generated by the developer, any file content can be found through the structured description data, which file is generated can be quickly located, what template is used for generating, under what purpose all logics are clear at a glance, the service codes of other files are isolated, meanwhile, the code conflict caused by the fact that multiple persons cooperatively develop and modify the same file is solved, the whole service logic code only serves the output source code file, the possibility of various coupling other incoherent logics of the developer is limited on the frame, even if a manufacturer continuously iterates and updates functions, the service code is complex to write and only belongs to the service codes of the file under the device.
The following are device embodiments of the present application, which may be used to perform method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.
Referring to fig. 4, a schematic structural diagram of a source code file generating apparatus according to an exemplary embodiment of the present application is shown, which is hereinafter referred to as apparatus 5. The apparatus 5 may be implemented as all or part of a computer device by software, hardware or a combination of both. The device 5 comprises: transceiver unit 501, parsing unit 502, generating unit 503, fetching unit 504, assigning unit 505, converting unit 506 and generating unit 507.
A transceiver unit 501, configured to receive a configuration file;
the parsing unit 502 is configured to parse the configuration file to obtain an engineering source code structure; the engineering source code structure comprises at least one directory node, each directory node corresponds to a structure object, and the structure object comprises an adapter and a buffer;
a generating unit 503, configured to generate an adapter work queue according to the adapters of the directory nodes;
a fetching unit 504, configured to fetch an adapter from the adapter work queue according to a first-in first-out order;
an assignment unit 505, configured to parse the fetched buffer associated with the adapter, and dynamically assign an expression in the configuration file by using a value in the buffer;
a conversion unit 506, configured to convert the design content through the fetched adapter to obtain an output result;
and the generating unit 507 is used for assembling the output result into the code template corresponding to the fetched adapter to generate a source code file.
In one or more possible embodiments, the directory node further includes: the engineering source code structure description data is extended.
In one or more possible embodiments, further comprising:
the monitoring unit is used for monitoring the life cycle of each adapter; wherein the states of the adapter are divided into: created, started, running or completed.
In one or more possible embodiments, further comprising:
and the releasing unit is used for releasing the resources of the adapter work queue when the adapter work queue is detected to be an empty queue.
In one or more possible embodiments, the generating an adapter work queue from the adapters of the respective directory nodes includes:
acquiring the creation time of each adapter;
generating an adapter work queue based on the creation time; wherein the earlier the creation time of the adapter, the earlier its position.
In one or more possible embodiments, the assembling the output result into the code template corresponding to the fetched adapter generates a source code file, including:
querying a locator in the code template;
and inserting the output result into the code template according to the locator to generate a source code file.
In one or more possible embodiments, the configuration file further includes: adapter version and adapter path.
It should be noted that, when the apparatus 5 provided in the foregoing embodiment performs the method for generating the source code file, only the division of the foregoing functional modules is used as an example, and in practical application, the foregoing functional allocation may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the foregoing functions. In addition, the generating device of the source code file provided in the above embodiment and the generating method embodiment of the source code file belong to the same concept, which embody detailed implementation procedures in the method embodiment, and are not repeated here.
The foregoing embodiment numbers of the present application are merely for describing, and do not represent advantages or disadvantages of the embodiments.
The embodiment of the present application further provides a computer storage medium, where the computer storage medium may store a plurality of instructions, where the instructions are adapted to be loaded by a processor and execute the method steps of the embodiment shown in fig. 2, and the specific execution process may refer to the specific description of the embodiment shown in fig. 2, which is not repeated herein.
The present application also provides a computer program product storing at least one instruction that is loaded and executed by the processor to implement the method of generating a source code file as described in the above embodiments.
Referring to fig. 6, a schematic structural diagram of a computer device is provided in an embodiment of the present application. As shown in fig. 6, the computer device 600 may include: at least one processor 601, at least one network interface 604, a user interface 603, a memory 605, at least one communication bus 602.
Wherein the communication bus 602 is used to enable connected communications between these components.
The user interface 603 may include a Display screen (Display), a Camera (Camera), and the optional user interface 603 may further include a standard wired interface, a wireless interface.
The network interface 604 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), among others.
Wherein the processor 601 may include one or more processing cores. The processor 601 utilizes various interfaces and lines to connect various portions of the overall computer device 600, perform various functions of the computer device 600 and process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 605, and invoking data stored in the memory 605. Alternatively, the processor 601 may be implemented in hardware in at least one of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), programmable logic array (Programmable Logic Array, PLA). The processor 601 may integrate one or a combination of several of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), and a modem, etc. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the modem is used to handle wireless communications. It will be appreciated that the modem may not be integrated into the processor 601 and may be implemented by a single chip.
The Memory 605 may include a random access Memory (Random Access Memory, RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 605 includes a non-transitory computer readable medium (non-transitory computer-readable storage medium). Memory 605 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 605 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the various method embodiments described above, etc.; the storage data area may store data or the like referred to in the above respective method embodiments. The memory 605 may also optionally be at least one storage device located remotely from the processor 601. As shown in fig. 6, an operating system, a network communication module, a user interface module, and application programs may be included in the memory 605, which is one type of computer storage medium.
In the computer device 600 shown in fig. 6, the user interface 603 is mainly used for providing an input interface for a user, and acquiring data input by the user; the processor 601 may be configured to invoke an application program stored in the memory 605 and specifically execute the method shown in fig. 2, and the specific process may be shown in fig. 2, which is not repeated herein.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored on a computer readable storage medium, which when executed may comprise the steps of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory, a random access memory, or the like.
The foregoing disclosure is only illustrative of the preferred embodiments of the present application and is not intended to limit the scope of the claims herein, as the equivalent of the claims herein shall be construed to fall within the scope of the claims herein.

Claims (10)

1. A method for generating a source code file, comprising:
receiving a configuration file;
analyzing the configuration file to obtain an engineering source code structure; the engineering source code structure comprises at least one directory node, each directory node corresponds to a structure object, and the structure object comprises an adapter and a buffer;
generating an adapter work queue according to the adapters of each directory node;
retrieving an adapter from said adapter work queue according to a first-in first-out order;
analyzing the extracted buffer associated with the adapter, and dynamically assigning the expression in the configuration file by utilizing the numerical value in the buffer;
converting the design content through the adapter to obtain an output result;
and assembling the output result into a code template corresponding to the fetched adapter to generate a source code file.
2. The method of claim 1, wherein the directory node further comprises: the engineering source code structure description data is extended.
3. The method according to claim 1 or 2, further comprising:
monitoring the life cycle of each adapter; wherein the states of the adapter are divided into: created, started, running or completed.
4. A method according to claim 3, further comprising:
and when the adapter work queue is detected to be an empty queue, releasing the resources of the adapter work queue.
5. The method of claim 1 or 2 or 4, wherein the generating an adapter work queue from adapters of respective directory nodes comprises:
acquiring the creation time of each adapter;
generating an adapter work queue based on the creation time; wherein the earlier the creation time of the adapter, the earlier its position.
6. The method of claim 5, wherein assembling the output result into the code template corresponding to the fetched adapter to generate a source code file comprises:
querying a locator in the code template;
and inserting the output result into the code template according to the locator to generate a source code file.
7. The method of claim 1 or 2 or 4 or 6, wherein the profile further comprises: adapter version and adapter path.
8. A source code file generating apparatus, comprising:
the receiving and transmitting unit is used for receiving the configuration file;
the analysis unit is used for analyzing the configuration file to obtain an engineering source code structure; the engineering source code structure comprises at least one directory node, each directory node corresponds to a structure object, and the structure object comprises an adapter and a buffer;
a generating unit, configured to generate an adapter work queue according to the adapters of the directory nodes;
a fetch unit for fetching an adapter from the adapter work queue according to a first-in first-out order;
the assignment unit is used for analyzing the extracted adapter associated buffer memory and dynamically assigning the expression in the configuration file by utilizing the numerical value in the buffer memory;
the conversion unit is used for converting the design content through the extracted adapter to obtain an output result;
and the generating unit is used for assembling the output result into the code template corresponding to the extracted adapter to generate a source code file.
9. A computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the method steps of any one of claims 1 to 7.
10. A computer device, comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the method steps of any of claims 1-7.
CN202211706592.XA 2022-12-29 2022-12-29 Source code file generation method and device, storage medium and computer equipment Pending CN116301879A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211706592.XA CN116301879A (en) 2022-12-29 2022-12-29 Source code file generation method and device, storage medium and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211706592.XA CN116301879A (en) 2022-12-29 2022-12-29 Source code file generation method and device, storage medium and computer equipment

Publications (1)

Publication Number Publication Date
CN116301879A true CN116301879A (en) 2023-06-23

Family

ID=86784064

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211706592.XA Pending CN116301879A (en) 2022-12-29 2022-12-29 Source code file generation method and device, storage medium and computer equipment

Country Status (1)

Country Link
CN (1) CN116301879A (en)

Similar Documents

Publication Publication Date Title
CN111158818B (en) Page rendering method and device
JP6355125B2 (en) System, method, and graphical user interface for workflow generation, deployment, and / or execution
JP2016194947A (en) System, method and graphical user interface for workflow generation, deployment and/or execution
US10185558B2 (en) Language-independent program composition using containers
CN110457144B (en) Method, device, medium and equipment for realizing front-end application
CN110489323B (en) Visual RPC API debugging method, device, medium and equipment
CN111338623B (en) Method, device, medium and electronic equipment for developing user interface
CN113010827B (en) Page rendering method and device, electronic equipment and storage medium
CN111026634A (en) Interface automation test system, method, device and storage medium
CN109582317B (en) Method and apparatus for debugging hosted applications
CN110109983B (en) Method and device for operating Redis database
CN111309304B (en) Method, device, medium and electronic equipment for generating IDL file
CN113407882A (en) Component generation method and device, computer-readable storage medium and electronic equipment
CN115509522A (en) Interface arranging method and system for low-code scene and electronic equipment
WO2021129812A1 (en) Method and system for running artificial intelligence application, and device
CN111596905A (en) Method, device, storage medium and terminal for generating java object
CN111414154A (en) Method and device for front-end development, electronic equipment and storage medium
CN116432624A (en) Micro-service API document generation method, device, equipment and storage medium
US10360701B2 (en) Integrated visualization
CN109710604A (en) Data processing method, device, system, computer readable storage medium
CN116301879A (en) Source code file generation method and device, storage medium and computer equipment
CN114968235A (en) Page form generation method and device, computer equipment and storage medium
CN116775174A (en) Processing method, device, equipment and medium based on user interface frame
CN113094561A (en) Webpage generation method, webpage generation device, electronic equipment and storage medium
CN112445517B (en) Inlet file generation method, device, electronic equipment and computer readable medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination