added doxygen comments
[libfirm] / ir / tr / tpop_t.h
1
2 /* $Id$ */
3
4 # ifndef _TPOP_T_H_
5 # define _TPOP_T_H_
6
7 # include <stddef.h>
8 # include "tpop.h"
9 /**
10  *
11  *   file tpop_t.h
12  *   (C) 2001 by Universitaet Karlsruhe
13  *   Goetz Lindenmaier
14  *   This file contains the datatypes hidden in tpop.h.
15  * @see  tpop.h
16  */
17
18 struct tp_op {
19   tp_opcode code;
20   ident *name;
21   size_t attr_size;
22 };
23
24 /**
25  *
26  *   Returns a new type opcode.
27  *   Allocates a new tp_op struct and initializes it's fields with
28  *   the passed values.  This function is only to be used during
29  *   initialization of the library.
30  *   @param code      - the enum for this type opcode.
31  *   @param name      - an ident for the name of the type opcode.
32  *   @param attr_size - the size of the attributes necessary for a type with
33  *               this opcode
34  *   @return A new type opcode.
35  *
36  */
37 tp_op * new_tpop (tp_opcode code, ident *name, size_t attr_size);
38
39 /**
40  *
41  *   Initialize the tpop module.
42  *   Must be called during the initizlization of the library. Allocates
43  *   opcodes and sets the globals that are external visible as specified
44  *   in tpop.h.
45  *   Allocates opcodes for classes, struct, method, union, array,
46  *   enumeration, pointer and primitive and sets the according values.
47  *
48  */
49 void init_tpop (void);
50
51 /**
52  *
53  *   Returns the size of the attribute to this kind
54  *   of type.
55  *   Internal feature.
56  *   @param op - The type opcode to get the size for.
57  *   @return The size of the attribute of types with this opcode.
58  *
59  */
60 int get_tpop_attr_size (tp_op *op);
61
62 #endif /* _TPOP_T_H_ */