Skip to content
  • Paolo Bonzini's avatar
    18fa3ebc
    qapi: introduce forwarding visitor · 18fa3ebc
    Paolo Bonzini authored
    
    
    This new adaptor visitor takes a single field of the adaptee, and exposes it
    with a different name.
    
    This will be used for QOM alias properties.  Alias targets can of course
    have a different name than the alias property itself (e.g. a machine's
    pflash0 might be an alias of a property named 'drive').  When the target's
    getter or setter invokes the visitor, it will use a different name than
    what the caller expects, and the visitor will not be able to find it
    (or will consume erroneously).
    
    The solution is for alias getters and setters to wrap the incoming
    visitor, and forward the sole field that the target is expecting while
    renaming it appropriately.
    
    Reviewed-by: default avatarEric Blake <eblake@redhat.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    18fa3ebc
    qapi: introduce forwarding visitor
    Paolo Bonzini authored
    
    
    This new adaptor visitor takes a single field of the adaptee, and exposes it
    with a different name.
    
    This will be used for QOM alias properties.  Alias targets can of course
    have a different name than the alias property itself (e.g. a machine's
    pflash0 might be an alias of a property named 'drive').  When the target's
    getter or setter invokes the visitor, it will use a different name than
    what the caller expects, and the visitor will not be able to find it
    (or will consume erroneously).
    
    The solution is for alias getters and setters to wrap the incoming
    visitor, and forward the sole field that the target is expecting while
    renaming it appropriately.
    
    Reviewed-by: default avatarEric Blake <eblake@redhat.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Loading