A feature of some object-oriented computer programming languages in which a class can inherit behaviors and features from more than one superclass or base class.
0
votes
0answers
8 views
Is there any way to do multiple inheritance in Ext js v3.4
In my application there is a single select dropdown (ComboBox)
Now I want to add check box to every text in that dropdown ( to make it multi-select)
Im aware that there is a plugin to get this done ...
0
votes
1answer
19 views
Groovy way to selectively mixin methods from mutliple classes
I'm writing a Groovy script based on commons-io that monitors some source directory and synchronizes its files with some destination directory.
@Grab(group='commons-io', module='commons-io', ...
1
vote
0answers
36 views
how could I gain a class address from it's base in multiple-inheritance?
I used a third-part library in my company. In it, Some classes I need is defined like this:
class A
{};
class B : public A
{};
class C : public A
{};
class Foo
: public B
, public C
, public A
...
1
vote
1answer
40 views
virtual method behaves differently with multiple inheritance
why this works
struct Base {
virtual void visit(const A &) { };
virtual void visit(const B &) { };
}
and this complains about ambiguity when calling visit method
template< ...
1
vote
1answer
39 views
Is it safe to use *virtual* multiple inheritance if QObject is being derived from DIRECTLY?
I understand that in general, multiple inheritance from QObject-derived classes (even virtual multiple inheritance) is not supported in Qt.
I understand the reason to be (I think) that even in the ...
0
votes
2answers
86 views
Some basic Inheritance problems in C++
I am learning OO in C++ programming these days in VS2010. I meet with some basic Inheritance problems in C++. Here is my code:
Question 1:
class bs
{
public:
int a;
virtual void name(){};
};
...
0
votes
3answers
31 views
Accessing static members from 2 inherited class
I have a base class with a static queue:
class A : public otherClass{
protected:
static Queue queue[SIZE];
static int front, rear;
public:
void funcA();
void funcB();
};
Now 2 ...
0
votes
2answers
26 views
Am I correct to think of inheritance as a combination of these 3 things?
A inherits B means
A owns B.
A shares all B interface.
A shares implementation of B interface.
Abstract classes are similar (@protocol in objective-c, for example.
A implements B means
2. A ...
0
votes
2answers
29 views
Python: check the order of classes in multiple inheritance
In my framework I must assure that when a class inherits from ClassA, it must inherit also from ClassB, with ClassB following ClassA (in order to make overridden methods work [in Django forms]). E.g.
...
-2
votes
1answer
65 views
Multiple Inheritance/Polymorphism Homework
I have a homework assignment coming up that I am a bit confused on. The assignment basically states that we are to use Multiple Inheritance/Polymorphism to make 21 classes in a hierarchical manner. I ...
0
votes
2answers
29 views
erasing from a vector with a base class ptr
I have a class called Circle used in a physics simulation.
A circle is declared as follows:
class Circle : public IPhysics,
public IRenderable
{
...
}
The circles are created, then ...
1
vote
1answer
47 views
Inheritance of list and its first component
I would like to have a class (this is C++) that inherits from a list of weighted components, and inherits from the type of the list's components, such that I can directly access the first member. I am ...
0
votes
0answers
22 views
Cooperative multiple inheritance issue
This is an extension to this question and raises a problem, which you, my fellow StackOverflowers, will hopefully be able to help me with. From the referenced question, consider the final code sample:
...
2
votes
1answer
62 views
Is it possible to write an exception type that “catches” multiple different exceptions?
I was wondering whether it would be possible (through clever conversion rules) to write an "exception" class that would help with the following:
Instead of writing:
try {
...
} catch ...
0
votes
1answer
30 views
Jade: How to extend base-templates based on value of a variable
I have two "master-templates" called ios.jade and android.jade plus multiple "child-templates" that should extend either ios.jade or android.jade based on the value of a variable. Unfortunately I ...
0
votes
1answer
14 views
Python 2.7 Method Resolution Order overrride
I am having some problem using multiple inheritance in Python and can't understand what I am doing wrong.
I have three classes A,B,C defined as follows it does not work.
class A(object):
def ...
1
vote
3answers
60 views
Troublesome multi-inheritance code
I'm trying to create a simple Rectangle-class in python, but I also need to use points and sizes in my code, so I'm trying to inherit my Rectangle from Point and Size.
The problem is, my Rectangle's ...
0
votes
1answer
43 views
Multiple inheritance issue, add threading.Thread to the class
First of all let me explain what I want to do:
Basic overview:
Get data from twitter in one class and print it in another class.
Little Deeper: I want CustomStreamListener to be able to run as a ...
-1
votes
2answers
55 views
Extending from multiple classes in java
i know java doesn't support multiple inheritance. I have 3 concrete base classes say A,B and C. I want to reuse all the utility methods in A,B & C in a single class D.I can not use composition as ...
0
votes
1answer
30 views
two interfaces, multiple inheritance combine into one container?
I stumbled upon the following problem: I have two packages A and B working fine for each own. Each has its own interface and his own implementation. Now i made a package C combining a adapter of A ...
0
votes
0answers
70 views
ASP.Net MVC ActionMailer and custom view engine
I am using a custom view engine in my ASP.Net MVC project to help me deal with multiple sites (mutli-tenancy application) sharing the same code base.
I have a base controller from which all my other ...
2
votes
1answer
46 views
Python: An object constructor calls itself
I have encountered the following code. An object constructor calls itself:
class StatusMixin(object):
def __init__(self):
super(StatusMixin, self).__init__()
...
2
votes
1answer
69 views
abstract base classes, multiple inheritence, and common pure virtual methods
The following test code seems to indicate that if a class has two abstract base classes with common pure virtual methods, then these methods are "shared" in the derived class.
#include ...
0
votes
2answers
55 views
c++ invoke base classes' virtual operator== with multiple inheritance
Given the following excerpts:
class Interface {
public:
virtual bool operator==(const Interface &other) const = 0;
virtual void print(ostream& sout) const = 0;
};
class A : virtual ...
1
vote
0answers
32 views
Rails design dilemma: same algorithm, different classes
I'm working on my first Ruby on Rails project and I am now faced with a design dilemma. I'm no professional programmer so I may be missing some pretty basic stuff. Please bear with me.
My project is ...
0
votes
2answers
105 views
C# Multiple Inheritance with Interfaces
public interface IA
{
void DoSomething();
void Calculate();
}
public interface IB
{
void DoSomethingElse();
void Calculate();
}
public class A : IA
{
void DoSomething() { }
void ...
2
votes
1answer
113 views
c++ virtual inheritance initialization order
Hi,
As you can see the Construction order in the example is: – U1 U2 Y X V2 V1 V3 V4 B1 B2 D
I understand that : U1 U2 Y X were initialized because the V2 is the first direct virtual inheritance to ...
0
votes
2answers
61 views
Doctrine DQL instance of for multi table inheritance entity
I have set up Doctrine multi table inheritance on my application - see below
/**
* @Entity
* @InheritanceType("JOINED")
* @DiscriminatorColumn(name="type", type="string")
* @DiscriminatorMap({
* ...
-1
votes
2answers
38 views
Inheriting from a superclass that may be of multiple types in Java
I am writing a game with the libGDX libraries and I have a situation where I have two bounding boxes, for collision detection, one for rotatable objects and one for those that are not rotatable. The ...
4
votes
2answers
86 views
Error “recursive on all control paths” when copy constructor is used and virtual function present
The error below is confusing me. Here is a short piece of a much more complicated code. It appears strange to me, that only the existence of both a templated constructor and a virtual method cause an ...