Confirmed users
699
edits
No edit summary |
|||
| Line 22: | Line 22: | ||
'''protocol''' Plugin { | '''protocol''' Plugin { | ||
'''child''': | |||
Init(); | |||
Deinit(); | |||
}; | }; | ||
This code defines a <code>Plugin</code> protocol. On the next | This code defines a <code>Plugin</code> protocol. On the next three lines, the code declares two messages, <code>Init()</code> and <code>Deinit()</code>. We will describe the messages in more detail in the next section. To finish the introduction of protocols and actors, note the <code>'''child'''</code> keywords used on the 2nd and 3rd lines. This keyword says that ''child'' "accepts" the messages declared under that "child" label. That is, the parent actor can send those messages to the child, but the child cannot send those messages to the parent. | ||
== Messages == | == Messages == | ||