/* %Z%%M% %I% %E% */

/*
 * Copyright (c) 1990, 1991, 1992, 1995 by Wayne C. Gramlich.
 * All rights reserved.
 *
 * Permission to use, copy, modify, distribute, and sell this software
 * for any purpose is hereby granted without fee provided that the above
 * copyright notice and this permission are retained.  The author makes
 * no representations about the suitability of this software for any purpose.
 * It is provided "as is" without express or implied warranty.
 */

/* This file contains typedefs for types: */

#ifndef TYPE_TYPES_H
#define TYPE_TYPES_H

#ifndef VECTOR_TYPES_H
#include "vector_types.h"
#endif

typedef struct Signal_struct		*Signal;
typedef enum Type_kind_enum		Type_kind;
typedef enum Type_proto_kind_enum	Type_proto_kind;
typedef union Type_value_union		Type_value;

typedef struct Type_def_struct		*Type_def;
typedef struct Type_def_table_struct	*Type_def_table;
typedef Vec(Type_def)			Type_defs;
typedef struct Type_enumeration_struct	*Type_enumeration;
typedef struct Type_item_struct		*Type_item;
typedef struct Type_iterator_struct	*Type_iterator;
typedef struct Type_field_struct	*Type_field;
typedef struct Type_need_struct		*Type_need;
typedef Vec(Type_field)			Type_fields;
typedef struct Type_need_table_struct	*Type_need_table;
typedef Vec(Type_need)			Type_needs;
typedef struct Type_proto_struct	*Type_proto;
typedef struct Type_proto_table_struct	*Type_proto_table;
typedef struct Type_record_struct	*Type_record;
typedef struct Type_ref_struct		*Type_ref;
typedef struct Type_ref_table_struct	*Type_ref_table;
typedef struct Type_refs_struct		*Type_refs;
typedef struct Type_routine_struct	*Type_routine;
typedef struct Type_signal_struct	*Type_signal;
typedef struct Type_signal_table_struct	*Type_signal_table;
typedef Vec(Type_signal)		Type_signals;
typedef struct Type_tables_struct	*Type_tables;
typedef struct Type_variant_struct	*Type_variant;

/* A flag that indicates whether we have a procedure or iterator: */
enum Type_proto_kind_enum {
	Type_proto_procedure,		/* Procedure */
	Type_proto_iterator		/* Iterator */
};

/* This enum has one tag for each of the variants in Type_value: */
enum Type_kind_enum {
	Type_kind_enumeration,		/* Enumeration type */
	Type_kind_external,		/* External type */
	Type_kind_parameter,		/* Paramter type */
	Type_kind_proto,		/* Proto type */
	Type_kind_record,		/* Struct type */
	Type_kind_simple,		/* Simple type */
	Type_kind_variant,		/* Variant type */
	Type_kind_undefined		/* Undefined type */
};

#endif /* TYPE_TYPES_H */
