diff options
Diffstat (limited to 'sources/shiboken6/tests/libsample/complex.h')
-rw-r--r-- | sources/shiboken6/tests/libsample/complex.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/sources/shiboken6/tests/libsample/complex.h b/sources/shiboken6/tests/libsample/complex.h new file mode 100644 index 000000000..168fe5c44 --- /dev/null +++ b/sources/shiboken6/tests/libsample/complex.h @@ -0,0 +1,32 @@ +// 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 COMPLEX_H +#define COMPLEX_H + +#include "libsamplemacros.h" + +class LIBSAMPLE_API Complex +{ +public: + LIBMINIMAL_DEFAULT_COPY_MOVE(Complex) + + explicit Complex(double real = 0.0, double imag = 0.0) noexcept; + ~Complex() = default; + + inline double real() const { return m_real; } + inline void setReal(double real) { m_real = real; } + inline double imag() const { return m_imag; } + inline void setImaginary(double imag) { m_imag = imag; } + + Complex operator+(const Complex &other); + + void show() const; + +private: + double m_real; + double m_imag; +}; + +#endif // COMPLEX_H + |