diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2010-03-30 14:44:24 -0300 |
---|---|---|
committer | Marcelo Lira <marcelo.lira@openbossa.org> | 2010-03-31 11:26:46 -0300 |
commit | c6d32c0339749257ac1b97a48f3c8fdd6f10e50c (patch) | |
tree | 0deab5256962798a7b33ea21c4bef1fa5fd8173a /tests/libother/number.h | |
parent | 7c7d35f56293f4b7d7ce000bc03bab6f4d9994be (diff) | |
download | shiboken-c6d32c0339749257ac1b97a48f3c8fdd6f10e50c.tar.gz shiboken-c6d32c0339749257ac1b97a48f3c8fdd6f10e50c.tar.xz shiboken-c6d32c0339749257ac1b97a48f3c8fdd6f10e50c.zip |
libsample's Point extended with a reverse operator defined in libother.
The libother's Number class now defines a multiply reverse operator
with libsample's Point class. Tests were added to check if the
generated binding correctly calls Number.__rmul__ method with
Point as argument.
Reviewed by Anderson Lizardo <anderson.lizardo@openbossa.org>
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Diffstat (limited to 'tests/libother/number.h')
-rw-r--r-- | tests/libother/number.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/libother/number.h b/tests/libother/number.h index d739802d..32af3325 100644 --- a/tests/libother/number.h +++ b/tests/libother/number.h @@ -37,18 +37,24 @@ #include "libothermacros.h" #include "str.h" +#include "point.h" class LIBOTHER_API Number { public: explicit Number(int value) : m_value(value) {}; - int value() { return m_value; } + int value() const { return m_value; } Str toStr() const; operator Str() const { return toStr(); } + friend LIBOTHER_API Point operator*(const Point&, const Number&); + private: int m_value; }; + +LIBOTHER_API Point operator*(const Point&, const Number&); + #endif // NUMBER_H |