[Top][All Lists]
[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
- Re: [Qemu-devel] [PATCH v1][ 03/23] error-propagation: build qemu with with error-propagation bits, (continued)
- [Qemu-devel] [PATCH v1][ 07/23] qapi: add ordereddict/qapi.py helper libraries, Michael Roth, 2011/05/17
- [Qemu-devel] [PATCH v1][ 06/23] qapi: add module init types for qapi, Michael Roth, 2011/05/17
- [Qemu-devel] [PATCH v1][ 08/23] qapi: add qapi-types.py code generator, Michael Roth, 2011/05/17
- [Qemu-devel] [PATCH v1][ 09/23] qapi: add qapi-visit.py code generator, Michael Roth, 2011/05/17
- [Qemu-devel] [PATCH v1][ 10/23] qapi: add qapi-commands.py code generator, Michael Roth, 2011/05/17
- [Qemu-devel] [PATCH v1][ 11/23] qapi: add qapi-types-core.h, Michael Roth, 2011/05/17
- [Qemu-devel] [PATCH v1][ 12/23] qapi: add qapi-visit-core.h, Michael Roth, 2011/05/17
- [Qemu-devel] [PATCH v1][ 15/23] qapi: add QAPI dealloc visiter, Michael Roth, 2011/05/17
- [Qemu-devel] [PATCH v1][ 13/23] qapi: add QMP input visiter, Michael Roth, 2011/05/17
- Re: [Qemu-devel] [PATCH v1][ 13/23] qapi: add QMP input visiter,
Stefan Hajnoczi <=
- [Qemu-devel] [PATCH v1][ 16/23] qapi: add command registration/lookup functions, Michael Roth, 2011/05/17
- [Qemu-devel] [PATCH v1][ 14/23] qapi: add QMP output visiter, Michael Roth, 2011/05/17
- [Qemu-devel] [PATCH v1][ 17/23] qapi: add QMP dispatch functions, Michael Roth, 2011/05/17
- [Qemu-devel] [PATCH v1][ 19/23] qapi: test schema used for unit tests, Michael Roth, 2011/05/17
- [Qemu-devel] [PATCH v1][ 20/23] qapi: add test-visiter, tests for gen. visiter code, Michael Roth, 2011/05/17
- [Qemu-devel] [PATCH v1][ 21/23] qapi: Makefile changes to build test-visiter, Michael Roth, 2011/05/17
- [Qemu-devel] [PATCH v1][ 18/23] qapi: add base declaration/types for QMP, Michael Roth, 2011/05/17
- [Qemu-devel] [PATCH v1][ 22/23] qapi: add test-qmp-commands, tests for gen. marshalling/dispatch code, Michael Roth, 2011/05/17