default
Collection of ELKInputData
on diagrams that involve ports.
DERIVATORS
module-attribute
🔗
DERIVATORS: dict[type[ModelElement], DerivatorFunction] = {LogicalComponent: derive_from_functions, SystemComponent: derive_from_functions}
Supported objects to build derived contexts for.
ContextInfo 🔗
Bases: NamedTuple
ContextInfo data.
ports
instance-attribute
🔗
ports: list[ModelElement]
The context element's relevant ports.
This list only contains ports that at least one of the exchanges
passed into collect_exchanges
sees.
side
instance-attribute
🔗
side: Literal['input', 'output']
Whether this is an input or output to the element of interest.
collector 🔗
collector(diagram: context.ContextDiagram, params: dict[str, t.Any] | None = None) -> _elkjs.ELKInputData
Collect context data from ports of centric box.
Source code in capellambse_context_diagrams/collectors/default.py
307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 |
|
derive_from_functions 🔗
derive_from_functions(diagram: context.ContextDiagram, data: _elkjs.ELKInputData, centerbox: _elkjs.ELKInputChild) -> None
Derive Components from allocated functions of the context target.
A Component, a ComponentExchange and two ComponentPorts are added
to data
. These elements are prefixed with Derived-
to
receive special styling in the serialization step.
Source code in capellambse_context_diagrams/collectors/default.py
460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 |
|
port_collector 🔗
port_collector(target: m.ModelElement | m.ElementList, diagram_type: DT) -> tuple[list[m.ModelElement], list[m.ModelElement]]
Savely collect ports from target
.
Source code in capellambse_context_diagrams/collectors/default.py
324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 |
|
port_context_collector 🔗
port_context_collector(exchange_datas: t.Iterable[generic.ExchangeData], local_ports: t.Container[m.ModelElement]) -> t.Iterator[ContextInfo]
Collect the context objects.
PARAMETER | DESCRIPTION |
---|---|
exchange_datas
|
The
TYPE:
|
local_ports
|
Connectors/Ports lookup where
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
contexts
|
An iterator over
|
Source code in capellambse_context_diagrams/collectors/default.py
408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 |
|
port_exchange_collector 🔗
port_exchange_collector(ports: t.Iterable[m.ModelElement], filter: Filter = lambda i: i) -> dict[str, list[fa.AbstractExchange]]
Collect exchanges from ports
savely.
Source code in capellambse_context_diagrams/collectors/default.py
375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 |
|