aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/tests/libsample/objecttypeoperators.h
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken6/tests/libsample/objecttypeoperators.h')
-rw-r--r--sources/shiboken6/tests/libsample/objecttypeoperators.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/sources/shiboken6/tests/libsample/objecttypeoperators.h b/sources/shiboken6/tests/libsample/objecttypeoperators.h
new file mode 100644
index 000000000..6144952ca
--- /dev/null
+++ b/sources/shiboken6/tests/libsample/objecttypeoperators.h
@@ -0,0 +1,36 @@
+// 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 OBJECTTYPEOPERATORS_H
+#define OBJECTTYPEOPERATORS_H
+
+#include "libsamplemacros.h"
+
+#include <string>
+
+class LIBSAMPLE_API ObjectTypeOperators
+{
+public:
+ LIBMINIMAL_DISABLE_COPY_MOVE(ObjectTypeOperators)
+
+ explicit ObjectTypeOperators(const std::string key);
+ virtual ~ObjectTypeOperators() = default;
+
+ bool operator==(const ObjectTypeOperators &other) const;
+ const ObjectTypeOperators &operator<(const ObjectTypeOperators &other) const;
+
+ // chaos!
+ virtual void operator>(const ObjectTypeOperators &) { m_key.append("operator>"); }
+
+ std::string key() const { return m_key; }
+
+private:
+ std::string m_key;
+};
+
+LIBSAMPLE_API bool operator==(const ObjectTypeOperators *obj, const std::string &str);
+LIBSAMPLE_API bool operator==(const std::string &str, const ObjectTypeOperators *obj);
+LIBSAMPLE_API std::string operator+(const ObjectTypeOperators *obj, const std::string &str);
+LIBSAMPLE_API std::string operator+(const std::string &str, const ObjectTypeOperators *obj);
+
+#endif // OBJECTTYPEOPERATORS_H