Skip to content
  • Paolo Bonzini's avatar
    qom: introduce get/set methods for Property · 80e555c2
    Paolo Bonzini authored
    
    
    This patch adds a visitor interface to Property.  This way, QOM will be
    able to expose Properties that access a fixed field in a struct without
    exposing also the everything-is-a-string "feature" of qdev properties.
    
    Whenever the printed representation in both QOM and qdev (which is
    typically the case for device backends), parse/print code can be reused
    via get_generic/set_generic.  Dually, whenever multiple PropertyInfos
    have the same representation in both the struct and the visitors the
    code can be reused (for example among all of int32/uint32/hex32).
    
    Reviewed-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
    80e555c2