summaryrefslogtreecommitdiff
path: root/trunk/Examples/perl5/multiple_inheritance/example.h
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/Examples/perl5/multiple_inheritance/example.h')
-rw-r--r--trunk/Examples/perl5/multiple_inheritance/example.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/trunk/Examples/perl5/multiple_inheritance/example.h b/trunk/Examples/perl5/multiple_inheritance/example.h
new file mode 100644
index 000000000..a8f544898
--- /dev/null
+++ b/trunk/Examples/perl5/multiple_inheritance/example.h
@@ -0,0 +1,31 @@
+/* File : example.h */
+
+#include <iostream>
+
+using namespace std;
+
+class Bar
+{
+ public:
+ virtual void bar () {
+ cout << "bar" << endl;
+ }
+ virtual ~Bar() {}
+};
+
+class Foo
+{
+ public:
+ virtual void foo () {
+ cout << "foo" << endl;
+ }
+ virtual ~Foo() {}
+};
+
+class Foo_Bar : public Foo, public Bar
+{
+ public:
+ virtual void fooBar () {
+ cout << "foobar" << endl;
+ }
+};