All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: boddu pavan <boddupavan@yahoo.com>,
	QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] New Bee : What is the canonical path.
Date: Wed, 10 Dec 2014 12:10:59 +0100	[thread overview]
Message-ID: <54882A43.2030607@redhat.com> (raw)
In-Reply-To: <522493776.4407770.1418124502655.JavaMail.yahoo@jws100120.mail.ne1.yahoo.com>



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<Something>.  Non-canonical paths are formed by
following properties of type child<Something> or link<Something> (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

  reply	other threads:[~2014-12-10 11:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-09 11:28 [Qemu-devel] New Bee : What is the canonical path boddu pavan
2014-12-10 11:10 ` Paolo Bonzini [this message]
2014-12-11  7:02   ` boddu pavan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54882A43.2030607@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=boddupavan@yahoo.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.