[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] ARM QOM conversion / class hierarchy
From: |
Paul Brook |
Subject: |
Re: [Qemu-devel] ARM QOM conversion / class hierarchy |
Date: |
Tue, 20 Mar 2012 17:01:52 +0000 |
User-agent: |
KMail/1.13.7 (Linux/3.2.0-1-amd64; KDE/4.7.4; x86_64; ; ) |
> Rather than key off an ID you could also just break
> implementation-specific functionality out into a set of interfaces you
> implement/override as part of the objects' initialization. Same ends, and
> still fits the model pretty nicely, assuming the functionality is all
> derivable from the common base-class.
I don't think that helps a great deal, and the implementation ends up much the
same.
You're just replacing an explicit enumeration with an implicit set of
subclasses. The only reason I can see for that is if you want to build a
deliberately crippled version of qemu, which seems a bit of a stretch. Of if
you're trying to maintain something out of tree, in which case you deserve all
the pain we can give you.
Note that you can't make the interface part of the CPUState object, as single
inheritance prevents those having any state. It has to be a separate object
that the CPUState links to.
Paul
- Re: [Qemu-devel] ARM QOM conversion / class hierarchy, (continued)
Re: [Qemu-devel] ARM QOM conversion / class hierarchy, Anthony Liguori, 2012/03/20
Re: [Qemu-devel] ARM QOM conversion / class hierarchy, Michael Roth, 2012/03/20