------------------------------------------------------------------------------
| 688 | |
| 689 | //------------------------------------------------------------------------------ |
| 690 | vtkCommand* vtkSubjectHelper::GetCommand(unsigned long tag) |
| 691 | { |
| 692 | const auto it_p = this->Priorities.find(tag); |
| 693 | if (it_p == this->Priorities.end()) |
| 694 | { |
| 695 | return nullptr; |
| 696 | } |
| 697 | const auto p = it_p->second; |
| 698 | |
| 699 | const auto it = this->Observers.find(vtkObserverKey{ p, tag }); |
| 700 | if (it == this->Observers.end()) |
| 701 | { |
| 702 | this->Priorities.erase(it_p); |
| 703 | return nullptr; |
| 704 | } |
| 705 | return it->second.Command; |
| 706 | } |
| 707 | |
| 708 | //------------------------------------------------------------------------------ |
| 709 | void vtkSubjectHelper::PrintSelf(ostream& os, vtkIndent indent) |