#include "stdafx.h"

#include "xtr/core/SelectableSet.h"

namespace xtr::core {

void SelectableSet::SetSelection(const SetOfEntities& newSelection) {
  selection = newSelection;
}

void SelectableSet::ResetSelection() noexcept {
  selection.clear();
}

BOOL SelectableSet::IsSelected(const EntityUID uid) const {
  return selection.contains(uid);
}

void SelectableSet::Select(const EntityUID uid) {
  selection.emplace(uid);
}

} // namespace xtr::core