diff options
Diffstat (limited to 'sources/shiboken6/tests/libsample/echo.h')
-rw-r--r-- | sources/shiboken6/tests/libsample/echo.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/sources/shiboken6/tests/libsample/echo.h b/sources/shiboken6/tests/libsample/echo.h new file mode 100644 index 000000000..01b11a4a6 --- /dev/null +++ b/sources/shiboken6/tests/libsample/echo.h @@ -0,0 +1,60 @@ +// 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 ECHO_H +#define ECHO_H + +#include "libsamplemacros.h" +#include "str.h" + +class ObjectType; + +class Echo +{ +public: + LIBMINIMAL_DEFAULT_COPY_MOVE(Echo) + + Echo() noexcept = default; + ~Echo() = default; + + void doNothingWithConstBool(const bool hi); + void methodWithNamedArg(const Str &string = Str{}); + + Str operator()(const Str &s, const int i) { return s + i; } + + // These method are here just for compilation test purposes + Echo &operator<<(unsigned int item); + Echo &operator<<(signed int item); + Echo &operator<<(const ObjectType *item); + Echo &operator<<(Str str); +}; + +inline void Echo::doNothingWithConstBool(const bool) +{ +} + +inline void Echo::methodWithNamedArg(const Str &) +{ +} + +inline Echo &Echo::operator<<(unsigned int) +{ + return *this; +} + +inline Echo &Echo::operator<<(signed int) +{ + return *this; +} + +inline Echo &Echo::operator<<(const ObjectType *) +{ + return *this; +} + +inline Echo &Echo::operator<<(Str) +{ + return *this; +} + +#endif // ECHO_H |