aboutsummaryrefslogtreecommitdiff
path: root/include/qapi/dealloc-visitor.h
blob: 45b06b248c2797d1eb10c918e02b24f7b5a17bd0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
 * Dealloc Visitor
 *
 * Copyright IBM, Corp. 2011
 *
 * Authors:
 *  Michael Roth   <mdroth@linux.vnet.ibm.com>
 *
 * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
 * See the COPYING.LIB file in the top-level directory.
 *
 */

#ifndef QAPI_DEALLOC_VISITOR_H
#define QAPI_DEALLOC_VISITOR_H

#include "qapi/visitor.h"

typedef struct QapiDeallocVisitor QapiDeallocVisitor;

/*
 * The dealloc visitor is primarly used only by generated
 * qapi_free_FOO() functions, and is the only visitor designed to work
 * correctly in the face of a partially-constructed QAPI tree.
 */
QapiDeallocVisitor *qapi_dealloc_visitor_new(void);
void qapi_dealloc_visitor_cleanup(QapiDeallocVisitor *d);

Visitor *qapi_dealloc_get_visitor(QapiDeallocVisitor *v);

#endif