| 3618 | } |
| 3619 | |
| 3620 | void BookmarkManager::MarksChangesTracker::AddChanges(MarksChangesTracker const & changes) |
| 3621 | { |
| 3622 | if (!HasChanges()) |
| 3623 | { |
| 3624 | *this = changes; |
| 3625 | return; |
| 3626 | } |
| 3627 | |
| 3628 | for (auto const groupId : changes.m_createdGroups) |
| 3629 | OnAddGroup(groupId); |
| 3630 | |
| 3631 | for (auto const groupId : changes.m_updatedGroups) |
| 3632 | OnUpdateGroup(groupId); |
| 3633 | |
| 3634 | for (auto const groupId : changes.m_becameVisibleGroups) |
| 3635 | OnBecomeVisibleGroup(groupId); |
| 3636 | |
| 3637 | for (auto const groupId : changes.m_becameInvisibleGroups) |
| 3638 | OnBecomeInvisibleGroup(groupId); |
| 3639 | |
| 3640 | for (auto const groupId : changes.m_removedGroups) |
| 3641 | OnDeleteGroup(groupId); |
| 3642 | |
| 3643 | for (auto const markId : changes.m_createdMarks) |
| 3644 | OnAddMark(markId); |
| 3645 | |
| 3646 | for (auto const markId : changes.m_updatedMarks) |
| 3647 | OnUpdateMark(markId); |
| 3648 | |
| 3649 | for (auto const markId : changes.m_removedMarks) |
| 3650 | OnDeleteMark(markId); |
| 3651 | |
| 3652 | for (auto const lineId : changes.m_createdLines) |
| 3653 | OnAddLine(lineId); |
| 3654 | |
| 3655 | for (auto const lineId : changes.m_removedLines) |
| 3656 | OnDeleteLine(lineId); |
| 3657 | |
| 3658 | for (auto const lineId : changes.m_updatedLines) |
| 3659 | OnUpdateLine(lineId); |
| 3660 | |
| 3661 | for (auto const & attachedInfo : changes.m_attachedBookmarks) |
| 3662 | for (auto const markId : attachedInfo.second) |
| 3663 | OnAttachBookmark(markId, attachedInfo.first); |
| 3664 | |
| 3665 | for (auto const & detachedInfo : changes.m_detachedBookmarks) |
| 3666 | for (auto const markId : detachedInfo.second) |
| 3667 | OnDetachBookmark(markId, detachedInfo.first); |
| 3668 | } |
| 3669 | |
| 3670 | bool BookmarkManager::SortedBlock::operator==(SortedBlock const & other) const |
| 3671 | { |