qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v1][ 13/23] qapi: add QMP input visiter


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v1][ 13/23] qapi: add QMP input visiter
Date: Wed, 18 May 2011 09:35:55 +0100

On Wed, May 18, 2011 at 1:52 AM, Michael Roth <address@hidden> wrote:
> A type of Visiter class that is used to walk a qobject's
> structure and assign each entry to the corresponding native C type.
> Command marshaling function will use this to pull out QMP command
> parameters recieved over the wire and pass them as native arguments
> to the corresponding C functions.
>
> Signed-off-by: Michael Roth <address@hidden>
> ---
>  qapi/qmp-input-visiter.c |  239 
> ++++++++++++++++++++++++++++++++++++++++++++++
>  qapi/qmp-input-visiter.h |   13 +++
>  2 files changed, 252 insertions(+), 0 deletions(-)
>  create mode 100644 qapi/qmp-input-visiter.c
>  create mode 100644 qapi/qmp-input-visiter.h

Pedantic note: the design pattern is commonly spelled "visitor":
http://en.wikipedia.org/wiki/Visitor_pattern

The fixed-size stack and hardcoded object size are unfortunate but I
haven't read the code in enough detail to see if there is a feasible
alternative.

Stefan



reply via email to

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