Lines Matching +full:input +full:- +full:value

4  * Copyright (C) 2012-2016 Red Hat, Inc.
11 * See the COPYING.LIB file in the top-level directory.
18 #include "qapi/qapi-builtin-types.h"
19 #include "qapi/qapi-types-compat.h"
29 * There are four kinds of visitors: input visitors (QObject, string,
37 * While the dealloc and QObject input/output visitors are general,
40 * details on what it supports. Also, see visitor-impl.h for the
42 * docs/devel/qapi-code-gen.rst for more about the QAPI code
49 * A visitor should be used for exactly one top-level visit_type_FOO()
68 * qapi-visit-MODULE.h.
71 * between this QAPI value and its parent container. When visiting
73 * object, @name is the key associated with the value; when visiting a
78 * The visit_type_FOO() functions take a non-null @obj argument; they
79 * allocate *@obj during input visits, leave it unchanged during
86 * type). Only input visitors can fail.
88 * If an error is detected during visit_type_FOO() with an input
95 * incomplete objects. Since input visitors never produce an
102 * is an additional generated function in qapi-visit-MODULE.h
111 * lists) have a generated function in qapi-types-MODULE.h compatible
129 * Typical input visitor usage involves:
156 * for ( ; l; l = l->next) {
157 * ...use l->value...
191 * int value;
200 * value = 1;
201 * if (!visit_type_int(v, NULL, &value, &err)) {
204 * value = 2;
205 * if (!visit_type_int(v, NULL, &value, &err)) {
232 /* This struct is layout-compatible with all other *List structs
234 * singly-linked list. */
240 /* This struct is layout-compatible with all Alternate types
252 * May only be called only once after a successful top-level
265 * completed, but should not be called until a top-level
280 * @obj must be non-NULL for a real walk, in which case @size
281 * determines how much memory an input or clone visitor will allocate
286 * Can happen only when @v is an input visitor.
306 * is an input visitor.
338 * @list must be non-NULL for a real walk, in which case @size
339 * determines how much memory an input or clone visitor will allocate
345 * Can happen only when @v is an input visitor.
350 * one after the other. A real visit (where @list is non-NULL) uses
354 * NULL and obj set to the address of the value member of the list
363 * Iterate over a GenericList during a non-virtual list visit.
368 * @tail must not be NULL; on the first call, @tail is the value of
370 * be the previously returned value. Should be called in a loop until
371 * a NULL return; for each non-NULL return, the caller then calls the
374 * address of @tail->value.
382 * is an input visitor.
414 * @obj must not be NULL. Input and clone visitors use @size to
417 * (*@obj)->type. Other visitors leave @obj unchanged.
420 * Can happen only when @v is an input visitor.
457 * Input visitors set *@present according to input; other visitors
494 * visiting management interface input or output.
499 * Visit an enum value.
504 * @obj must be non-NULL. Input visitors parse input and set *@obj to
505 * the enumeration value, leaving @obj unchanged on error; other
508 * Currently, all input visitors parse text input, and all output
513 * is an input visitor.
519 * that an input visitor's visit_type_str() must have no unwelcome
526 * Check if visitor is an input visitor.
535 /*** Visiting built-in types ***/
538 * Visit an integer value.
543 * @obj must be non-NULL. Input visitors set *@obj to the value;
547 * is an input visitor.
554 * Visit a uint8_t value.
555 * Like visit_type_int(), except clamps the value to uint8_t range.
561 * Visit a uint16_t value.
562 * Like visit_type_int(), except clamps the value to uint16_t range.
568 * Visit a uint32_t value.
569 * Like visit_type_int(), except clamps the value to uint32_t range.
575 * Visit a uint64_t value.
576 * Like visit_type_int(), except clamps the value to uint64_t range,
583 * Visit an int8_t value.
584 * Like visit_type_int(), except clamps the value to int8_t range.
589 * Visit an int16_t value.
590 * Like visit_type_int(), except clamps the value to int16_t range.
596 * Visit an int32_t value.
597 * Like visit_type_int(), except clamps the value to int32_t range.
603 * Visit an int64_t value.
610 * Visit a uint64_t value.
619 * Visit a boolean value.
624 * @obj must be non-NULL. Input visitors set *@obj to the value;
628 * is an input visitor.
635 * Visit a string value.
640 * @obj must be non-NULL. Input and clone visitors set *@obj to the
641 * value (always using "" rather than NULL for an empty string).
645 * It is safe to cast away const when preparing a (const char *) value
649 * Can happen only when @v is an input visitor.
658 * Visit a number (i.e. double) value.
663 * @obj must be non-NULL. Input visitors set *@obj to the value;
668 * is an input visitor.
676 * Visit an arbitrary value.
678 * @name expresses the relationship of this value to its parent
681 * @obj must be non-NULL. Input visitors set *@obj to the value;
682 * other visitors will leave *@obj unchanged. *@obj must be non-NULL
686 * Can happen only when @v is an input visitor.
690 * Note that some kinds of input can't express arbitrary QObject.
697 * Visit a JSON null value.
699 * @name expresses the relationship of the null value to its parent
702 * @obj must be non-NULL. Input visitors set *@obj to the value;
706 * Can happen only when @v is an input visitor.