blob: 7d7edb4ba5b28bc74ccd703f7b98a3828e088231 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
// Copyright (C) 2016 Jochen Becher
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#pragma once
namespace qark {
class Flag
{
public:
typedef unsigned int MaskType;
explicit Flag() : m_mask(m_nextMask) { m_nextMask *= 2; }
MaskType mask() const { return m_mask; }
private:
static MaskType m_nextMask;
MaskType m_mask = 0;
};
} // namespace qark
|