CN109542536A - The plug-in's data processing method of object-oriented - Google Patents

The plug-in's data processing method of object-oriented Download PDF

Info

Publication number
CN109542536A
CN109542536A CN201811338506.8A CN201811338506A CN109542536A CN 109542536 A CN109542536 A CN 109542536A CN 201811338506 A CN201811338506 A CN 201811338506A CN 109542536 A CN109542536 A CN 109542536A
Authority
CN
China
Prior art keywords
interface
function
class
plug
base class
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
CN201811338506.8A
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.)
State Grid Corp of China SGCC
Beijing Xuji Electric Co Ltd
Original Assignee
State Grid Corp of China SGCC
Beijing Xuji Electric 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 State Grid Corp of China SGCC, Beijing Xuji Electric Co Ltd filed Critical State Grid Corp of China SGCC
Priority to CN201811338506.8A priority Critical patent/CN109542536A/en
Publication of CN109542536A publication Critical patent/CN109542536A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention discloses a kind of plug-in's data processing methods of object-oriented, comprising: establishes card i/f base class, and is the Virtual Function of expansible succession by the pin function interface setting of the card i/f base class, and generate interface document;The Virtual Function in card i/f base class is inherited by realizing interface processing class, and interface processing class has definable private data and function to realize functional interface;Wherein the pin function interface includes opening interface and down interface, and the interface of opening is used to generate an interface processing class example and returns to the pointer of interface base class, to call corresponding interface processing class example function by interface base class pointer;And the down interface is for closing and deleting corresponding interface processing class example.

Description

The plug-in's data processing method of object-oriented
Technical field
The present invention relates to technical field of data processing, the plug-in's data processing method of especially a kind of object-oriented.
Background technique
While C Plus Plus is good at Object-oriented Programming Design, the programming of Kernel-based methods, therefore quilt can also be carried out It is widely applied.To realize system function dynamic expansion, the plug-in unit processing technique based on dynamic link library is generallyd use.Traditional inserts Part processing is then mapped defined using dynamic link library direct function mapping mode, first loading dynamic link library file Pin function interface to function, carry out dynamic call the corresponding interface function finally by this function.But it sends out in actual use Existing, this mode makes plugin library realize and use shortage globality, and plug-in unit is easy to cause system exception, and cannot achieve band There is the complex logic feature card of private data.
Summary of the invention
Aiming at the problems existing in the prior art, the purpose of the embodiment of the present invention is that providing a kind of plug-in unit number of object-oriented According to processing method, can, at least partly solve defect in the prior art.
To achieve the goals above, the embodiment of the present invention proposes a kind of plug-in's data processing method of object-oriented, packet It includes:
Card i/f base class is established, and is the void of expansible succession by the pin function interface setting of the card i/f base class Function, and generate interface document;The Virtual Function in card i/f base class, and the interface are inherited by realizing interface processing class Managing class has definable private data and function to realize functional interface;Wherein the pin function interface includes opening interface And down interface, the interface of opening is used to generate an interface processing class example and returns to the pointer of interface base class, to pass through Interface base class pointer calls corresponding interface processing class example function;And the down interface is corresponding for closing and deleting Interface handles class example.
Wherein, the method also includes:
Plug-in unit dynamic link library file is loaded, and maps the dynamic base interface function for opening interface and down interface;
Dynamic base interface function is opened to obtain the pointer and interface document of the interface base class, and interface base class pointer Corresponding interface function is called to realize that plug-in unit is handled.
The advantageous effects of the above technical solutions of the present invention are as follows: above-mentioned technical proposal proposes a kind of inserting for object-oriented Part data processing method relies on C++ Object-oriented Technique to be packaged processing so that plugin library has face to pin function interface To Properties of Objects, to reduce the difficulty of developing plug and realize the complex logic feature card for having private data.
Detailed description of the invention
Fig. 1 is the dongle configuration schematic diagram of the embodiment of the present invention;
Fig. 2 is the plug-in unit implementation process schematic diagram of the embodiment of the present invention;
Fig. 3 is the plug-in unit use flow diagram of the embodiment of the present invention.
Specific embodiment
It is right with reference to the accompanying drawings and detailed description in order to illustrate a kind of object-oriented plug-in unit processing method of the invention The present invention is described in further detail.
The embodiment of the present invention proposes a kind of plug-in's data processing method of object-oriented, and core is to propose one kind Card i/f base class as shown in Figure 1 leads in the Virtual Function that the pin function interface of the card i/f base class is expansible succession It crosses and realizes that interface processing class is come after the Virtual Function in birdsmouth base class, so as to realize corresponding interface function;Meanwhile it connecing The realization of functional interface can be facilitated in mouth processing class with customized private data and function.Practical pin function of the invention connects There are two mouthful, one is to open interface (open), and an interface processing class example can be generated by opening interface, and return to interface base class Pointer, corresponding interface processing class example function can be thus called by interface base class pointer;The other is closing Corresponding interface processing class example can be closed and be deleted to interface (close).
Detailed process is as shown in Figure 2, defines a card i/f base class, and the pin function interface in the base class first For the Virtual Function of expansible succession, and generate the interface document that user uses;It defines and realizes that interface processing class is come after birdsmouth Virtual Function in base class realizes corresponding interface function;Private data and function are defined in interface processing class to facilitate function The realization of interface;Dynamic link library is constructed, interface and down interface Outside Access interface is opened to realize, is created in opening interface Interface processing class instance objects are built, and return to interface base class pointer;Realize that down interface handles class example pair in down interface As.
Wherein, details are as follows for object-oriented plug-in unit usage mode:
As shown in figure 3, loading plug-in unit dynamic link library file first, interface and down interface dynamic bank interface are opened in mapping Function obtains interface base class pointer by opening interface function, then uses document according to interface, can by interface base class pointer To call corresponding interface function, to realize plug-in unit processing function.
The above is a preferred embodiment of the present invention, it is noted that for those skilled in the art For, without departing from the principles of the present invention, it can also make several improvements and retouch, these improvements and modifications It should be regarded as protection scope of the present invention.

Claims (2)

1. a kind of plug-in's data processing method of object-oriented characterized by comprising
Card i/f base class is established, and is the empty letter of expansible succession by the pin function interface setting of the card i/f base class Number, and generate interface document;The Virtual Function in card i/f base class is inherited by realizing interface processing class, and the interface is handled Class has definable private data and function to realize functional interface;Wherein the pin function interface include open interface and Down interface, the interface of opening is used to generate an interface processing class example and returns to the pointer of interface base class, by connecing Mouthful base class pointer calls corresponding interface processing class example function;And the down interface connects accordingly for closing and deleting Mouth processing class example.
2. the plug-in's data processing method of object-oriented according to claim 1, which is characterized in that the method is also wrapped It includes:
Plug-in unit dynamic link library file is loaded, and maps the dynamic base interface function for opening interface and down interface;
Dynamic base interface function is opened to obtain the pointer and interface document of the interface base class, and interface base class pointer calls Corresponding interface function is to realize that plug-in unit is handled.
CN201811338506.8A 2018-11-12 2018-11-12 The plug-in's data processing method of object-oriented Pending CN109542536A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811338506.8A CN109542536A (en) 2018-11-12 2018-11-12 The plug-in's data processing method of object-oriented

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811338506.8A CN109542536A (en) 2018-11-12 2018-11-12 The plug-in's data processing method of object-oriented

Publications (1)

Publication Number Publication Date
CN109542536A true CN109542536A (en) 2019-03-29

Family

ID=65846955

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811338506.8A Pending CN109542536A (en) 2018-11-12 2018-11-12 The plug-in's data processing method of object-oriented

Country Status (1)

Country Link
CN (1) CN109542536A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110531981A (en) * 2019-08-27 2019-12-03 珠海格力智能装备有限公司 Visual software system and application method thereof
CN112035097A (en) * 2020-08-25 2020-12-04 华东计算技术研究所(中国电子科技集团公司第三十二研究所) C + + adaptation layer based on Yinhua operation system of Galaxy
CN112822115A (en) * 2020-12-31 2021-05-18 罗普特科技集团股份有限公司 Service framework construction method and system based on plug-in engine

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102520967A (en) * 2011-12-28 2012-06-27 深圳市融创天下科技股份有限公司 Method, system and mobile terminal for creating and using mobile platform plug-in component
CN106095668A (en) * 2016-06-02 2016-11-09 上海科梁信息工程股份有限公司 Generation method based on the C++ test case of event and action

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102520967A (en) * 2011-12-28 2012-06-27 深圳市融创天下科技股份有限公司 Method, system and mobile terminal for creating and using mobile platform plug-in component
CN106095668A (en) * 2016-06-02 2016-11-09 上海科梁信息工程股份有限公司 Generation method based on the C++ test case of event and action

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
绝对不要看眼睛里的郁金香: "C++虚复制构造函数,设置Clone()方法返回基类指针,并设置为虚函数", 《HTTPS://BLOG.CSDN.NET/QQ_17754181/ARTICLE/DETAILS/51752749》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110531981A (en) * 2019-08-27 2019-12-03 珠海格力智能装备有限公司 Visual software system and application method thereof
CN112035097A (en) * 2020-08-25 2020-12-04 华东计算技术研究所(中国电子科技集团公司第三十二研究所) C + + adaptation layer based on Yinhua operation system of Galaxy
CN112035097B (en) * 2020-08-25 2023-10-13 华东计算技术研究所(中国电子科技集团公司第三十二研究所) C++ adaptation layer device based on Galaxy Ruihua operating system
CN112822115A (en) * 2020-12-31 2021-05-18 罗普特科技集团股份有限公司 Service framework construction method and system based on plug-in engine
CN112822115B (en) * 2020-12-31 2022-09-16 罗普特科技集团股份有限公司 Service framework construction method and system based on plug-in engine

Similar Documents

Publication Publication Date Title
CN109542536A (en) The plug-in's data processing method of object-oriented
CN105117233B (en) API Calls method and device
CN109547529A (en) A kind of distributed industrial data distributing method based on DDS
CN106909441A (en) The method that a kind of direct I/O of disk based on JVM is accessed
CN107025253A (en) A kind of method, database operation method and device for creating database interface
CN106445900A (en) Table style processing method and device
CN109783340A (en) Test code programming method, IP test method and the device of SoC
CN107135167A (en) Data transmission method, data transmission device and server
CN109903163A (en) A kind of block bonusing method, device and the electronic equipment out of block chain
US20070276648A1 (en) Sequential tester for longest prefix search engines
CN109343983A (en) Information interacting method, device, equipment and storage medium between functional module
CN106933828B (en) Data insertion method and device
CN104572224B (en) A kind of out file loading methods, apparatus and system
CN106919865A (en) Data of nonvolatile storage encryption system
CN108345452A (en) A kind of thread management method and device
CN109684103A (en) A kind of interface call method, device, server and storage medium
CN107408054A (en) Flow control for the language embedded programming in general-purpose computations graphics processing unit
CN109388388A (en) Information interacting method, device, equipment and storage medium between functional module
CN103995736B (en) A kind of method and apparatus for transmitting shared drive
CN107958345A (en) A kind of SCD file collocation method and device based on database and file fragment
CN110288340A (en) A kind of data acquisition system storage method based on Java intelligence contract
CN108614714A (en) Dynamic library updating method and device and storage medium
CN106789037B (en) A kind of PKCS#11 interfaces call the endorsement method and device of encryption device
CN108304230A (en) Adjust implementation method, device and the readable storage medium storing program for executing of application attribute
CN109697596A (en) A kind of method and device constructing E-Government

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20190329

RJ01 Rejection of invention patent application after publication