Re: [PATCH kvm-unit-tests 2/4] Introduce a C++ wrapper for the kvm APIs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/24/2010 06:55 PM, Gleb Natapov wrote:
>  >
>  >What you did above is making the exact same mistake as is done with the
>  >current i440fx.c code.
>
>  If a real life 440fx has an i8042, then an emulated 440fx should
>  have an emulated i8042.  It's not complicated.
>
Correct. But it can be achieved by making 440fx a class that includes
other classes or by building it from different classes linked through
common interfaces.

Both are fine, and not in conflict with the example that started this.

If the i8042 is completely stock, we write

class i440fx {
private:
    i8042 kbc;
}

(or the C equivalent)

If it's not completely stock, we substitute some subclass that takes care of the differences.

--
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux