[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] QOM: why "klass" used instead of "class" ?
From: |
Evgeny Voevodin |
Subject: |
[Qemu-devel] QOM: why "klass" used instead of "class" ? |
Date: |
Wed, 29 Feb 2012 09:52:25 +0400 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 |
include/qemu/object.h:
* Once all of the parent classes have been initialized,
#TypeInfo::class_init
* is called to let the class being instantiated provide default
initialize for
* it's virtual functions. Here is how the above example might be modified
* to introduce an overridden virtual function:
*
* <example>
* <title>Overriding a virtual function</title>
* <programlisting>
* #include "qdev.h"
*
* void my_device_class_init(ObjectClass *klass, void *class_data)
* {
* DeviceClass *dc = DEVICE_CLASS(klass);
* dc->reset = my_device_reset;
* }
*
Why to use "klass", not "class"?
--
Kind regards,
Evgeny Voevodin,
Leading Software Engineer,
ASWG, Moscow R&D center, Samsung Electronics
e-mail: address@hidden
- [Qemu-devel] QOM: why "klass" used instead of "class" ?,
Evgeny Voevodin <=