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.
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
321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 |
|
derive_from_functions 🔗
derive_from_functions(diagram: context.ContextDiagram, data: _elkjs.ELKInputData, boxes: dict[str, _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
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 530 531 532 533 534 535 536 537 538 539 540 |
|
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
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 365 366 367 368 369 370 371 372 373 374 375 376 377 378 |
|
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
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 458 459 460 461 462 463 464 465 466 |
|
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
389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 |
|