Decoupling method and device and computer readable storage medium
A decoupling and receiver technology, applied in the computer field, can solve problems such as dependencies and increase engineering complexity, and achieve the effect of decoupling
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0050] Such as figure 1 As shown, as follows:
[0051] Step S101: The transmitter and the receiver have or can be converted to a common base type.
[0052] The type of the transmitter is SenderType, and the type of the receiver is ReceiverType. Both SenderType and ReceiverType inherit from the GObject type, so they have a common base type GObject.
[0053] Specific definitions of transmitters and receivers are exemplified as follows:
[0054] SenderType sender; / / Define the sender
[0055] ReceiverType receiver; / / Define the receiver
[0056] Step S102: The transmitter defines a signal, and the signal includes a slot function type.
[0057] The signal includes a slot function type, a signal name, and a slot list; the first parameter of the slot function type is a variable pointing to the basic type; the slot list is used to store several slots; the slot Including a variable pointing to the basic type and a variable pointing to a slot function;
[0058] One implementation of ...
Embodiment 2
[0160] Embodiment 1 has a known technical defect: when the receiver is destructed, the transmitter does not know that the receiver has been destructed. At this time, when the transmitter sends a signal, it will still call the receiver’s slot function , which often leads to system crashes.
[0161] In order to solve the above-mentioned technical defect of embodiment 1, make following improvement on the basis of embodiment 1:
[0162] Receiver contains a list of signals that store "variables that point to the list of slots for the signal"; during the connection of the signal, the receiver will "point to the slot for the signal variable of the list" to the list of signals;
[0163] During said disconnection, the receiver removes the "variable pointing to said slot list of said signal" from said signal list;
[0164] When the receiver is destructed, it will traverse the signal list, obtain the "variables pointing to the slot list of the signal", and delete all "pointin...
Embodiment 3
[0193] Embodiment 2 has a known technical defect: if the transmitter is destroyed first, and then the receiver is destroyed, since the receiver does not know that the transmitter has been destroyed when it is destroyed, the receiver still tries to point to the slot of the signal from " List" deletes all the slots of "the variable pointing to the base type points to the receiver", and this often causes the system to crash.
[0194] In order to solve the above-mentioned technical defect of embodiment 2, make following improvement on the basis of embodiment 1:
[0195] The receiver includes a list of "transmitter meta information" that includes variables pointing to the sender and variables pointing to the list of slots for the signal;
[0196] The transmitter includes a receiver list, and the receiver list is used to store variables pointing to receivers;
[0197] During the signal connection process, the receiver takes the variable pointing to the transmitter and the...
PUM

Abstract
Description
Claims
Application Information

- R&D
- Intellectual Property
- Life Sciences
- Materials
- Tech Scout
- Unparalleled Data Quality
- Higher Quality Content
- 60% Fewer Hallucinations
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2025 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com