In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-12 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "What is ReadSelfAction and ReadStructuralFeature Action". In daily operation, I believe many people have doubts about what ReadSelfAction and ReadStructuralFeature Action are. I have consulted all kinds of materials and sorted out simple and easy operation methods. I hope to help you answer the doubts of "What is ReadSelfAction and ReadStructuralFeature Action"! Next, please follow the small series to learn together!
Read SelfAction
ReadSelfAction is an action that reads the host object of the action. Every action is ultimately part of an action. Behavior is attached to the entity of a method in a manner consistent with the specification of a category, and when the behavior is executed, the action acts in the context of a specified host object of the category. ReadSelfAction takes this host object and places it on the output pin.
Read StructuralFeature Action
ReadStructuralFeature Action is an action to get a structural feature value.
It has an input pin that specifies the input object. When an input object is specified, the value of the structural property of that object is placed on the output pin of the action. The type, order, and multiplicity of output pins should be appropriate to the structural characteristics.
example
Continue with the example of solving a quadratic equation in one variable. First look at the class diagram.
CalculateCoordinator manages instances of Calculator and CalculatorPanel. In calculateMain method, first call CalculatorPanel's getInput method to obtain the three coefficients a,b and c of the quadratic equation, and then call Calculator's solveEquation method to solve the equation. Today, I first asked for methods to get calculator objects and panel objects.
preparations
Create an activity diagram named CalculateCoordinator::calcuateMain
Add initial node
Add AcceptCallAction and specify Trigger as CalcuateCoordinator.calculateMain. Please refer to the previous article for specific steps.
Added ReadSelfAction, ReadStructuralCharacteriseAction
Drag the Action icon from the toolbar to the flowchart and select the Action type ReadSelf
Specify Action Name as Coordinator
Right-click to open the ReadSelfAction menu and select Structural Elements. In the dialog box that appears, select the result pin and adjust the position.
Connect AcceptCallAction and ReadSelfAction with control flow
Drag the Action icon from the toolbar to the flowchart and select the Action Type as ReadStructuralFeature
Specify Action Name as CalculateCoordinator
Modify the output pin named result, specify the name Calculator, select the type Calculator
Add an output pin named panel of type CalculatorPanel.
Right-click to open the ReadStructuralFeature Action menu and select Structural Elements. In the dialog box that appears, select all pins and adjust the position.
Connect the output pin of ReadSelfAction to the input pin of ReadStructuralAction object.
illustrates
ReadSelfAction is an action that reads the host object of CalculateCoordinator::calculateMain. When an action is executed, it works in the context of a host object of the CalculateCoordinator class. ReadSelfAction takes this host object and places it on the output pin. Do you understand? ReadSelfAction functions like this pointer in C++!
In this example, the input pin of ReadStructuralCharacteriseAction specifies an instance of CalculateCoordinator obtained by ReadSelfAction, and the values of the object's structural properties calculator: Calculator and panel: CalculateorPanel are placed on the output pin of the action. The type, order, and multiplicity of output pins should be appropriate to the structural characteristics. Still take C++ as an example, ReadStructuralFeature Action function is actually input object, output object data members!
At this point, the study of "What is ReadSelfAction and ReadStructuralFeature Action" is over, hoping to solve everyone's doubts. Theory and practice can better match to help you learn, go and try it! If you want to continue learning more relevant knowledge, please continue to pay attention to the website, Xiaobian will continue to strive to bring more practical articles for everyone!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.