From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46454) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YM94p-0003Kn-IK for qemu-devel@nongnu.org; Fri, 13 Feb 2015 00:46:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YM94l-0004sD-Hz for qemu-devel@nongnu.org; Fri, 13 Feb 2015 00:46:07 -0500 Received: from nm30-vm1.bullet.mail.ne1.yahoo.com ([98.138.90.46]:52039) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YM94l-0004s7-8u for qemu-devel@nongnu.org; Fri, 13 Feb 2015 00:46:03 -0500 Date: Fri, 13 Feb 2015 05:46:01 +0000 (UTC) From: boddu pavan Message-ID: <1294010013.2539103.1423806361511.JavaMail.yahoo@mail.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_2539102_1408255576.1423806361509" Subject: [Qemu-devel] QOM q1 Reply-To: boddu pavan List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: QEMU Developers ------=_Part_2539102_1408255576.1423806361509 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, I have some question on using QOM, new to QEMU and will be great if i can p= ut some answers for below question. 1) If QEMU is considered to be OOP, How is the relation between a Class and= Object. I see in c++ we do not create a classobject there will be a object= of a class. But here i see both a classobject and an instance object( if i= 'm not wrong we call it as state). What is the relation between two, where = particularly i should use each one ? 2) I see every peripheral state has object inherited, So can i assume there= is only one root object for all the devices in my qemu design. Are there a= ny others?=C2=A0 3) In type info we point out Class_init, instance_init. Are these both call= ed up when emulating a two devices of same type( i.e emulating uarts of sam= e type, uart1 and uart0.) Thanks,Sai Pavan ------=_Part_2539102_1408255576.1423806361509 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,=

<= div id=3D"yui_3_16_0_1_1423563968990_990494" dir=3D"ltr">I have some questi= on on using QOM, new to QEMU and will be great if i can put some answers fo= r below question.

1= ) If QEMU is considered to be OOP, How is the relation between a Class and = Object. I see in c++ we do not create a classobject there will be a object = of a class. But here i see both a classobject and an instance object( if i'= m not wrong we call it as state). What is the relation between two, where p= articularly i should use each one ?

2) I see every peripheral state has object inherited, So c= an i assume there is only one root object for all the devices in my qemu de= sign. Are there any others? 

3) In type info we point out Class_init, instance_init. Are = these both called up when emulating a two devices of same type( i.e emulati= ng uarts of same type, uart1 and uart0.)

Thanks,
Sai Pavan
------=_Part_2539102_1408255576.1423806361509--