| 32 | }; |
| 33 | |
| 34 | void AnnotationBase::setGroup(const std::shared_ptr<AnnotationGroup>& group) { |
| 35 | std::shared_ptr<AnnotationGroup> currentGroup = _group.lock(); |
| 36 | if (!currentGroup || currentGroup != group) { |
| 37 | _group.reset(); |
| 38 | if (currentGroup) { |
| 39 | currentGroup->removeMember(this->shared_from_this()); |
| 40 | } |
| 41 | _group = group; |
| 42 | if (group) { |
| 43 | group->addMember(this->shared_from_this()); |
| 44 | } |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | std::shared_ptr<AnnotationGroup> AnnotationBase::getGroup() const { |
| 49 | std::shared_ptr<AnnotationGroup> grp = _group.lock(); |
no test coverage detected