From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47380) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XyfAs-0002iH-1J for qemu-devel@nongnu.org; Wed, 10 Dec 2014 06:11:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XyfAi-00071f-UE for qemu-devel@nongnu.org; Wed, 10 Dec 2014 06:11:17 -0500 Received: from mail-wi0-x231.google.com ([2a00:1450:400c:c05::231]:32816) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XyfAi-00071b-Mf for qemu-devel@nongnu.org; Wed, 10 Dec 2014 06:11:08 -0500 Received: by mail-wi0-f177.google.com with SMTP id l15so4720617wiw.16 for ; Wed, 10 Dec 2014 03:11:08 -0800 (PST) Sender: Paolo Bonzini Message-ID: <54882A43.2030607@redhat.com> Date: Wed, 10 Dec 2014 12:10:59 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <522493776.4407770.1418124502655.JavaMail.yahoo@jws100120.mail.ne1.yahoo.com> In-Reply-To: <522493776.4407770.1418124502655.JavaMail.yahoo@jws100120.mail.ne1.yahoo.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] New Bee : What is the canonical path. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: boddu pavan , QEMU Developers On 09/12/2014 12:28, boddu pavan wrote: > Hi, > > I am new to qemu, And i need help in understanding a part of code, Can > any one tell the use of Canonical paths of the Object. The use is mostly internal. Every time you set a property, you go through a "Visitor" that represents the value. The representations allowed by visitors are numbers, strings, booleans, etc. When you want to set a property to an object, you actually need to set a property to a string, because Visitors support string values. So you use a "path". Typically you'll use a canonical path (though you can also use a non-canonical path). Canonical paths are formed by following properties of type child. Non-canonical paths are formed by following properties of type child or link (where Something is the name of a class type). Similarly, when you read a property that has an object type, the property's value will be a path, and the getter for that property will always use a canonical path. Paolo