Information Technology Reference
In-Depth Information
Our goal is to establish a uniform representation of pads without distinguishing sub
pads from base pads. A sub pad should be able to be used as a base pad of another
composition, and vice versa. Therefore, we chose the architecture shown in Figure 3
for composite pads.
There were still some alternative choices on how to establish each parent-child
connection. Figure 3 uses the view connection. The controller connection may not work
since there is no way to propagate the state change of the parent model to its controller,
and hence to the child pad. The model connection seems to work. We did not choose
this because of a different reason related to the implementation of shared copies.
message
sending
Controller
View
Model
P 1
C
V
M
P 2
P 2
P 1
C
V
M
Fig. 3. MVC representation of a parent-child relationship between two pads
A shared copy of a pad share the same internal state with its original but may have
an independent position and size from its original copy. This implies that two shared
copies of the same pad share the same model but have independent display objects as
shown in Figure 4. Each of these shared copies should be able to accept child pads.
This implies that parent-child connection cannot be model connection but should be
P'
P
C
V
C
V
M
P'
P
M
Fig. 4. Shared copies of a single pad
Search WWH ::




Custom Search