Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method for instantiating C/C++ dynamically

An instantiated and dynamic technology, applied in the direction of program control design, instruments, electrical digital data processing, etc., can solve the problems of reducing the flexibility of the server system, the flexibility of business process configuration, and the inability to create instance objects driven by strings. Configurability, the effect of increasing flexibility

Active Publication Date: 2015-03-04
SHENZHEN TIANYUAN DIC INFORMATION TECH CO LTD
View PDF2 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The C / C++ language itself does not have this feature, so it is impossible to implement string-driven creation of instance objects
As the complexity of the software increases, the flexibility of the server system and the configuration flexibility of the business process will be greatly reduced

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
  • Method for instantiating C/C++ dynamically
  • Method for instantiating C/C++ dynamically
  • Method for instantiating C/C++ dynamically

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0016] In order to further illustrate the technical means adopted by the present invention and its effects, the following describes in detail in conjunction with preferred embodiments of the present invention and accompanying drawings.

[0017] see figure 1 , is a schematic diagram of the steps of the method for dynamically instantiating C / C++ classes in the present invention. The present invention comprises the following steps:

[0018] Step 1. Define the structure of the information required for dynamic instantiation;

[0019] In the step 1, the structure of the information required for dynamic instantiation is defined: it includes information such as class name, pointer to the dynamic creation function, occupied memory size, etc., and a hash table for storing the information structure.

[0020] Step 2, define the first and second macro definitions;

[0021] In said step 2, define the first and the second macro definition: the first macro definition is a dynamic statement...

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 provides a method for instantiating C / C++ dynamically, which includes: the first step of defining a structure of information required by dynamic instantiation; the second step of defining a first macro definition and a second macro definition; the step 3 of defining an instantiation function; and the fourth step of calling the instantiation function and completing instantiation of a target by an input class name to be instantiated. The C / C++ class is instantiated dynamically by configuring data, and service processing can be realized by creating C / C++ targets according the instantiated class names in the configured data, and accordingly configurability of backstage services is realized, and system flexibility of servers and configuration flexibility of service procedures are greatly improved.

Description

technical field [0001] The invention relates to a method for dynamically instantiating C / C++, in particular to a method for dynamically instantiating C / C++ classes through configuration data. Background technique [0002] With the development of science and technology, C / C++ language has the characteristics of high efficiency and strong portability, and is widely used in software and system software development. But with the increasing complexity of software systems, the flexibility of server architecture is also increasing. In order to achieve the configurability of background services, it is necessary to instantiate C / C++ through configuration data, and instantiate through the C / C++ class name string read from the configuration. The C / C++ language itself does not have this feature, so it is impossible to create instance objects driven by strings. As the complexity of the software increases, the flexibility of the server system and the configuration flexibility of the bus...

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 Patents(China)
IPC IPC(8): G06F9/45
Inventor 吴大刚
Owner SHENZHEN TIANYUAN DIC INFORMATION TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products