qemu-e2k/include
Greg Kurz 55deffdb5c object: Improve documentation of interfaces
QOM interfaces allow a limited form of multiple inheritance, at the
condition of being stateless. That is, they cannot be instantiated
and a pointer to an interface shouldn't be dereferenceable in any way.
This is achieved by making the QOM instance type an incomplete type,
which is, as mentioned by Markus Armbruster, the closest you can get
to abstract class in C.

Incomplete types are widely used to hide implementation details, but
people usually expect to find at least one place where the type is
fully defined. The fact that it doesn't happen with QOM interfaces is
quite disturbing, especially since it isn't documented anywhere as
recently discussed in this thread:

https://lists.gnu.org/archive/html/qemu-devel/2019-12/msg01579.html

Amend the documentation in the object.h header file to provide more
details about why and how to implement QOM interfaces using incomplete
types.

Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-12-17 19:32:46 +01:00
..
authz
block nbd: Don't send oversize strings 2019-11-18 16:01:34 -06:00
chardev
crypto
disas plugin: add qemu_plugin_insn_disas helper 2019-10-28 15:12:38 +00:00
exec Memory: Enable writeback for given memory region 2019-12-16 10:46:35 +00:00
fpu
hw kvm: convert "-machine kernel_irqchip" to an accelerator property 2019-12-17 19:32:46 +01:00
io
libdecnumber
migration migration: add new migration state wait-unplug 2019-10-29 18:55:26 -04:00
monitor
net
qapi
qemu Memory: Enable writeback for given memory region 2019-12-16 10:46:35 +00:00
qom object: Improve documentation of interfaces 2019-12-17 19:32:46 +01:00
scsi
standard-headers linux-headers: Update 2019-12-17 10:39:48 +11:00
sysemu kvm: introduce kvm_kernel_irqchip_* functions 2019-12-17 19:32:45 +01:00
ui
user *-user: plugin syscalls 2019-10-28 15:12:38 +00:00
elf.h
glib-compat.h
qemu-common.h exec: Split out variable page size support to exec-vary.c 2019-10-28 10:26:02 +01:00
qemu-io.h
trace-tcg.h