aboutsummaryrefslogtreecommitdiffstats
path: root/tests/libsample
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2010-03-04 16:34:45 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2010-03-04 17:13:40 -0300
commitf4db0c74e0f267c102fff6eb47ecc3eae628a637 (patch)
treee988b735d382f9d814078a9fba2009f9d6a38a39 /tests/libsample
parentdbeca960863dadbe8d496195bc60202619314214 (diff)
parentedc9cbfcfde439ccfe7100f53efc5d1e4ec34480 (diff)
Merge branch 'master' into extensibleconversions
Conflicts: cppgenerator.cpp libshiboken/basewrapper.cpp Reviewed by Hugo Parente <hugo.lima@openbossa.org> Reviewed by Lauro Moura <lauro.neto@openbossa.org>
Diffstat (limited to 'tests/libsample')
-rw-r--r--tests/libsample/abstract.h5
-rw-r--r--tests/libsample/derived.cpp8
-rw-r--r--tests/libsample/derived.h2
3 files changed, 15 insertions, 0 deletions
diff --git a/tests/libsample/abstract.h b/tests/libsample/abstract.h
index 06f8d983e..008570560 100644
--- a/tests/libsample/abstract.h
+++ b/tests/libsample/abstract.h
@@ -50,6 +50,10 @@ public:
ClassNameAndId
};
+ enum Type {
+ TpAbstract, TpDerived
+ };
+
int primitiveField;
Point valueTypeField;
ObjectType* objectTypeField;
@@ -76,6 +80,7 @@ public:
void callUnpureVirtual();
void show(PrintFormat format = Verbose);
+ virtual Type type() const { return TpAbstract; }
protected:
virtual const char* className() { return "Abstract"; }
diff --git a/tests/libsample/derived.cpp b/tests/libsample/derived.cpp
index 0a3646258..39d9f30e6 100644
--- a/tests/libsample/derived.cpp
+++ b/tests/libsample/derived.cpp
@@ -107,3 +107,11 @@ Abstract* Derived::triggerImpossibleTypeDiscovery()
{
return new SecrectClass;
}
+
+struct AnotherSecretClass : public Derived {
+};
+
+Abstract* Derived::triggerAnotherImpossibleTypeDiscovery()
+{
+ return new AnotherSecretClass;
+}
diff --git a/tests/libsample/derived.h b/tests/libsample/derived.h
index 832148e35..c5acb9488 100644
--- a/tests/libsample/derived.h
+++ b/tests/libsample/derived.h
@@ -64,6 +64,7 @@ public:
virtual void unpureVirtual();
virtual PrintFormat returnAnEnum() { return Short; }
+ virtual Type type() const { return TpDerived; }
// factory method
static Abstract* createObject();
@@ -85,6 +86,7 @@ public:
SomeInnerClass returnMyParameter(const SomeInnerClass& s) { return s; }
static Abstract* triggerImpossibleTypeDiscovery();
+ static Abstract* triggerAnotherImpossibleTypeDiscovery();
protected:
const char* getClassName() { return className(); }
virtual const char* className() { return "Derived"; }