paul@100 | 1 | /* |
paul@100 | 2 | * Generation of declaration elements such as parameters and members. |
paul@100 | 3 | * |
paul@100 | 4 | * Copyright (C) 2019 Paul Boddie <paul@boddie.org.uk> |
paul@100 | 5 | * |
paul@100 | 6 | * This program is free software; you can redistribute it and/or |
paul@100 | 7 | * modify it under the terms of the GNU General Public License as |
paul@100 | 8 | * published by the Free Software Foundation; either version 2 of |
paul@100 | 9 | * the License, or (at your option) any later version. |
paul@100 | 10 | * |
paul@100 | 11 | * This program is distributed in the hope that it will be useful, |
paul@100 | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
paul@100 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
paul@100 | 14 | * GNU General Public License for more details. |
paul@100 | 15 | * |
paul@100 | 16 | * You should have received a copy of the GNU General Public License |
paul@100 | 17 | * along with this program; if not, write to the Free Software |
paul@100 | 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, |
paul@100 | 19 | * Boston, MA 02110-1301, USA |
paul@100 | 20 | */ |
paul@100 | 21 | |
paul@100 | 22 | #pragma once |
paul@100 | 23 | |
paul@100 | 24 | #include <stdio.h> |
paul@100 | 25 | #include "types.h" |
paul@100 | 26 | |
paul@110 | 27 | /* Signatures. */ |
paul@110 | 28 | |
paul@110 | 29 | void write_interface_signature(struct signature *sig, enum signature_role role, |
paul@110 | 30 | enum component_role component, FILE *fp, |
paul@110 | 31 | struct interface *iface); |
paul@110 | 32 | |
paul@139 | 33 | void write_interface_unimplemented_method(struct signature *sig, |
paul@139 | 34 | enum specifier direction, FILE *fp); |
paul@139 | 35 | |
paul@117 | 36 | void write_initial_parameter(const char *name, FILE *fp); |
paul@117 | 37 | |
paul@117 | 38 | void write_signatures(struct signature *sig, enum signature_role role, FILE *fp, |
paul@117 | 39 | struct interface *iface, |
paul@113 | 40 | void (*write_signature)(struct signature *, |
paul@113 | 41 | enum signature_role role, |
paul@113 | 42 | FILE *, struct interface *)); |
paul@100 | 43 | /* Parameter lists. */ |
paul@100 | 44 | |
paul@125 | 45 | void write_parameters(struct parameter *param, FILE *fp, enum parameter_role role, |
paul@139 | 46 | enum function_role function, enum specifier direction, |
paul@129 | 47 | int continuing); |
paul@125 | 48 | |
paul@129 | 49 | void write_parameter(struct parameter *param, FILE *fp, enum parameter_role role, |
paul@129 | 50 | enum function_role function); |
paul@100 | 51 | |
paul@100 | 52 | /* Structure member and variable declaration/initialisation. */ |
paul@100 | 53 | |
paul@100 | 54 | void write_declarations(struct parameter *param, enum specifier direction, |
paul@100 | 55 | enum parameter_class cls, FILE *fp); |