diff options
Diffstat (limited to 'sources/shiboken6/tests/libsample/bucket.h')
-rw-r--r-- | sources/shiboken6/tests/libsample/bucket.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/sources/shiboken6/tests/libsample/bucket.h b/sources/shiboken6/tests/libsample/bucket.h new file mode 100644 index 000000000..73e8edd78 --- /dev/null +++ b/sources/shiboken6/tests/libsample/bucket.h @@ -0,0 +1,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() = default; + 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 = false; +}; + +#endif // BUCKET_H |