summaryrefslogtreecommitdiffstats
path: root/tests/libsample/list.h
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2011-08-24 21:58:56 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2011-12-09 20:28:06 -0300
commit11a09fecdd6b6abf05884fbc931a9b6e8a43f9fb (patch)
treee35318b54abda283ffaae54b69f3cc2f0853a69f /tests/libsample/list.h
parentcda2c514084ef0ac688e3770cc63c6449da892d5 (diff)
downloadshiboken-11a09fecdd6b6abf05884fbc931a9b6e8a43f9fb.tar.gz
shiboken-11a09fecdd6b6abf05884fbc931a9b6e8a43f9fb.tar.xz
shiboken-11a09fecdd6b6abf05884fbc931a9b6e8a43f9fb.zip
New conversions for containers.
Diffstat (limited to 'tests/libsample/list.h')
-rw-r--r--tests/libsample/list.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/libsample/list.h b/tests/libsample/list.h
index d9a52c31..9eb03452 100644
--- a/tests/libsample/list.h
+++ b/tests/libsample/list.h
@@ -34,8 +34,22 @@ class List : public std::list<T>
class IntList : public List<int>
{
public:
+ enum CtorEnum {
+ NoParamsCtor,
+ IntCtor,
+ CopyCtor,
+ ListOfIntCtor
+ };
+
+ inline IntList() : m_ctorUsed(NoParamsCtor) {}
+ inline explicit IntList(int val) : m_ctorUsed(IntCtor) { push_back(val); }
+ inline IntList(const IntList& lst) : List<int>(lst), m_ctorUsed(CopyCtor) {}
+ inline IntList(const List<int>& lst) : List<int>(lst), m_ctorUsed(ListOfIntCtor) {}
+
inline void append(int v) { insert(end(), v); }
+ CtorEnum constructorUsed() { return m_ctorUsed; }
+private:
+ CtorEnum m_ctorUsed;
};
#endif // LIST_H
-