» Home » inheritance » Page 1
Diamond inheritance with mixed inheritance modifers (protected / private / public)
by Matt Corr in Programming Languages

let's say we have class A,B,C,D where A is base, B,C are between and D is derived in diamond model.


class B inherits virtualy class A in private mode,

class C inherita virtualy class A in protected mode.

class A
int member; // note this member<

How do non-intrusive smart pointers behave with respect to inheritance and multiple inheritance?
by WicKeD in Programming Languages

I am using C++. C++0x using Visual Studio 2010 to be correct.

Suppose I have a class Z. To make it safer in my application to work with pointers to this class, I can consistently use smart pointers (shared pointer, weak pointer).

Now this class Z inherits from a class X. Some parts of my application will work with pointers to class X, others will work with pointers to

Java Inheritance and generics, how to declare a function that applies to “multiple types” of inheritance?
by Meg in Programming Languages

I couldn't find a good question/title for what I want to do. I'm not very familiar with generics, so I have some issues understanding how they work.

Say I have a Map<k,v> class that maps keys to values.

class Map<K,V>{
public V get(K key){
public void set(K key, V v){

PHP Any composition/inheritance solution, to avoid multiple inheritance?
by DonMac in Web Design

I'm trying to solve a design puzzle in the most efficient way, but I tend to end thinking that I really need a multiple inheritance here. So, here I am, asking the pros. I'm creating an active-record lib that will perform almost identical actions with different name and value variables. I'm on PHP 5.2.13

Suppose I have these classes:

class Pr

Class Inheritance or Single Table Inheritance in Rails 2.3
by Tom Clark in Programming Languages

I have the following scenario and I'm not sure if I should use Class Inheritance or Single Table Inheritance:

Class User
has_one :main_list
has_one :known_list
has_many :regular_lists
Class List
has_many :words
Class Word
belongs_to :list

What I would like to do is have each different lis

Multiple inheritance with pointer casting and virtual inheritance
by Matthew in Programming Languages

Please explain why there is a difference between the O/P of the following codes...
1> When virtual inheritance is used for class A and B then B::f is called
2> When there is no virtual inheritance for A and B then L::f is called

If you use different combinations of virtual inheritance / non virtual inheritance and pointer casting for virtual and non virtual functions then

Does XML Schema Inheritance work in the same sense as OOP Inheritance?
by beebob in Programming Languages

I am working on a schema file that I intend to use with JAXB for a project of mine. In Java, I have the following sort of code structure

public interface Condition {
public class AndCondition implements Condition {
public AndCondition(List<Condition> conditions){
public class StateCondition implements Con

Inheritance confusion involving generics and self-inheritance
by Jason Lin in Programming Languages

I'm a little confused by this interface and class definition. Could someone possibly shed some light?

The interface and a class that inherits from it are defined this way:

public abstract class DNum {
public abstract class DNum<DIM> : DNum where DIM : DNum<DIM> { //etc...

...the DIM : DNum<DIM> bit is th

difference between interface inheritance and implementation inheritance
by mkmitch in Programming Languages

I found those two terms in the book of Meyers, but what is the difference, thanks in advance for any help

Do You Pay Income Tax on Inheritance Money from USA Inheritance Tax in Utah?
by javascript in Personal Finance
Much confusion exists over whether or not a Utah heir must pay state or federal taxes on an inheritance. Inheritance taxes are not the same as estate taxes, and while the federal government does not impose taxes on an heir's inheritance, the heir must be careful as to how he handles the assets, especially when transferring assets into an existing investment account. In addition, most estates are n

Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .