qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] New Bee : What is the canonical path.


From: Paolo Bonzini
Subject: Re: [Qemu-devel] New Bee : What is the canonical path.
Date: Wed, 10 Dec 2014 12:10:59 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0


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 via email to

[Prev in Thread] Current Thread [Next in Thread]