Given a diagram that looks like this following:
Where the components are defined in a nested manner, something like (ignore the actual semantics as I'm generalizing, though I'm welcome to full example):
component {
name: A
component {
name: B
ports {
name: p1
}
}
...
Can you access nested components like any:
1) A.B.p1 --> C.D.E.p4
2) [A][B][p.1] --> [C][D][E][p.4]
3) A["B"]["p.1"] --> C["D"]["E"]["p.4"]
I'm only generally seeing support for coding the connections like below. Even when components might be defined in a nested structure, the connection endpoints have to have a unique name:
1) p.1 --> p.4
2) A.B --> C.D.E (This fails, instead it creates NEW components "A.B"...)
3) B[p.1] --> E[p.4] (Haven't ever seen this)
I have had success using component "E" as C.D.E {
, but it's more of a hack in the naming of the components and not actually accessing via nesting:
@startuml
left to right direction
component "A" as A {
component "B" as A.B {
port "p.1" as A.B.p1
}
}
component "C" as C {
component "B" as C.B {
component "D" as C.B.D {
port "p.4" as C.B.D.p4
}
}
}
A.B.p1 --> C.B.D.p4
@enduml