13 #ifndef hifi_render_Selection_h
14 #define hifi_render_Selection_h
22 using Name = std::string;
26 Selection(
const Selection& selection);
27 Selection& operator = (
const Selection& selection);
28 Selection(Selection&& selection);
29 Selection& operator = (Selection&& selection);
31 Selection(
const Name& name,
const ItemIDs& items);
33 const Name& getName()
const {
return _name; }
35 const ItemIDs& getItems()
const {
return _items; }
37 bool isEmpty()
const {
return _items.empty(); }
40 static const int NOT_FOUND{ -1 };
42 void add(ItemID
id) { _items.push_back(
id); }
43 int find(ItemID
id)
const;
44 bool contains(ItemID
id)
const {
return find(
id) > NOT_FOUND; }
51 using SelectionMap = std::unordered_map<Selection::Name, Selection>;