diff options
author | Luciano Wolf <luciano.wolf@openbossa.org> | 2010-09-13 16:16:40 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:05:58 -0300 |
commit | 939185f77f4cb107231094300c03ec2c35f64c38 (patch) | |
tree | 62354a40ec86e5d2a311fa7dd5265ed33caf2d75 /tests/libsample | |
parent | 76a9acb72693e670b141b2eb57f14cad1d1a1cef (diff) |
Fix code generation for modified constructors.
Reviewers: Renato Araújo <renato.filho@openbossa.org>
Hugo Parente Lima <hugo.pl@gmail.com>
Diffstat (limited to 'tests/libsample')
-rw-r--r-- | tests/libsample/CMakeLists.txt | 1 | ||||
-rw-r--r-- | tests/libsample/modified_constructor.cpp | 36 | ||||
-rw-r--r-- | tests/libsample/modified_constructor.h | 40 |
3 files changed, 77 insertions, 0 deletions
diff --git a/tests/libsample/CMakeLists.txt b/tests/libsample/CMakeLists.txt index c1386bf17..d7bede642 100644 --- a/tests/libsample/CMakeLists.txt +++ b/tests/libsample/CMakeLists.txt @@ -14,6 +14,7 @@ injectcode.cpp listuser.cpp modifications.cpp mapuser.cpp +modified_constructor.cpp multiple_derived.cpp objecttype.cpp objecttypelayout.cpp diff --git a/tests/libsample/modified_constructor.cpp b/tests/libsample/modified_constructor.cpp new file mode 100644 index 000000000..952ae7b42 --- /dev/null +++ b/tests/libsample/modified_constructor.cpp @@ -0,0 +1,36 @@ +/* + * This file is part of the Shiboken Python Binding Generator project. + * + * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). + * + * Contact: PySide team <contact@pyside.org> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "modified_constructor.h" + +ModifiedConstructor::ModifiedConstructor(int first_arg) +{ + m_stored_value = first_arg; +} + +int +ModifiedConstructor::retrieveValue() +{ + return m_stored_value; +} + + diff --git a/tests/libsample/modified_constructor.h b/tests/libsample/modified_constructor.h new file mode 100644 index 000000000..242b1d5a9 --- /dev/null +++ b/tests/libsample/modified_constructor.h @@ -0,0 +1,40 @@ +/* + * This file is part of the Shiboken Python Binding Generator project. + * + * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). + * + * Contact: PySide team <contact@pyside.org> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef MODIFIEDCONSTRUCTOR_H +#define MODIFIEDCONSTRUCTOR_H + +#include "libsamplemacros.h" + +class LIBSAMPLE_API ModifiedConstructor +{ +public: + + ModifiedConstructor(int first_arg); + int retrieveValue(); + +private: + int m_stored_value; +}; + +#endif // MODIFIEDCONSTRUCTOR_H + |