qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 00/24] qom: Convert some properties to class properties


From: Eduardo Habkost
Subject: Re: [PATCH 00/24] qom: Convert some properties to class properties
Date: Tue, 22 Sep 2020 00:31:47 -0400

On Tue, Sep 22, 2020 at 09:47:57AM +0800, Li Qiang wrote:
> Eduardo Habkost <ehabkost@redhat.com> 于2020年9月22日周二 上午6:11写道:
> >
> > Class properties make QOM introspection simpler and easier, as it
> > doesn't require an object to be instantiated.  This series
> > converts a few existing object_property_add*() calls to register
> > class properties instead.
> >
> 
> Hello Eduardo,
> 
> IIUC, most of the properties can be dev-spec or class-spec.
> Do we have any principle or rule to specify the property to be dev or class?
> 
> Maybe if the property which is always the same between instances can
> be a class-property?

If you are talking about having the same value, this is not the
use case for class properties.  Registering a class property just
means all instances of the object will have that property (but
each instance can have the property set to a different value),
and makes this information available for introspection before
instantiating the object.

-- 
Eduardo




reply via email to

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