blob: 4a45802a470f721cab551d154f0417605e3912a6 (
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
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#ifndef BUCKET_H
#define BUCKET_H
#include "libsamplemacros.h"
#include "objecttype.h"
#include <list>
class ObjectType;
class LIBSAMPLE_API Bucket : public ObjectType
{
public:
Bucket();
void push(int);
int pop();
bool empty();
void lock();
inline bool locked() { return m_locked; }
void unlock();
virtual bool virtualBlockerMethod();
inline bool callVirtualBlockerMethodButYouDontKnowThis() { return virtualBlockerMethod(); }
private:
std::list<int> m_data;
volatile bool m_locked;
};
#endif // BUCKET_H
|