1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
use ;
use ;
/// The definition for a PureMVC Controller.
///
/// In PureMVC, an [Controller] implementor
/// follows the 'Command and Controller' strategy, and
/// assumes these responsibilities:
///
/// - Remembering which [Command]'s
/// are intended to handle which [Notification]'s
/// - Registering itself as an [Observer] with
/// the [View] for each [Notification]
/// that it has an [Command] mapping for
/// - Creating a new instance of the proper [Command]
/// to handle a given [Notification] when notified by the [View]
/// - Calling the [Command]'s [execute]
/// method, passing in the [Notification]
///
/// [Observer]: crate::prelude::Observer
/// [View]: crate::prelude::View
/// [execute]: Command::execute