Unlock instant, AI-driven research and patent intelligence for your innovation.

Class factory registration method and device and electronic device

A type of factory and type of technology, applied in the computer field, can solve problems such as inability to register a class, large restrictions on class factory registration, etc., and achieve the effect of improving flexibility

Active Publication Date: 2018-11-27
WUHAN DOUYU NETWORK TECH CO LTD
View PDF4 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The embodiment of the present invention provides a method, device and electronic equipment for class factory registration to solve the problem that the current class factory registration is very limited and cannot flexibly register classes in any position of the code

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
  • Class factory registration method and device and electronic device
  • Class factory registration method and device and electronic device
  • Class factory registration method and device and electronic device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0044] In order to enable those skilled in the art to better understand the solutions of the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only It is an embodiment of a part of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present invention.

[0045] The terms "first", "second" and the like (if any) in the description and claims of the present invention and the above drawings are used to distinguish similar objects and not necessarily to describe a specific order or sequence. It is to be understood that the terms so used are interchangeable under appropriate circumstances...

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 embodiment of the invention discloses a class factory registration method and device and an electronic device. The class factory registration method includes: creating a custom program segment ina source code, and creating a first program area, a second program area, and a third program area in the custom program segment, wherein an address of global data created in the first program area isin front that of the second program area, and the address of the global data created in the second program area is in front of that of the third program area; creating a list header pointer in the first program area, and creating a list tail pointer in the third program area; and registering a preset class factory in the second program area. The inflexibility that in the conventional class factorymode, when a global variable is used to perform class factory registration, all the class registration codes can be written in only one code file is improved, the characteristics of the program segment and the program area are used to achieve automatic registration of the class factory, the class factory can be registered in any source file of a project, and the flexibility of the class factory mode is greatly improved.

Description

technical field [0001] The invention relates to the field of computer technology, in particular to a factory registration method, device and electronic equipment. Background technique [0002] In large-scale software projects, various design patterns are often used to ensure the stability of the entire project system, the readability of source code, and the ease of maintenance in the later stage. Among them, the class factory pattern is a point commonly used in these design patterns. The advantage of the class factory pattern is that it can create class objects more conveniently and flexibly. [0003] The core of the implementation of the class factory pattern is to register all classes in a global address, through which all classes to be created can be enumerated. In the implementation of the traditional solution, it is mainly to add classes one by one to a global variable, and then find the class to be created by traversing all the items in the global variable. [0004] ...

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/30
CPCG06F8/315
Inventor 杨亮陈少杰张文明
Owner WUHAN DOUYU NETWORK TECH CO LTD