blob: 579239bcb8d99ad6c7b11ef65e25b2eb41517396 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "collector.h"
void Collector::clear()
{
m_items.clear();
}
Collector &Collector::operator<<(ObjectType::Identifier item)
{
m_items.push_back(item);
return *this;
}
Collector &Collector::operator<<(const ObjectType *obj)
{
m_items.push_back(obj->identifier());
return *this;
}
std::list<ObjectType::Identifier> Collector::items()
{
return m_items;
}
int Collector::size() const
{
return int(m_items.size());
}
Collector &operator<<(Collector &s, const IntWrapper &w)
{
s << w.toInt();
return s;
}
|